on master help sign in
Switch to having Cmd and Sub live in their own modules
eb7febaEvan Czaplicki
src/AST/Variable.hs+2−2
@@ -72,12 +72,12 @@ inCore home name =
72
72
73cmd :: Canonical
73cmd :: Canonical
74cmd =
74cmd =
75− inCore ["Platform"] "Cmd"
75+ inCore ["Platform","Cmd"] "Cmd"
76
76
77
77
78sub :: Canonical
78sub :: Canonical
79sub =
79sub =
80− inCore ["Platform"] "Sub"
80+ inCore ["Platform","Sub"] "Sub"
81
81
82
82
83
83
src/Elm/Compiler/Imports.hs+10−2
@@ -17,7 +17,9 @@ defaults =
17 , ["List"] ==> exposing [Var.Value "::"]
17 , ["List"] ==> exposing [Var.Value "::"]
18 , ["Maybe"] ==> exposing [Var.Union "Maybe" Var.openListing]
18 , ["Maybe"] ==> exposing [Var.Union "Maybe" Var.openListing]
19 , ["Result"] ==> exposing [Var.Union "Result" Var.openListing]
19 , ["Result"] ==> exposing [Var.Union "Result" Var.openListing]
20− , ["Platform"] ==> exposing (map closedType ["Cmd", "Sub", "Program"])
20+ , ["Platform"] ==> exposing [closedType "Program"]
21+ , ["Platform","Cmd"] ==> named "Cmd" [closedType "Cmd", Var.Value "!"]
22+ , ["Platform","Sub"] ==> named "Sub" [closedType "Sub"]
21 ]
23 ]
22
24
23
25
@@ -28,4 +30,10 @@ exposing vars =
28
30
29closedType :: String -> Var.Value
31closedType :: String -> Var.Value
30closedType name =
32closedType name =
31− Var.Union name Var.closedListing
33+ Var.Union name Var.closedListing
34+
35+
36+named :: String -> [Var.Value] -> Module.ImportMethod
37+named name vars =
38+ Module.ImportMethod (Just name) (Var.listing vars)
39+