1{-# OPTIONS_GHC -Wall #-}
2module AST.Declaration where
6import qualified AST.Expression.General as General
7import qualified AST.Expression.Source as Source
8import qualified AST.Expression.Valid as Valid
9import qualified AST.Expression.Canonical as Canonical
10import qualified AST.Type as Type
11import qualified Reporting.Annotation as A
16data Declaration' port def tipe expr
18 | Datatype String [String] [(String, [tipe])]
19 | TypeAlias String [String] tipe
21 | Fixity Assoc Int String
30assocToString :: Assoc -> String
41 Declaration' SourcePort Source.Def Type.Raw Source.Expr
46 | Decl (A.Located SourceDecl')
50 A.Commented (Declaration' ValidPort Valid.Def Type.Raw Valid.Expr)
54 A.Commented (Declaration' CanonicalPort Canonical.Def Type.Canonical Canonical.Expr)
60 = PortAnnotation String Type.Raw
61 | PortDefinition String Source.Expr
66 | Out String Valid.Expr Type.Raw
70 = CanonicalPort (General.PortImpl Canonical.Expr Type.Canonical)
73validPortName :: ValidPort -> String
82instance Binary Assoc where
89 _ -> 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