@@ -21,13 +21,12 @@ import qualified Data.List as List
21import qualified Data.Map as Map
21import qualified Data.Map as Map
22import qualified Data.Maybe as Maybe
22import qualified Data.Maybe as Maybe
23import qualified Data.Name as Name
23import qualified Data.Name as Name
24−import Data.Utf8 (Utf8)
24+import qualified Data.Utf8 as Utf8
26import qualified AST.Canonical as Can
26import qualified AST.Canonical as Can
27import qualified Data.Index as Index
27import qualified Data.Index as Index
28import qualified Elm.ModuleName as ModuleName
28import qualified Elm.ModuleName as ModuleName
29import qualified Reporting.Annotation as A
29import qualified Reporting.Annotation as A
30−import qualified Reporting.Region as R
@@ -41,8 +40,8 @@ data Pattern
43data Literal
42data Literal
44− = Chr Utf8
43+ = Chr Utf8.String
45− | Str Utf8
44+ | Str Utf8.String
47 deriving (Eq)
46 deriving (Eq)
@@ -189,8 +188,8 @@ nilName = "[]"
191data Error
190data Error
192− = Incomplete R.Region Context [Pattern]
191+ = Incomplete A.Region Context [Pattern]
193− | Redundant R.Region R.Region Int
192+ | Redundant A.Region A.Region Int
196data Context
195data Context
@@ -204,7 +203,7 @@ data Context
206check :: Can.Module -> Either [Error] ()
205check :: Can.Module -> Either [Error] ()
207−check (Can.Module _ _ _ decls _ _ _ _) =
206+check (Can.Module _ _ decls _ _ _ _) =
208 case checkDecls decls [] of
207 case checkDecls decls [] of
@@ -351,7 +350,7 @@ checkExpr (A.At region expression) errors =
351 Just c ->
350 Just c ->
352 checkExpr c errors
351 checkExpr c errors
354− Can.Shader _ _ _ ->
353+ Can.Shader _ _ ->
@@ -377,7 +376,7 @@ checkIfBranch (condition, branch) errs =
377-- CHECK CASE EXPRESSION
376-- CHECK CASE EXPRESSION
380−checkCases :: R.Region -> [Can.CaseBranch] -> [Error] -> [Error]
379+checkCases :: A.Region -> [Can.CaseBranch] -> [Error] -> [Error]
381checkCases region branches errors =
380checkCases region branches errors =
383 (patterns, newErrors) =
382 (patterns, newErrors) =
@@ -397,7 +396,7 @@ checkCaseBranch (Can.CaseBranch pattern expr) (patterns, errors) =
397-- CHECK PATTERNS
396-- CHECK PATTERNS
400−checkPatterns :: R.Region -> Context -> [Can.Pattern] -> [Error] -> [Error]
399+checkPatterns :: A.Region -> Context -> [Can.Pattern] -> [Error] -> [Error]
401checkPatterns region context patterns errors =
400checkPatterns region context patterns errors =
402 case toNonRedundantRows region patterns of
401 case toNonRedundantRows region patterns of
403 Left err ->
402 Left err ->
@@ -480,13 +479,13 @@ recoverCtor union name arity patterns =
482-- INVARIANT: Produces a list of rows where (forall row. length row == 1)
481-- INVARIANT: Produces a list of rows where (forall row. length row == 1)
483−toNonRedundantRows :: R.Region -> [Can.Pattern] -> Either Error [[Pattern]]
482+toNonRedundantRows :: A.Region -> [Can.Pattern] -> Either Error [[Pattern]]
484toNonRedundantRows region patterns =
483toNonRedundantRows region patterns =
485 toSimplifiedUsefulRows region [] patterns
484 toSimplifiedUsefulRows region [] patterns
488-- INVARIANT: Produces a list of rows where (forall row. length row == 1)
487-- INVARIANT: Produces a list of rows where (forall row. length row == 1)
489−toSimplifiedUsefulRows :: R.Region -> [[Pattern]] -> [Can.Pattern] -> Either Error [[Pattern]]
488+toSimplifiedUsefulRows :: A.Region -> [[Pattern]] -> [Can.Pattern] -> Either Error [[Pattern]]
490toSimplifiedUsefulRows overallRegion checkedRows uncheckedPatterns =
489toSimplifiedUsefulRows overallRegion checkedRows uncheckedPatterns =
491 case uncheckedPatterns of
490 case uncheckedPatterns of