@@ -21,6 +21,7 @@ module Prelude
21 , BoolLike, (&&), (||)
21 , BoolLike, (&&), (||)
23 , Semigroup, (<>), (++)
23 , Semigroup, (<>), (++)
26 flip :: forall a b c. (a -> b -> c) -> b -> a -> c
27 flip :: forall a b c. (a -> b -> c) -> b -> a -> c
@@ -79,6 +80,9 @@ module Prelude
79 \ return JSON.stringify(s);\
80 \ return JSON.stringify(s);\
80 \}" :: String -> String
81 \}" :: String -> String
83+ instance showUnit :: Show Unit where
84+ show (Unit {}) = "Unit {}"
82 instance showString :: Show String where
86 instance showString :: Show String where
83 show = showStringImpl
87 show = showStringImpl
@@ -207,6 +211,11 @@ module Prelude
207 (%) = numMod
211 (%) = numMod
208 negate = numNegate
212 negate = numNegate
216+ unit :: forall a. a -> Unit
217+ unit = const (Unit {})
210 infix 4 ==
219 infix 4 ==
211 infix 4 /=
220 infix 4 /=
@@ -228,6 +237,10 @@ module Prelude
229 \}" :: forall a. a -> a -> Boolean
238 \}" :: forall a. a -> a -> Boolean
240+ instance eqUnit :: Eq Unit where
241+ (==) (Unit {}) (Unit {}) = true
242+ (/=) (Unit {}) (Unit {}) = false
231 instance eqString :: Eq String where
244 instance eqString :: Eq String where
232 (==) = refEq
245 (==) = refEq
233 (/=) = refIneq
246 (/=) = refIneq
@@ -297,6 +310,9 @@ module Prelude
297 \ return n1 < n2 ? LT : n1 > n2 ? GT : EQ;\
310 \ return n1 < n2 ? LT : n1 > n2 ? GT : EQ;\
299 \}" :: forall a. a -> a -> Ordering
312 \}" :: forall a. a -> a -> Ordering
314+ instance ordUnit :: Ord Unit where
315+ compare (Unit {}) (Unit {}) = EQ
301 instance ordBoolean :: Ord Boolean where
317 instance ordBoolean :: Ord Boolean where
302 compare false false = EQ
318 compare false false = EQ
@@ -421,6 +437,9 @@ module Prelude
422 \}" :: String -> String -> String
438 \}" :: String -> String -> String
440+ instance semigroupUnit :: Semigroup Unit where
441+ (<>) (Unit {}) (Unit {}) = Unit {}
424 instance semigroupString :: Semigroup String where
443 instance semigroupString :: Semigroup String where
425 (<>) = concatString
444 (<>) = concatString