Skip to content

Commit

Permalink
Merge pull request #14 from gev/main
Browse files Browse the repository at this point in the history
bump to GHC 9.4.8
  • Loading branch information
sorki authored Dec 31, 2023
2 parents 69bae09 + b5b9902 commit c93b226
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ivory/src/Ivory/Language/Coroutine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ coroutine :: forall a. IvoryArea a =>
coroutine name (CoroutineBody fromYield) = Coroutine { .. }
where
((), CodeBlock { blockStmts = rawCode }) =
runIvory $ fromYield $ call (proc yieldName $ body $ return ())
runIvory $ fromYield $ call fake
-- The above call is a fake function call which code elsewhere extracts from
-- the AST and replaces.

Expand Down Expand Up @@ -211,6 +211,10 @@ yieldName = "+yield"
stateName :: String
stateName = "state"

-- | A fake function
fake :: IvoryType t => Def ('[] :-> t)
fake = proc yieldName $ body $ return ()

-- | The type used for the continuation's state.
stateType :: AST.Type
stateType = AST.TyWord AST.Word32
Expand Down

0 comments on commit c93b226

Please sign in to comment.