@@ -16,34 +16,11 @@ type ImportDict =
1616
1717prelude :: ImportDict
1818prelude =
19− Map.unions [ string, text, maybe, openImports ]
20− where
21− importing :: Module.Name -> [Var.Value] -> ImportDict
22− importing name values =
23− Map.singleton name ([], Var.Listing values False)
24−
25− openImports :: ImportDict
26− openImports =
27− Map.fromList $ map (\name -> (name, ([], Var.openListing))) $
28− [ ["Basics"], ["Signal"], ["List"], ["Time"], ["Color"]
29− , ["Graphics","Element"], ["Graphics","Collage"]
30− , ["Native","Ports"], ["Native","Json"]
31− ]
32−
33− maybe :: ImportDict
34− maybe = importing ["Maybe"] [ Var.ADT "Maybe" Var.openListing ]
35−
36− string :: ImportDict
37− string = importing ["String"] [Var.Value "show"]
38−
39− text :: ImportDict
40− text = importing ["Text"] (Var.ADT "Text" (Var.Listing [] False) : values)
41− where
42− values =
43− map Var.Value
44− [ "toText", "leftAligned", "rightAligned", "centered", "justified"
45− , "plainText", "asText", "typeface", "monospace", "bold", "italic"
46− ]
19+ Map.fromList $ map (\name -> (name, ([], Var.openListing))) $
20+ [ -- ["Basics"]
21+ ["Native","Ports"]
22+ , ["Native","Json"]
23+ ]
4724
4825
4926-- ADDING PRELUDE TO A MODULE