on ccc6bc5 help sign in
elk/src/AST/Expression/Valid.hs
41 lines 968 B history raw
1{-# OPTIONS_GHC -Wall #-}
2module AST.Expression.Valid where
4import qualified AST.Expression.General as General
5import qualified AST.Pattern as Pattern
6import qualified AST.Type as Type
7import qualified AST.Variable as Var
8import qualified Reporting.Annotation as A
9import qualified Reporting.Region as R
12{-| "Normal" expressions. When the compiler checks that type annotations and
13ports are all paired with definitions in the appropriate order, it collapses
14them into a Def that is easier to work with in later phases of compilation.
15-}
16type Expr =
17 General.Expr R.Region Def Var.Raw Type.Raw
20type Expr' =
21 General.Expr' R.Region Def Var.Raw Type.Raw
24data Def
25 = Definition Pattern.Raw Expr (Maybe Type.Raw)
28data Effects
29 = None
30 | Effects [A.Commented Def] [A.Commented Def]
31 | ForeignEffects [A.Commented ForeignCmd] [A.Commented ForeignSub]
34data ForeignCmd
35 = Cmd String Type.Raw
38data ForeignSub
39 = Sub String Type.Raw
40 | SubWith String Expr