git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add unit :: forall a. a -> Unit
commit27366fca2a4a1d152a244ee34bcf27d508864284 authorBrian McKenna <brian@simpleenergy.com> dateWed 7 May 2014, 10:56 (12 years ago) parent66b09a8
1 file changed+4−1
prelude/prelude.purs+4−1
prelude/prelude.purs+4−1
@@ -21,7 +21,7 @@ module Prelude
2121 , BoolLike, (&&), (||)
2222 , not
2323 , Semigroup, (<>), (++)
24− , Unit(..)
24+ , Unit(..), unit
2525 ) where
2626
2727 flip :: forall a b c. (a -> b -> c) -> b -> a -> c
@@ -213,6 +213,9 @@ module Prelude
213213
214214 data Unit = Unit {}
215215
216+ unit :: forall a. a -> Unit
217+ unit = const (Unit {})
218+
216219 infix 4 ==
217220 infix 4 /=
218221