Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dorchard committed Nov 22, 2024
1 parent 78b43af commit f861c0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion StdLib/List.gr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Result
import Maybe
import Bool

data List a where Empty; Next a (List a)
data List a where Empty | Next a (List a)

--- Append two lists
append_list : forall {a : Type} . List a -> List a -> List a
Expand Down
4 changes: 2 additions & 2 deletions examples/effects_nondet.gr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import List

data Labels = Toss | Drop

-- Operations
-- (Sigma functor) - Signature of operations
data GameOps : Set Labels -> Type -> Type where
FlipCoin : forall {r : Type} . () -> (Bool -> r) [2] -> GameOps {Toss} r;
Fumble : forall {r : Type} . () -> (Void -> r) [0] -> GameOps {Drop} r
Expand All @@ -33,7 +33,7 @@ foo = call FlipCoin ()

-- Two coin flips, all good
example1 : (Bool, Bool) <Eff (Set Labels) GameOps {Toss}>
example1 = let
example1 = let -- do x <- ...
x <- call FlipCoin ();
y <- call FlipCoin ()
in pure (x, y)
Expand Down

0 comments on commit f861c0d

Please sign in to comment.