on master help sign in
Move the definition of the Signal type out of the compiler and into the Signal library
6ace8a0Evan Czaplicki
compiler/Type/Environment.hs+1−1
@@ -51,7 +51,7 @@ makeTypes datatypes =
51
51
52 builtins :: [(String,Int)]
52 builtins :: [(String,Int)]
53 builtins = concat [ map tuple [0..9]
53 builtins = concat [ map tuple [0..9]
54− , kind 1 ["_List","Signal"]
54+ , kind 1 ["_List"]
55 , kind 0 ["Int","Float","Char","Bool"]
55 , kind 0 ["Int","Float","Char","Bool"]
56 ]
56 ]
57
57
libraries/Signal.elm+4
@@ -10,6 +10,10 @@ module Signal where
10import Native.Signal as Native
10import Native.Signal as Native
11import List (foldr)
11import List (foldr)
12
12
13+data Signal a = Signal
14+-- = Constant a
15+-- | Lift (a -> a) (Signal a)
16+
13-- Create a constant signal that never changes.
17-- Create a constant signal that never changes.
14constant : a -> Signal a
18constant : a -> Signal a
15constant = Native.constant
19constant = Native.constant