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 | CLookup R.Region N.Name (Expected Type)
39 | CInstance R.Region FuncName 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 (Maybe FuncName) Index.ZeroBased
88 = TypedIfBranch Index.ZeroBased
89 | TypedCaseBranch Index.ZeroBased
107 | CallResult (Maybe FuncName)
119-- PATTERN EXPECTATIONS
123 = PNoExpectation tipe
124 | PFromContext R.Region PContext tipe
128 = PTypedArg N.Name Index.ZeroBased
129 | PCaseMatch Index.ZeroBased
130 | PCtorArg N.Name Index.ZeroBased
131 | PListEntry Index.ZeroBased
150typeReplace :: Expected Type -> Can.Type -> Expected Can.Type
151typeReplace expectation tipe =
156 FromContext region context _ ->
157 FromContext region context tipe
159 FromAnnotation name arity context _ ->
160 FromAnnotation name arity context tipe
163ptypeReplace :: PExpected Type -> Can.Type -> PExpected Can.Type
164ptypeReplace expectation tipe =
169 PFromContext region context _ ->
170 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