@@ -153,6 +153,8 @@ primitives =
153 (1, LFFloor) total,
153 (1, LFFloor) total,
154 Prim (sUN "prim__floatCeil") (ty [(AType ATFloat)] (AType ATFloat)) 1 (p_floatCeil)
154 Prim (sUN "prim__floatCeil") (ty [(AType ATFloat)] (AType ATFloat)) 1 (p_floatCeil)
155 (1, LFCeil) total,
155 (1, LFCeil) total,
156+ Prim (sUN "prim__negFloat") (ty [(AType ATFloat)] (AType ATFloat)) 1 (c_negFloat)
157+ (1, LFNegate) total,
157 Prim (sUN "prim__strHead") (ty [StrType] (AType (ATInt ITChar))) 1 (p_strHead)
159 Prim (sUN "prim__strHead") (ty [StrType] (AType (ATInt ITChar))) 1 (p_strHead)
158 (1, LStrHead) partial,
160 (1, LStrHead) partial,
@@ -660,6 +662,10 @@ c_intToChar _ = Nothing
660c_charToInt [(Ch x)] = Just . I . fromEnum $ x
662c_charToInt [(Ch x)] = Just . I . fromEnum $ x
661c_charToInt _ = Nothing
663c_charToInt _ = Nothing
665+c_negFloat :: [Const] -> Maybe Const
666+c_negFloat [Fl x] = Just $ Fl (negate x)
667+c_negFloat _ = Nothing
663c_floatToStr :: [Const] -> Maybe Const
669c_floatToStr :: [Const] -> Maybe Const
664c_floatToStr [Fl x] = Just $ Str (show x)
670c_floatToStr [Fl x] = Just $ Str (show x)
665c_floatToStr _ = Nothing
671c_floatToStr _ = Nothing