@@ -17,13 +17,13 @@ import Control.Monad (zipWithM)
17import Data.Function (on)
17import Data.Function (on)
18import qualified Data.List as List
18import qualified Data.List as List
19import qualified Data.Map as Map
19import qualified Data.Map as Map
20+import qualified Data.Name as Name
20import qualified Data.Set as Set
21import qualified Data.Set as Set
21import qualified Data.Text as Text
22import qualified Data.Text as Text
23import qualified Elm.Compiler.Module as Module
24import qualified Elm.Compiler.Module as Module
24import qualified Elm.Compiler.Type as Type
25import qualified Elm.Compiler.Type as Type
25import qualified Elm.Docs as Docs
26import qualified Elm.Docs as Docs
26−import qualified Elm.Name as N
27import qualified Elm.Package as Pkg
27import qualified Elm.Package as Pkg
@@ -41,10 +41,10 @@ data PackageChanges =
42data ModuleChanges =
42data ModuleChanges =
43 ModuleChanges
43 ModuleChanges
44− { _unions :: Changes N.Name Docs.Union
44+ { _unions :: Changes Name.Name Docs.Union
45− , _aliases :: Changes N.Name Docs.Alias
45+ , _aliases :: Changes Name.Name Docs.Alias
46− , _values :: Changes N.Name Docs.Value
46+ , _values :: Changes Name.Name Docs.Value
47− , _binops :: Changes N.Name Docs.Binop
47+ , _binops :: Changes Name.Name Docs.Binop
@@ -144,7 +144,7 @@ isEquivalentBinop (Docs.Binop c1 t1 a1 p1) (Docs.Binop c2 t2 a2 p2) =
144-- DIFF TYPES
144-- DIFF TYPES
147−diffType :: Type.Type -> Type.Type -> Maybe [(N.Name,N.Name)]
147+diffType :: Type.Type -> Type.Type -> Maybe [(Name.Name,Name.Name)]
148diffType oldType newType =
148diffType oldType newType =
149 case (oldType, newType) of
149 case (oldType, newType) of
150 (Type.Var oldName, Type.Var newName) ->
150 (Type.Var oldName, Type.Var newName) ->
@@ -192,11 +192,11 @@ diffType oldType newType =
194-- handle very old docs that do not use qualified names
194-- handle very old docs that do not use qualified names
195−isSameName :: N.Name -> N.Name -> Bool
195+isSameName :: Name.Name -> Name.Name -> Bool
196isSameName oldFullName newFullName =
196isSameName oldFullName newFullName =
198 dedot name =
198 dedot name =
199− reverse (Text.splitOn "." (N.toText name))
199+ reverse (Text.splitOn "." (Name.toText name))
201 case ( dedot oldFullName, dedot newFullName ) of
201 case ( dedot oldFullName, dedot newFullName ) of
202 (oldName:[], newName:_) ->
202 (oldName:[], newName:_) ->
@@ -209,7 +209,7 @@ isSameName oldFullName newFullName =
209 oldFullName == newFullName
209 oldFullName == newFullName
212−diffFields :: [(N.Name, Type.Type)] -> [(N.Name, Type.Type)] -> Maybe [(N.Name,N.Name)]
212+diffFields :: [(Name.Name, Type.Type)] -> [(Name.Name, Type.Type)] -> Maybe [(Name.Name,Name.Name)]
213diffFields oldRawFields newRawFields =
213diffFields oldRawFields newRawFields =
215 sort = List.sortBy (compare `on` fst)
215 sort = List.sortBy (compare `on` fst)
@@ -230,7 +230,7 @@ diffFields oldRawFields newRawFields =
230-- TYPE VARIABLES
230-- TYPE VARIABLES
233−isEquivalentRenaming :: [(N.Name,N.Name)] -> Bool
233+isEquivalentRenaming :: [(Name.Name,Name.Name)] -> Bool
234isEquivalentRenaming varPairs =
234isEquivalentRenaming varPairs =
236 renamings =
236 renamings =
@@ -263,7 +263,7 @@ isEquivalentRenaming varPairs =
263 allUnique (map snd verifiedRenamings)
263 allUnique (map snd verifiedRenamings)
266−compatibleVars :: (N.Name, N.Name) -> Bool
266+compatibleVars :: (Name.Name, Name.Name) -> Bool
267compatibleVars (old, new) =
267compatibleVars (old, new) =
268 case (categorizeVar old, categorizeVar new) of
268 case (categorizeVar old, categorizeVar new) of
269 (CompAppend, CompAppend) -> True
269 (CompAppend, CompAppend) -> True
@@ -285,13 +285,13 @@ data TypeVarCategory
288−categorizeVar :: N.Name -> TypeVarCategory
288+categorizeVar :: Name.Name -> TypeVarCategory
289categorizeVar name
289categorizeVar name
290− | N.startsWith "compappend" name = CompAppend
290+ | Name.isCompappendType name = CompAppend
291− | N.startsWith "comparable" name = Comparable
291+ | Name.isComparableType name = Comparable
292− | N.startsWith "appendable" name = Appendable
292+ | Name.isAppendableType name = Appendable
293− | N.startsWith "number" name = Number
293+ | Name.isNumberType name = Number
294− | otherwise = Var
294+ | otherwise = Var