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
18data Declaration' port def tipe expr
20 | Datatype String [String] [(String, [tipe])]
21 | TypeAlias String [String] tipe
23 | Fixity Assoc Int String
34assocToString :: Assoc -> String
47 Declaration' SourcePort Source.Def Type.Raw Source.Expr
52 | Decl (A.Located SourceDecl')
56 A.Commented (Declaration' ValidPort Valid.Def Type.Raw Valid.Expr)
60 A.Commented (Declaration' CanonicalPort Canonical.Def Type.Canonical Canonical.Expr)
68 = PortAnnotation String Type.Raw
69 | PortDefinition String Source.Expr
74 | Out String Valid.Expr Type.Raw
78 = CanonicalPort (General.PortImpl Canonical.Expr Type.Canonical)
81validPortName :: ValidPort -> String
92instance Binary Assoc where
99 _ -> 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