on master help sign in
Import parts of Platform by default
9f6244bEvan Czaplicki
src/Elm/Compiler/Imports.hs+6−1
@@ -17,10 +17,15 @@ 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− , ["Signal"] ==> exposing [Var.Alias "Signal"]
20+ , ["Platform"] ==> exposing (map closedType ["Cmd", "Sub", "Program"])
21 ]
21 ]
22
22
23
23
24exposing :: [Var.Value] -> Module.ImportMethod
24exposing :: [Var.Value] -> Module.ImportMethod
25exposing vars =
25exposing vars =
26 Module.ImportMethod Nothing (Var.listing vars)
26 Module.ImportMethod Nothing (Var.listing vars)
27+
28+
29+closedType :: String -> Var.Value
30+closedType name =
31+ Var.Union name Var.closedListing