Commit c6e3f4bf authored by Tim Steenvoorden's avatar Tim Steenvoorden

fix nameing of constructors

parent 53570d10
...@@ -73,18 +73,18 @@ where ...@@ -73,18 +73,18 @@ where
| Eq Expr Expr | Eq Expr Expr
:: Func :: Func
= Identity = IdentityF
| And Value | AndF Value
| Or Value | OrF Value
| GtF Value | GtF Value
| GeF Value | GeF Value
| EqF Value | EqF Value
| LeF Value | LeF Value
| LtF Value | LtF Value
| Add Value | AddF Value
| Sub Value | SubF Value
| Mul Value | MulF Value
| Div Value | DivF Value
:: Value :: Value
= VInt Int = VInt Int
...@@ -225,8 +225,8 @@ taskEditor = DynamicEditor ...@@ -225,8 +225,8 @@ taskEditor = DynamicEditor
] ]
// Non-task functions: // Non-task functions:
, DynamicConsGroup "Basics" , DynamicConsGroup "Basics"
[ functionConsDyn "Identity" "this value" [ functionConsDyn "IdentityF" "this value"
(dynamic Typed Identity :: (dynamic Typed IdentityF ::
A.a: A.a:
Typed Func (a -> a) Typed Func (a -> a)
) )
...@@ -345,7 +345,7 @@ evalTaskFunc (ViewF msg func) val = case evalFunc val func of ...@@ -345,7 +345,7 @@ evalTaskFunc (ViewF msg func) val = case evalFunc val func of
(VString s) -> (viewInformation msg [] s @ VString) <<@ ApplyLayout arrangeHorizontal (VString s) -> (viewInformation msg [] s @ VString) <<@ ApplyLayout arrangeHorizontal
(VTuple a b) -> (VTuple a b) ->
( viewInformation msg [] () ( viewInformation msg [] ()
||- evalTaskFunc (ViewF "" Identity) a -&&- evalTaskFunc (ViewF "" Identity) b ||- evalTaskFunc (ViewF "" IdentityF) a -&&- evalTaskFunc (ViewF "" IdentityF) b
@ \(a, b) -> VTuple a b @ \(a, b) -> VTuple a b
) )
<<@ ApplyLayout arrangeHorizontal <<@ ApplyLayout arrangeHorizontal
...@@ -373,7 +373,7 @@ evalExpr (Eq expr1 expr2) = evalFunc (evalExpr expr1) (EqF (evalExpr expr2)) ...@@ -373,7 +373,7 @@ evalExpr (Eq expr1 expr2) = evalFunc (evalExpr expr1) (EqF (evalExpr expr2))
evalFunc :: Value Func -> Value evalFunc :: Value Func -> Value
evalFunc val Identity = val evalFunc val IdentityF = val
evalFunc (VInt i1) func = case func of evalFunc (VInt i1) func = case func of
(GtF (VInt i2)) -> VBool $ i1 > i2 (GtF (VInt i2)) -> VBool $ i1 > i2
(GeF (VInt i2)) -> VBool $ i1 >= i2 (GeF (VInt i2)) -> VBool $ i1 >= i2
......
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