Commit 4d451b68 authored by Bernd Brassel's avatar Bernd Brassel
Browse files

change in definitions for debugger

parent 9a9c0fea
......@@ -62,46 +62,44 @@ instance Data.Generics.Data (IO dm a)
return :: DM.DM dm => a -> dm a
return = Prelude.return
curryReturn :: DM.DM dm => a -> dm (IO dm a)
curryReturn x = return (IO (\w -> return (x,w)))
(?) :: (DM.DM dm, DI.GenTerm a) => a -> a -> dm a
x ? y = x DM.? y
-- implementation just returns () representation
strict_prim_putChar ::
(DM.DM dm) => Char -> dm (IO dm (Unit))
strict_prim_putChar x0 = hook_strict_prim_putChar x0 (strict_return Unit)
strict_prim_putChar x0 = hook_strict_prim_putChar x0 (curryReturn Unit)
-- extracts a regular Char from the Virtual I/O information of the oracle
extractChar :: (DM.DM dm) => dm Prelude.Char
extractChar = DM.getNextExtVal
strict_getChar :: (DM.DM dm) => dm (IO dm Char)
strict_getChar =
do c <- extractChar
hook_strict_getChar (strict_return (Char c))
hook_strict_getChar (do c <- DM.getNextExtVal; curryReturn (Char c))
op_DollarEMark ::
(DM.DM dm, DI.GenTerm a, DI.GenTerm b) =>
DM.Func dm a b -> a -> dm b
op_DollarEMark x0 x1
= hook_op_DollarEMark x0 x1 (strict_apply x0 x1)
= hook_op_DollarEMark x0 x1 (curryApply x0 x1)
op_DollarEMarkEMark ::
(DM.DM dm, DI.GenTerm a, DI.GenTerm b) =>
DM.Func dm a b -> a -> dm b
op_DollarEMarkEMark x0 x1
= hook_op_DollarEMarkEMark x0 x1 (strict_apply x0 x1)
= hook_op_DollarEMarkEMark x0 x1 (curryApply x0 x1)
op_DollarRhomb ::
(DM.DM dm, DI.GenTerm a, DI.GenTerm b) =>
DM.Func dm a b -> a -> dm b
op_DollarRhomb x0 x1
= hook_op_DollarRhomb x0 x1 (strict_apply x0 x1)
= hook_op_DollarRhomb x0 x1 (curryApply x0 x1)
op_DollarRhombRhomb ::
(DM.DM dm, DI.GenTerm a, DI.GenTerm b) =>
DM.Func dm a b -> a -> dm b
op_DollarRhombRhomb x0 x1
= hook_op_DollarRhombRhomb x0 x1 (strict_apply x0 x1)
= hook_op_DollarRhombRhomb x0 x1 (curryApply x0 x1)
strict_prim_error ::
(DM.DM dm, DI.GenTerm a) =>
......@@ -111,9 +109,7 @@ strict_prim_error x0
(DM.errorHook (Prelude.map charToHChar (listToHList x0)))
strict_failed :: (DM.DM dm, DI.GenTerm a) => dm a
strict_failed = return DM.failed
--DM.failedHook
strict_failed = hook_strict_failed (return DM.failed)
op_EqEq ::
......@@ -152,14 +148,14 @@ op_GtGtEq a1@(IO a) k
-- = hook_op_GtGtEq x0 x1 (Prelude.error "not implemented")
= hook_op_GtGtEq a1 k (return (IO (\w -> do
(r, w') <- a w
IO f <- strict_apply k r
IO f <- curryApply k r
f w')))
strict_return ::
(DM.DM dm, DI.GenTerm a) => a -> dm (IO dm a)
strict_return x
-- = hook_strict_return x (IO (FuncRep (\w -> (x,w))))
= hook_strict_return x (return (IO (\w -> return (x,w))))
= hook_strict_return x (curryReturn x)
strict_prim_readFile ::
(DM.DM dm) =>
......@@ -172,14 +168,14 @@ strict_prim_writeFile ::
(DM.DM dm) =>
List Char -> List Char -> dm (IO dm (Unit))
strict_prim_writeFile x0 x1
= hook_strict_prim_writeFile x0 x1 (strict_return Unit)
= hook_strict_prim_writeFile x0 x1 (curryReturn Unit)
-- implementation just returns () representation
strict_prim_appendFile ::
(DM.DM dm) =>
List Char -> List Char -> dm (IO dm (Unit))
strict_prim_appendFile x0 x1
= hook_strict_prim_appendFile x0 x1 (strict_return Unit)
= hook_strict_prim_appendFile x0 x1 (curryReturn Unit)
strict_catchFail ::
(DM.DM dm, DI.GenTerm a) =>
......@@ -199,8 +195,12 @@ strict_getSearchTree ::
strict_getSearchTree x0
= hook_strict_getSearchTree x0 (Prelude.error "not implemented")
strict_apply :: DM.DM dm => DM.Func dm a b -> a -> dm b
strict_apply (DM.FuncRep _ f) x = f x
curryApply :: DM.DM dm => DM.Func dm a b -> a -> dm b
curryApply (DM.FuncRep _ f) x = f x
strict_apply :: (DM.DM dm, DI.GenTerm a,DI.GenTerm b) => DM.Func dm a b -> a -> dm b
strict_apply f x = hook_strict_apply f x (curryApply f x)
strict_cond ::
(DM.DM dm, DI.GenTerm a) => Success -> a -> dm 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