@@ -33,7 +33,8 @@ primitives =
33 Prim (UN ["prim__ltFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (<)),
33 Prim (UN ["prim__ltFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (<)),
34 Prim (UN ["prim__lteFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (<=)),
34 Prim (UN ["prim__lteFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (<=)),
35 Prim (UN ["prim__gtFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (>)),
35 Prim (UN ["prim__gtFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (>)),
36− Prim (UN ["prim__gteFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (>=))
36+ Prim (UN ["prim__gteFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (>=)),
37+ Prim (UN ["prim__concat"]) (ty [StrType, StrType] StrType) 2 (sBin (++))
39iBin op [VConstant (I x), VConstant (I y)] = Just $ VConstant (I (op x y))
40iBin op [VConstant (I x), VConstant (I y)] = Just $ VConstant (I (op x y))
@@ -48,6 +49,9 @@ bfBin op [VConstant (Fl x), VConstant (Fl y)] = let i = (if op x y then 1 else 0
48 Just $ VConstant (I i)
49 Just $ VConstant (I i)
49bfBin _ _ = Nothing
50bfBin _ _ = Nothing
52+sBin op [VConstant (Str x), VConstant (Str y)] = Just $ VConstant (Str (op x y))
51elabPrim :: Prim -> Idris ()
55elabPrim :: Prim -> Idris ()
52elabPrim (Prim n ty i def) = updateContext (addOperator n ty i def)
56elabPrim (Prim n ty i def) = updateContext (addOperator n ty i def)