Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjaguarpaw committed Sep 1, 2024
1 parent 0e3710f commit a338a42
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions bluefin-internal/src/Bluefin/Internal/Examples.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE LinearTypes #-}
{-# LANGUAGE QualifiedDo #-}
{-# LANGUAGE NoMonoLocalBinds #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -Wno-typed-holes #-}

module Bluefin.Internal.Examples where

Expand Down Expand Up @@ -681,18 +681,16 @@ linearlyExample = runEff $ \io ->
unLEff $
linearly
(\() y -> for_ ['A' .. 'H'] $ \i -> yield y i)
( \l1 ->
linearly
(\() y -> for_ [1 :: Int .. 3] $ \i -> yield y i)
( \l2 -> L.do
alternate out l1 l2
)
)
\l1 ->
linearly
(\() y -> for_ [1 :: Int .. 3] $ \i -> yield y i)
\l2 -> L.do
alternate out l1 l2
)
(\s -> effIO io (putStrLn s))

alternate ::
(e3 :> es, e2 :> es, Show a1, e1 :> es, Show a2) =>
(e1 :> es, e2 :> es, e3 :> es, Show a1, Show a2) =>
Stream String e3 ->
Linearly () a1 () e1 %1 ->
Linearly () a2 () e2 %1 ->
Expand All @@ -707,9 +705,9 @@ alternate y l1 l2 =
alternate y l2 l1'

yieldAll ::
(e :> es, e2 :> es, Show a) =>
Stream String e2 ->
Linearly () a () e %1 ->
(e1 :> es, e2 :> es, Show a) =>
Stream String e1 ->
Linearly () a () e2 %1 ->
LEff es ()
yieldAll y l =
yieldLinearly l () L.>>= \case
Expand Down

0 comments on commit a338a42

Please sign in to comment.