Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace deprecated Optional/fold with Prelude.Optional.fold #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion render/Attributes.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let types = ../types.dhall
let renderAttribute =
λ(name : Text)
λ(x : Optional Bool)
Optional/fold
Prelude.Optional.fold
Bool
x
(List Text)
Expand Down
4 changes: 2 additions & 2 deletions render/Config.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let renderOptional =
λ(a : Type)
λ(f : a Text)
λ(optional : Optional a)
Optional/fold a optional Text (λ(x : a) renderOptions (f x)) ""
Prelude.Optional.fold a optional Text (λ(x : a) renderOptions (f x)) ""

let renderNamedOptional =
λ(a : Type)
Expand Down Expand Up @@ -65,7 +65,7 @@ let renderOptionalEnabled =
let renderOptionalTopLevel =
λ(name : Text)
λ(x : Optional Text)
Optional/fold
Prelude.Optional.fold
Text
x
Text
Expand Down
2 changes: 1 addition & 1 deletion render/Disclose.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let renderDisclosure = ./Disclosure.dhall
let renderOptionalDisclosure =
λ(suffix : Text)
→ λ(x : Optional types.Disclosure)
→ Optional/fold
Prelude.Optional.fold
types.Disclosure
x
(List Text)
Expand Down
5 changes: 3 additions & 2 deletions render/Hilite.dhall
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
let types = ../types.dhall
let Prelude = ../Prelude.dhall

in λ(a : Type)
→ λ(renderTrigger : a → Text)
→ λ(hilite : types.Hilite a)
→ let trigger =
Optional/fold
Prelude.Optional.fold
a
hilite.trigger
Text
(λ(trigger : a) → "/${renderTrigger trigger}")
""

let attributes =
Optional/fold
Prelude.Optional.fold
types.Attributes.Type
hilite.attributes
Text
Expand Down
3 changes: 2 additions & 1 deletion render/MenuColor.dhall
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
let types = ../types.dhall
let Prelude = ../Prelude.dhall

in λ(x : types.MenuColor)
let attributes = ./Attributes.dhall x.attributes

let suffix =
Optional/fold
Prelude.Optional.fold
types.Color
x.color
Text
Expand Down
2 changes: 1 addition & 1 deletion render/ParanoidConfirmation.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let types = ../types.dhall
let renderConfirmation =
λ(name : Text)
λ(o : Optional Bool)
Optional/fold
Prelude.Optional.fold
Bool
o
(List Text)
Expand Down
6 changes: 3 additions & 3 deletions render/Scores.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ let types = ../types.dhall

in λ(x : types.Scores.Type)
→ let own =
Optional/fold
Prelude.Optional.fold
Bool
x.own
(List Text)
(λ(b : Bool) → [ "${./Bool.dhall b}o" ])
([] : List Text)

let around =
Optional/fold
Prelude.Optional.fold
Natural
x.around
(List Text)
(λ(n : Natural) → [ "${Natural/show n}a" ])
([] : List Text)

let top =
Optional/fold
Prelude.Optional.fold
Natural
x.top
(List Text)
Expand Down