Skip to content
This repository was archived by the owner on Feb 3, 2021. It is now read-only.

Commit 80dc964

Browse files
committed
Add .FatRat as copy of .Rat #20
1 parent e743d95 commit 80dc964

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Pugs/src/Pugs/Prim.hs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ op0 "defer" = const $ do
109109
op0 "Int" = const $ return (VType $ mkType "Int")
110110
op0 "Num" = const $ return (VType $ mkType "Num")
111111
op0 "Rat" = const $ return (VType $ mkType "Rat")
112+
op0 "FatRat" = const $ return (VType $ mkType "FatRat")
112113
op0 "Bool" = const $ return (VType $ mkType "Bool")
113114
op0 "Complex" = const $ return (VType $ mkType "Complex")
114115
op0 "Str" = const $ return (VType $ mkType "Str")
@@ -237,6 +238,7 @@ op1 "int" = op1Cast VInt
237238
op1 "Int" = op1Cast VInt
238239
op1 "Num" = op1Cast VNum
239240
op1 "Rat" = op1Cast VRat
241+
op1 "FatRat" = op1Cast VRat
240242
op1 "Complex" = op1Cast VComplex
241243
op1 "Str" = op1Cast VStr
242244
op1 "+^" = op1Cast (VInt . pred . negate) -- Arbitrary precision complement- 0 ==> -1 / 1 ==> -2
@@ -1947,6 +1949,15 @@ initSyms = seq (length syms) $ do
19471949
\\n Rat pre Rat safe (Rat: Any)\
19481950
\\n Rat pre Rat safe (Bool)\
19491951
\\n Rat pre Rat safe (Bool: Any)\
1952+
\\n Rat pre FatRat safe ()\
1953+
\\n Rat pre FatRat safe (Int)\
1954+
\\n Rat pre FatRat safe (Int: Any)\
1955+
\\n Rat pre FatRat safe (Num)\
1956+
\\n Rat pre FatRat safe (Num: Any)\
1957+
\\n Rat pre FatRat safe (Rat)\
1958+
\\n Rat pre FatRat safe (Rat: Any)\
1959+
\\n Rat pre FatRat safe (Bool)\
1960+
\\n Rat pre FatRat safe (Bool: Any)\
19501961
\\n Bool pre Bool safe ()\
19511962
\\n Bool pre Bool safe (Int)\
19521963
\\n Bool pre Bool safe (Num)\

0 commit comments

Comments
 (0)