on master help sign in
Add more NOINLINE names
5c0adddEvan Czaplicki
src/AST/Module/Name.hs+17−7
@@ -2,7 +2,7 @@
2{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE OverloadedStrings #-}
3module AST.Module.Name
3module AST.Module.Name
4 ( Canonical(..)
4 ( Canonical(..)
5− , basics, char, string
5+ , basics, char, string, debug
6 , maybe, list, array
6 , maybe, list, array
7 , platform, cmd, sub
7 , platform, cmd, sub
8 , jsonDecode, jsonEncode
8 , jsonDecode, jsonEncode
@@ -32,7 +32,12 @@ data Canonical =
32 { _package :: !Pkg.Name
32 { _package :: !Pkg.Name
33 , _module :: !N.Name
33 , _module :: !N.Name
34 }
34 }
35− deriving (Eq, Ord)
35+ deriving (Ord)
36+
37+
38+instance Eq Canonical where
39+ (==) (Canonical pkg home) (Canonical pkg' home') =
40+ home == home' && pkg == pkg'
36
41
37
42
38
43
@@ -46,12 +51,17 @@ basics = Canonical Pkg.core "Basics"
46
51
47{-# NOINLINE char #-}
52{-# NOINLINE char #-}
48char :: Canonical
53char :: Canonical
49−char = Canonical Pkg.core "Char"
54+char = Canonical Pkg.core N.char
50
55
51
56
52{-# NOINLINE string #-}
57{-# NOINLINE string #-}
53string :: Canonical
58string :: Canonical
54−string = Canonical Pkg.core "String"
59+string = Canonical Pkg.core N.string
60+
61+
62+{-# NOINLINE debug #-}
63+debug :: Canonical
64+debug = Canonical Pkg.core N.debug
55
65
56
66
57
67
@@ -60,17 +70,17 @@ string = Canonical Pkg.core "String"
60
70
61{-# NOINLINE maybe #-}
71{-# NOINLINE maybe #-}
62maybe :: Canonical
72maybe :: Canonical
63−maybe = Canonical Pkg.core "Maybe"
73+maybe = Canonical Pkg.core N.maybe
64
74
65
75
66{-# NOINLINE list #-}
76{-# NOINLINE list #-}
67list :: Canonical
77list :: Canonical
68−list = Canonical Pkg.core "List"
78+list = Canonical Pkg.core N.list
69
79
70
80
71{-# NOINLINE array #-}
81{-# NOINLINE array #-}
72array :: Canonical
82array :: Canonical
73−array = Canonical Pkg.core "Array"
83+array = Canonical Pkg.core N.array
74
84
75
85
76
86
src/Elm/Name.hs+17−2
@@ -6,12 +6,12 @@ module Elm.Name
6 , int, float, bool, char, string
6 , int, float, bool, char, string
7 , maybe, list, array
7 , maybe, list, array
8 , task, router, cmd, sub
8 , task, router, cmd, sub
9− , shader
9+ , shader, debug, utils, negate
10 )
10 )
11 where
11 where
12
12
13
13
14−import Prelude hiding (maybe)
14+import Prelude hiding (maybe, negate)
15import qualified Data.Text as Text
15import qualified Data.Text as Text
16
16
17
17
@@ -90,3 +90,18 @@ sub = "Sub"
90{-# NOINLINE shader #-}
90{-# NOINLINE shader #-}
91shader :: Name
91shader :: Name
92shader = "Shader"
92shader = "Shader"
93+
94+
95+{-# NOINLINE debug #-}
96+debug :: Name
97+debug = "Debug"
98+
99+
100+{-# NOINLINE utils #-}
101+utils :: Name
102+utils = "Utils"
103+
104+
105+{-# NOINLINE negate #-}
106+negate :: Name
107+negate = "negate"