1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
20import qualified Data.Map.Strict as Map
22import qualified AST.Canonical as Can
23import qualified Data.Index as Index
24import qualified Elm.Name as N
25import qualified Reporting.Annotation as A
26import qualified Reporting.Region as R
27import Type.Type (Type, Variable)
37 | CEqual R.Region Category Type (Expected Type)
38 | CLocal R.Region N.Name (Expected Type)
39 | CForeign R.Region N.Name Can.Annotation (Expected Type)
40 | CPattern R.Region PCategory Type (PExpected Type)
46 , _neq :: IO Constraint
49 { _rigidVars :: [Variable]
50 , _flexVars :: [Variable]
51 , _header :: Map.Map N.Name (A.Located Type)
52 , _headerCon :: Constraint
53 , _bodyCon :: Constraint
57exists :: [Variable] -> Constraint -> Constraint
58exists flexVars constraint =
59 CLet [] flexVars Map.empty constraint CTrue
63-- EXPRESSION EXPECTATIONS
68 | FromContext R.Region Context tipe
69 | FromAnnotation N.Name Int SubContext tipe
73 = ListEntry Index.ZeroBased
78 | IfBranch Index.ZeroBased
79 | CaseBranch Index.ZeroBased
80 | CallArg MaybeName Index.ZeroBased
81 | TooManyArgs MaybeName Int
88 = TypedIfBranch Index.ZeroBased
89 | TypedCaseBranch Index.ZeroBased
108 | CallResult MaybeName
120-- PATTERN EXPECTATIONS
124 = PNoExpectation tipe
125 | PFromContext R.Region PContext tipe
129 = PTypedArg N.Name Index.ZeroBased
130 | PCaseMatch Index.ZeroBased
131 | PCtorArg N.Name Index.ZeroBased
132 | PListEntry Index.ZeroBased
151typeReplace :: Expected Type -> Can.Type -> Expected Can.Type
152typeReplace expectation tipe =
157 FromContext region context _ ->
158 FromContext region context tipe
160 FromAnnotation name arity context _ ->
161 FromAnnotation name arity context tipe
164ptypeReplace :: PExpected Type -> Can.Type -> PExpected Can.Type
165ptypeReplace expectation tipe =
170 PFromContext region context _ ->
171 PFromContext region context tipe
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