on master help sign in
cosmetic: more vertical whitespace
commit13058838d3ed23282d33dd6f895a7b7d5158c030 authorEvan Czaplicki <info@elm-lang.org> dateMon 1 Feb 2016, 10:10 (11 years ago) parentb551630
1 file changed+10
src/Elm/Compiler/Module.hs+10
src/Elm/Compiler/Module.hs+10
@@ -28,8 +28,10 @@ import qualified Elm.Compiler.Type.Extract as Extract
2828import qualified Elm.Package as Package
2929
3030
31+
3132-- INTERFACES
3233
34+
3335type Interface = Module.Interface
3436
3537
@@ -46,8 +48,10 @@ interfaceAliasedTypes interface =
4648 Map.map Extract.toAliasedType (Module.iTypes interface)
4749
4850
51+
4952-- NAMES
5053
54+
5155newtype Name = Name ModuleName.Raw
5256 deriving (Eq, Ord)
5357
@@ -65,8 +69,10 @@ defaultImports =
6569 map (Name . fst) Imports.defaults
6670
6771
72+
6873-- STRING CONVERSIONS for NAMES
6974
75+
7076nameToPath :: Name -> FilePath
7177nameToPath (Name names) =
7278 List.foldl1 (</>) names
@@ -111,8 +117,10 @@ fromString sep raw =
111117 Char.isAlphaNum char || char `elem` "_'"
112118
113119
120+
114121-- JSON for NAME
115122
123+
116124instance Json.ToJSON Name where
117125 toJSON name =
118126 Json.toJSON (nameToString name)
@@ -128,8 +136,10 @@ instance Json.FromJSON Name where
128136 parseJSON _ = mzero
129137
130138
139+
131140-- BINARY for NAME
132141
142+
133143instance Binary Name where
134144 get =
135145 fmap Name get