@@ -22,13 +22,15 @@ add noPrelude (Module name path exs ims decls) =
2222 Just _ -> []
2323
2424prelude :: [(String, ImportMethod)]
25−prelude = text : string : map (\n -> (n, Module.open)) modules
25+prelude = string : text : maybe : map (\n -> (n, Module.open)) modules
2626 where
27− string = ("String", Module.importing [Var.Value "show"])
28− modules = [ "Basics", "Signal", "List", "Maybe", "Time", "Color"
27+ modules = [ "Basics", "Signal", "List", "Time", "Color"
2928 , "Graphics.Element", "Graphics.Collage"
3029 , "Native.Ports", "Native.Json"
3130 ]
31+
32+ string = ("String", Module.importing [Var.Value "show"])
33+
3234 text = ("Text", Module.importing textImports)
3335 textImports =
3436 Var.ADT "Text" (Var.Listing [] False) : map Var.Value
@@ -36,6 +38,10 @@ prelude = text : string : map (\n -> (n, Module.open)) modules
3638 , "plainText", "asText", "typeface", "monospace", "bold", "italic"
3739 ]
3840
41+ maybe =
42+ let imports = [ Var.ADT "Maybe" (Var.Listing ["Just", "Nothing"] False) ]
43+ in ("Maybe", Module.importing imports)
44+
3945interfaces :: Bool -> IO Interfaces
4046interfaces noPrelude =
4147 if noPrelude