1{-# OPTIONS_GHC -Wall #-}
3module AST.Expression.Source where
6import Text.PrettyPrint as P
7import qualified AST.Expression.General as General
8import AST.Type (RawType)
9import qualified AST.Variable as Var
10import qualified AST.Annotation as Annotation
11import qualified AST.Pattern as Pattern
14{-| Expressions created by the parser. These use a split representation of type
15annotations and definitions, which is how they appear in source code and how
18type Expr = General.Expr Annotation.Region Def Var.Raw
19type Expr' = General.Expr' Annotation.Region Def Var.Raw
22 = Definition Pattern.RawPattern Expr
23 | TypeAnnotation String RawType
26instance Pretty Def where
29 TypeAnnotation name tipe ->
30 variable name <+> P.colon <+> pretty tipe
31 Definition pattern expr ->
32 pretty pattern <+> P.equals <+> pretty expr
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