summaryrefslogtreecommitdiff
path: root/src/Expr.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-07-19 13:56:21 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-07-24 21:17:52 +0200
commit0ddc5807cab7cf3b791b1de4cffe2b1165b2480d (patch)
tree3236c63b27cfe9a33f62c498f932ddc2dfc29acd /src/Expr.hs
parente736b0a3ee8737b35fa79af644ca21cebafa76ef (diff)
Evaluation of Expr type
Diffstat (limited to 'src/Expr.hs')
-rw-r--r--src/Expr.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Expr.hs b/src/Expr.hs
index fa17158..b4ea0b0 100644
--- a/src/Expr.hs
+++ b/src/Expr.hs
@@ -17,7 +17,7 @@ data Expr c a where
App :: Expr c (a -> b) -> Expr c a -> Expr c b
GetContext :: Expr c c
AddDependency :: ExprContext c => ExprDependency c -> Expr c a -> Expr c a
- ExprIO :: IO a -> Expr c a
+ ExprIO :: (a -> IO b) -> Expr c a -> Expr c b
instance Functor (Expr c) where
fmap f x = Pure f <*> x
@@ -47,5 +47,5 @@ collectDependencies = \case
ExprIO {} -> mempty
-exprIO :: IO a -> Expr c a
+exprIO :: (a -> IO b) -> Expr c a -> Expr c b
exprIO = ExprIO