1{-# OPTIONS_GHC -Wall #-}
2module AST.Declaration where
6import qualified AST.Expression.Source as Source
7import qualified AST.Expression.Valid as Valid
8import qualified AST.Expression.Canonical as Canonical
9import qualified AST.Type as Type
10import qualified Reporting.Annotation as A
17data Decl def tipe expr
19 | Union String [String] [(String, [tipe])]
20 | Alias String [String] tipe
21 | Fixity Assoc Int String
29 CommentOr (A.Located SourceOrDefine)
34 | Define EffectType [CommentOr (A.Located Source.Effect)]
38 Decl Source.Def Type.Raw Source.Expr
46 Decl Valid.Def Type.Raw Valid.Expr
50 A.Commented (Decl Canonical.Def Type.Canonical Canonical.Expr)
58 = Comment (A.Located String)
74effectTypeToString :: EffectType -> String
75effectTypeToString tipe =
87 "foreign subscriptions"
98assocToString :: Assoc -> String
115instance Binary Assoc where
122 _ -> error "Error reading valid associativity from serialized string"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list