Skip to content

Commit

Permalink
Add multiple variables without constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjaguarpaw committed Nov 14, 2024
1 parent 0c0d4a7 commit c8a1f10
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions bluefin-internal/src/Bluefin/Internal/Examples.hs
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,13 @@ bar ::
Eff e ()
bar _ _ _ = pure ()

baz ::
State () e1 ->
State Bool e2 ->
State Int e3 ->
Eff (e1 :& e2 :& e3 :& es) ()
baz _ _ _ = pure ()

barFromFoo ::
State () e ->
State Bool e ->
Expand All @@ -993,3 +1000,19 @@ fooFromBar ::
State Int e3 ->
Eff es ()
fooFromBar s1 s2 s3 = bar (mapHandle s1) (mapHandle s2) (mapHandle s3)

bazFromFoo ::
State () e1 ->
State Bool e2 ->
State Int e3 ->
Eff (e1 :& e2 :& e3 :& es) ()
bazFromFoo = foo

barFromBaz ::
forall e.
State () e ->
State Bool e ->
State Int e ->
Eff e ()
barFromBaz s1 s2 s3 =
weakenEff (subsume1 (subsume1 (subsume1 has))) (baz @_ @_ @_ @e s1 s2 s3)

0 comments on commit c8a1f10

Please sign in to comment.