@@ -128,8 +128,9 @@ concreteSignals =
128128-------- Math and Binops --------
129129
130130binop t = t ==> t ==> t
131−numScheme t name = (name, Forall [0] [VarT 0 :<: number] (t (VarT 0)))
132−timeScheme name t = (name, Forall [0] [VarT 0 :<: time] (t (VarT 0)))
131+scheme1 super t name = (name, Forall [0] [VarT 0 :<: super] (t (VarT 0)))
132+numScheme t name = scheme1 number t name
133+timeScheme name t = scheme1 time t name
133134twoNums f name =
134135 (,) name . Forall [0,1] [ VarT 0 :<: number, VarT 1 :<: number ] $
135136 f (VarT 0) (VarT 1)
@@ -148,8 +149,10 @@ math =
148149bools =
149150 [ "not" -: bool ==> bool ] ++
150151 hasType (binop bool) ["&&","||"] ++
151− map (numScheme (\n -> n ==> n ==> bool)) ["<",">","<=",">="]
152−
152+ map (scheme1 comparable (\t -> t ==> t ==> bool)) ["<",">","<=",">="] ++
153+ [ ( "compare"
154+ , Forall [0,1] [ VarT 0 :<: comparable ] (VarT 0 ==> VarT 0 ==> VarT 1) )
155+ ]
153156
154157-------- Polymorphic Functions --------
155158