RTP.hs.sav 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. module RTP where
  2. import qualified Prelude
  3. -- import qualified RTS
  4. undefined = Prelude.undefined
  5. data Bool = False | True
  6. type Float = Prelude.Double
  7. -- newtype Float = FloatT { unboxFloat :: Prelude.Float}
  8. newtype Char = CharT { unboxChar :: Prelude.Char }
  9. _Int = ()
  10. _Float = ()
  11. _String = ()
  12. _Char = ()
  13. _primShowBool :: Bool -> Prelude.String
  14. _primShowBool False = "False"
  15. _primShowBool True = "True"
  16. _primShowInt :: Prelude.Int -> Prelude.String
  17. _primShowInt = Prelude.show
  18. _primIntZero :: Prelude.Int
  19. _primIntZero = (0::Prelude.Int)
  20. _primIntOne :: Prelude.Int
  21. _primIntOne = (1::Prelude.Int)
  22. _primShowFloat :: Float -> Prelude.String
  23. _primShowFloat f = Prelude.show f
  24. -- _primShowFloat (FloatT f) = Prelude.show f
  25. _primShowChar c = [ unboxChar c]
  26. _primStringAppend :: Prelude.String -> Prelude.String -> Prelude.String
  27. _primStringAppend = (Prelude.++)
  28. _primStringReverse = Prelude.reverse
  29. _primStringToList s = Prelude.map CharT s
  30. _primStringFromList s = Prelude.map unboxChar s
  31. _primNatPlus = undefined
  32. _primNatMinus = undefined
  33. _primNatTimes = undefined
  34. _primNatDivSuc = undefined
  35. _primNatModSuc = undefined
  36. _primNatLess = undefined
  37. _primNatEquals = undefined