on master help sign in
cosmetic: modernize whitespace
commita79d2d41d70bc5d27288812f0498aaa754e2f601 authorEvan Czaplicki <info@elm-lang.org> dateMon 1 Feb 2016, 10:20 (11 years ago) parent09e0b44
1 file changed+14−4
src/AST/Declaration.hs+14−4
src/AST/Declaration.hs+14−4
@@ -11,8 +11,10 @@ import qualified AST.Type as Type
1111import qualified Reporting.Annotation as A
1212
1313
14+
1415-- DECLARATIONS
1516
17+
1618data Declaration' port def tipe expr
1719 = Definition def
1820 | Datatype String [String] [(String, [tipe])]
@@ -21,22 +23,26 @@ data Declaration' port def tipe expr
2123 | Fixity Assoc Int String
2224
2325
26+
2427-- INFIX STUFF
2528
29+
2630data Assoc = L | N | R
2731 deriving (Eq)
2832
2933
3034assocToString :: Assoc -> String
3135assocToString assoc =
32− case assoc of
33− L -> "left"
34− N -> "non"
35− R -> "right"
36+ case assoc of
37+ L -> "left"
38+ N -> "non"
39+ R -> "right"
40+
3641
3742
3843-- DECLARATION PHASES
3944
45+
4046type SourceDecl' =
4147 Declaration' SourcePort Source.Def Type.Raw Source.Expr
4248
@@ -54,8 +60,10 @@ type CanonicalDecl =
5460 A.Commented (Declaration' CanonicalPort Canonical.Def Type.Canonical Canonical.Expr)
5561
5662
63+
5764-- PORTS
5865
66+
5967data SourcePort
6068 = PortAnnotation String Type.Raw
6169 | PortDefinition String Source.Expr
@@ -77,8 +85,10 @@ validPortName port =
7785 Out name _ _ -> name
7886
7987
88+
8089-- BINARY CONVERSION
8190
91+
8292instance Binary Assoc where
8393 get =
8494 do n <- getWord8