Move the definition of the Signal type out of the compiler and into the Signal library
commit6ace8a0bf7e6c74f0c8b28b71eff82045da9755e
authorEvan Czaplicki <info@elm-lang.org>
dateMon 29 Jul 2013, 15:47 (13 years ago)
parent0f3910d
compiler/Type/Environment.hs+1−1
@@ -51,7 +51,7 @@ makeTypes datatypes =
5151
5252 builtins :: [(String,Int)]
5353 builtins = concat [ map tuple [0..9]
54− , kind 1 ["_List","Signal"]
54+ , kind 1 ["_List"]
5555 , kind 0 ["Int","Float","Char","Bool"]
5656 ]
5757
libraries/Signal.elm+4
@@ -10,6 +10,10 @@ module Signal where
1010import Native.Signal as Native
1111import List (foldr)
1212
13+data Signal a = Signal
14+-- = Constant a
15+-- | Lift (a -> a) (Signal a)
16+
1317-- Create a constant signal that never changes.
1418constant : a -> Signal a
1519constant = Native.constant