Make `unit` a value
commitb2cfe6f6a88c015960e133d83f60cc1604f813ce
authorGary Burgess <gary.burgess@gmail.com>
dateWed 7 May 2014, 21:33 (12 years ago)
parent2def2f6
examples/passing/Unit.purs+1−1
@@ -3,4 +3,4 @@ module Main where
33import Prelude
44import Debug.Trace
55
6−main = print (unit "Hello world")
6+main = print (const unit $ "Hello world")
prelude/prelude.purs+2−2
@@ -213,8 +213,8 @@ module Prelude
213213
214214 data Unit = Unit {}
215215
216− unit :: forall a. a -> Unit
217− unit = const (Unit {})
216+ unit :: Unit
217+ unit = Unit {}
218218
219219 infix 4 ==
220220 infix 4 /=