Commit 578744ba authored by Bernd Brassel's avatar Bernd Brassel
Browse files

some more steps for io

parent 2c609fb0
......@@ -2,17 +2,14 @@ import qualified Char
import qualified Debugger.ShowTerm as ST
instance DI.GenTerm Float where
underscore = FloatUnderscore
genTerm FloatUnderscore = DI.TermUnderscore (DI.SrcID "Prelude" 2)
genTerm (Float f) = DI.TermFloat f
instance DI.GenTerm Char where
underscore = CharUnderscore
genTerm CharUnderscore = DI.TermUnderscore (DI.SrcID "Prelude" 0)
genTerm (Char c) = DI.TermChar c
instance DI.GenTerm (IO dm a) where
underscore = IOUnderscore
genTerm IOUnderscore = DI.TermUnderscore (DI.SrcID "Prelude" Prelude.undefined)
genTerm x0 = Prelude.error "not implemented"
......@@ -150,7 +147,7 @@ op_EqEq x0 x1
-- performs an equality check on given elements
eqeq :: (DM.DM dm, DI.GenTerm a) => a -> a -> dm Bool
eqeq x0 x1 = DM.treatCase' (eqeqx x0) x1 where
eqeq x0 x1 = DM.treatCase' Prelude.False (eqeqx x0) x1 where
eqeqx x y | DI.genTerm x Prelude.== DI.genTerm y = return True
| Prelude.otherwise = return False
......@@ -182,8 +179,11 @@ op_GtGtEq ::
IO dm a -> DM.Func dm a (IO dm b) -> dm (IO dm b)
op_GtGtEq a1@(IO a) k
= hook_op_GtGtEq a1 k (return (IO (\w -> do
DM.popOracle
(r, w') <- a w
DM.popOracle
IO f <- curryApply k r
DM.popOracle
f w')))
-- return :: a -> IO a
......@@ -229,7 +229,7 @@ strict_prim_show ::
strict_prim_show x0
= hook_strict_prim_show x0 (show x0)
show x0 = DM.treatCase' (return . show') x0 where
show x0 = DM.treatCase' Prelude.False (return . show') x0 where
show' x = hStrToStr hStr where
hStr = ST.showGenTerm x
......@@ -254,12 +254,6 @@ strict_cond ::
strict_cond x0 x1
= hook_strict_cond x0 x1 (Prelude.error "not implemented")
-- commit :: a -> a (TODO)
strict_commit ::
(DM.DM dm, DI.GenTerm a) => a -> dm a
strict_commit x0
= hook_strict_commit x0 (Prelude.error "not implemented")
-- =:<= :: a -> a -> Success (TODO)
op_EqColonLtEq ::
(DM.DM dm, DI.GenTerm a) =>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment