git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add unit :: forall a. a -> Unit
27366fcBrian McKenna
prelude/prelude.purs+4−1
@@ -21,7 +21,7 @@ module Prelude
21 , BoolLike, (&&), (||)
21 , BoolLike, (&&), (||)
22 , not
22 , not
23 , Semigroup, (<>), (++)
23 , Semigroup, (<>), (++)
24− , Unit(..)
24+ , Unit(..), unit
25 ) where
25 ) where
26
26
27 flip :: forall a b c. (a -> b -> c) -> b -> a -> c
27 flip :: forall a b c. (a -> b -> c) -> b -> a -> c
@@ -213,6 +213,9 @@ module Prelude
213
213
214 data Unit = Unit {}
214 data Unit = Unit {}
215
215
216+ unit :: forall a. a -> Unit
217+ unit = const (Unit {})
218+
216 infix 4 ==
219 infix 4 ==
217 infix 4 /=
220 infix 4 /=
218
221