@@ -49,84 +49,84 @@ floatLog x = foreign_ tyFloat "log" [(x, tyFloat)]
4949
5050primitives =
5151 -- operators
52− [Prim (UN ["prim__addInt"]) (ty [IType, IType] IType) 2 (iBin (+))
52+ [Prim (UN "prim__addInt") (ty [IType, IType] IType) 2 (iBin (+))
5353 (eOp E.plus_),
54− Prim (UN ["prim__subInt"]) (ty [IType, IType] IType) 2 (iBin (-))
54+ Prim (UN "prim__subInt") (ty [IType, IType] IType) 2 (iBin (-))
5555 (eOp E.minus_),
56− Prim (UN ["prim__mulInt"]) (ty [IType, IType] IType) 2 (iBin (*))
56+ Prim (UN "prim__mulInt") (ty [IType, IType] IType) 2 (iBin (*))
5757 (eOp E.times_),
58− Prim (UN ["prim__divInt"]) (ty [IType, IType] IType) 2 (iBin (div))
58+ Prim (UN "prim__divInt") (ty [IType, IType] IType) 2 (iBin (div))
5959 (eOp E.divide_),
60− Prim (UN ["prim__eqInt"]) (ty [IType, IType] IType) 2 (biBin (==))
60+ Prim (UN "prim__eqInt") (ty [IType, IType] IType) 2 (biBin (==))
6161 (eOp E.eq_),
62− Prim (UN ["prim__ltInt"]) (ty [IType, IType] IType) 2 (biBin (<))
62+ Prim (UN "prim__ltInt") (ty [IType, IType] IType) 2 (biBin (<))
6363 (eOp E.lt_),
64− Prim (UN ["prim__lteInt"]) (ty [IType, IType] IType) 2 (biBin (<=))
64+ Prim (UN "prim__lteInt") (ty [IType, IType] IType) 2 (biBin (<=))
6565 (eOp E.lte_),
66− Prim (UN ["prim__gtInt"]) (ty [IType, IType] IType) 2 (biBin (>))
66+ Prim (UN "prim__gtInt") (ty [IType, IType] IType) 2 (biBin (>))
6767 (eOp E.gt_),
68− Prim (UN ["prim__gteInt"]) (ty [IType, IType] IType) 2 (biBin (>=))
68+ Prim (UN "prim__gteInt") (ty [IType, IType] IType) 2 (biBin (>=))
6969 (eOp E.gte_),
70− Prim (UN ["prim__addBigInt"]) (ty [BIType, BIType] BIType) 2 (bBin (+))
70+ Prim (UN "prim__addBigInt") (ty [BIType, BIType] BIType) 2 (bBin (+))
7171 (eOpFn tyBigInt tyBigInt "addBig"),
72− Prim (UN ["prim__subBigInt"]) (ty [BIType, BIType] BIType) 2 (bBin (-))
72+ Prim (UN "prim__subBigInt") (ty [BIType, BIType] BIType) 2 (bBin (-))
7373 (eOpFn tyBigInt tyBigInt "subBig"),
74− Prim (UN ["prim__mulBigInt"]) (ty [BIType, BIType] BIType) 2 (bBin (*))
74+ Prim (UN "prim__mulBigInt") (ty [BIType, BIType] BIType) 2 (bBin (*))
7575 (eOpFn tyBigInt tyBigInt "mulBig"),
76− Prim (UN ["prim__divBigInt"]) (ty [BIType, BIType] BIType) 2 (bBin (div))
76+ Prim (UN "prim__divBigInt") (ty [BIType, BIType] BIType) 2 (bBin (div))
7777 (eOpFn tyBigInt tyBigInt "divBig"),
78− Prim (UN ["prim__eqBigInt"]) (ty [BIType, BIType] IType) 2 (bbBin (==))
78+ Prim (UN "prim__eqBigInt") (ty [BIType, BIType] IType) 2 (bbBin (==))
7979 (eOpFn tyBigInt tyInt "eqBig"),
80− Prim (UN ["prim__ltBigInt"]) (ty [BIType, BIType] IType) 2 (bbBin (<))
80+ Prim (UN "prim__ltBigInt") (ty [BIType, BIType] IType) 2 (bbBin (<))
8181 (eOpFn tyBigInt tyInt "ltBig"),
82− Prim (UN ["prim__lteBigInt"]) (ty [BIType, BIType] IType) 2 (bbBin (<=))
82+ Prim (UN "prim__lteBigInt") (ty [BIType, BIType] IType) 2 (bbBin (<=))
8383 (eOpFn tyBigInt tyInt "leBig"),
84− Prim (UN ["prim__gtBigInt"]) (ty [BIType, BIType] IType) 2 (bbBin (>))
84+ Prim (UN "prim__gtBigInt") (ty [BIType, BIType] IType) 2 (bbBin (>))
8585 (eOpFn tyBigInt tyInt "gtBig"),
86− Prim (UN ["prim__gtBigInt"]) (ty [BIType, BIType] IType) 2 (bbBin (>=))
86+ Prim (UN "prim__gtBigInt") (ty [BIType, BIType] IType) 2 (bbBin (>=))
8787 (eOpFn tyBigInt tyInt "geBig"),
88− Prim (UN ["prim__addFloat"]) (ty [FlType, FlType] FlType) 2 (fBin (+))
88+ Prim (UN "prim__addFloat") (ty [FlType, FlType] FlType) 2 (fBin (+))
8989 (eOp E.plusF_),
90− Prim (UN ["prim__subFloat"]) (ty [FlType, FlType] FlType) 2 (fBin (-))
90+ Prim (UN "prim__subFloat") (ty [FlType, FlType] FlType) 2 (fBin (-))
9191 (eOp E.minusF_),
92− Prim (UN ["prim__mulFloat"]) (ty [FlType, FlType] FlType) 2 (fBin (*))
92+ Prim (UN "prim__mulFloat") (ty [FlType, FlType] FlType) 2 (fBin (*))
9393 (eOp E.timesF_),
94− Prim (UN ["prim__divFloat"]) (ty [FlType, FlType] FlType) 2 (fBin (/))
94+ Prim (UN "prim__divFloat") (ty [FlType, FlType] FlType) 2 (fBin (/))
9595 (eOp E.divideF_),
96− Prim (UN ["prim__eqFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (==))
96+ Prim (UN "prim__eqFloat") (ty [FlType, FlType] IType) 2 (bfBin (==))
9797 (eOp E.eqF_),
98− Prim (UN ["prim__ltFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (<))
98+ Prim (UN "prim__ltFloat") (ty [FlType, FlType] IType) 2 (bfBin (<))
9999 (eOp E.ltF_),
100− Prim (UN ["prim__lteFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (<=))
100+ Prim (UN "prim__lteFloat") (ty [FlType, FlType] IType) 2 (bfBin (<=))
101101 (eOp E.lteF_),
102− Prim (UN ["prim__gtFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (>))
102+ Prim (UN "prim__gtFloat") (ty [FlType, FlType] IType) 2 (bfBin (>))
103103 (eOp E.gtF_),
104− Prim (UN ["prim__gteFloat"]) (ty [FlType, FlType] IType) 2 (bfBin (>=))
104+ Prim (UN "prim__gteFloat") (ty [FlType, FlType] IType) 2 (bfBin (>=))
105105 (eOp E.gteF_),
106− Prim (UN ["prim__concat"]) (ty [StrType, StrType] StrType) 2 (sBin (++))
106+ Prim (UN "prim__concat") (ty [StrType, StrType] StrType) 2 (sBin (++))
107107 ([E.name "x", E.name "y"], (fun "append") @@ fun "x" @@ fun "y"),
108108 -- Conversions
109− Prim (UN ["prim__strToInt"]) (ty [StrType] IType) 1 (c_strToInt)
109+ Prim (UN "prim__strToInt") (ty [StrType] IType) 1 (c_strToInt)
110110 ([E.name "x"], strToInt (fun "x")),
111− Prim (UN ["prim__intToStr"]) (ty [IType] StrType) 1 (c_intToStr)
111+ Prim (UN "prim__intToStr") (ty [IType] StrType) 1 (c_intToStr)
112112 ([E.name "x"], intToStr (fun "x")),
113− Prim (UN ["prim__intToBigInt"]) (ty [IType] BIType) 1 (c_intToBigInt)
113+ Prim (UN "prim__intToBigInt") (ty [IType] BIType) 1 (c_intToBigInt)
114114 ([E.name "x"], intToBigInt (fun "x")),
115− Prim (UN ["prim__strToBigInt"]) (ty [StrType] BIType) 1 (c_strToBigInt)
115+ Prim (UN "prim__strToBigInt") (ty [StrType] BIType) 1 (c_strToBigInt)
116116 ([E.name "x"], strToBigInt (fun "x")),
117− Prim (UN ["prim__bigIntToStr"]) (ty [BIType] StrType) 1 (c_bigIntToStr)
117+ Prim (UN "prim__bigIntToStr") (ty [BIType] StrType) 1 (c_bigIntToStr)
118118 ([E.name "x"], bigIntToStr (fun "x")),
119− Prim (UN ["prim__strToFloat"]) (ty [StrType] FlType) 1 (c_strToFloat)
119+ Prim (UN "prim__strToFloat") (ty [StrType] FlType) 1 (c_strToFloat)
120120 ([E.name "x"], strToFloat (fun "x")),
121− Prim (UN ["prim__floatToStr"]) (ty [FlType] StrType) 1 (c_floatToStr)
121+ Prim (UN "prim__floatToStr") (ty [FlType] StrType) 1 (c_floatToStr)
122122 ([E.name "x"], floatToStr (fun "x")),
123− Prim (UN ["prim__intToFloat"]) (ty [IType] FlType) 1 (c_intToFloat)
123+ Prim (UN "prim__intToFloat") (ty [IType] FlType) 1 (c_intToFloat)
124124 ([E.name "x"], intToFloat (fun "x")),
125− Prim (UN ["prim__floatToInt"]) (ty [FlType] IType) 1 (c_floatToInt)
125+ Prim (UN "prim__floatToInt") (ty [FlType] IType) 1 (c_floatToInt)
126126 ([E.name "x"], floatToInt (fun "x")),
127− Prim (UN ["prim__floatExp"]) (ty [FlType] FlType) 1 (p_floatExp)
127+ Prim (UN "prim__floatExp") (ty [FlType] FlType) 1 (p_floatExp)
128128 ([E.name "x"], floatExp (fun "x")),
129− Prim (UN ["prim__floatLog"]) (ty [FlType] FlType) 1 (p_floatLog)
129+ Prim (UN "prim__floatLog") (ty [FlType] FlType) 1 (p_floatLog)
130130 ([E.name "x"], floatLog (fun "x"))
131131 ]
132132