on master help sign in
Switch Text to N.Name in Type.Type and Type.State
commitf3ae567a5e0ae5da0cbdb4011d757f7383e51d92 authorEvan Czaplicki <evancz@users.noreply.github.com> dateMon 6 Nov 2017, 15:00 (9 years ago) parent27cee06
2 files changed+12−12
src/Type/State.hs+3−3 src/Type/Type.hs+9−9
src/Type/State.hs+3−3
@@ -21,9 +21,9 @@ import Control.Monad (forM_, liftM, liftM2, liftM3)
2121import Control.Monad.Trans (MonadIO, liftIO)
2222import qualified Data.Map.Strict as Map
2323import Data.Map.Strict ((!))
24−import Data.Text (Text)
2524import qualified Data.Vector.Mutable as MVector
2625
26+import qualified Elm.Name as N
2727import qualified Reporting.Annotation as A
2828import qualified Reporting.Error.Type as Error
2929import qualified Reporting.Region as R
@@ -53,7 +53,7 @@ data State =
5353type Pools = MVector.IOVector [Variable]
5454
5555
56−type Env = Map.Map Text (A.Located Variable)
56+type Env = Map.Map N.Name (A.Located Variable)
5757
5858
5959
@@ -137,7 +137,7 @@ flatten tipe =
137137 return (var, state)
138138
139139
140−flattenHelp :: Int -> Pools -> Map.Map Text Variable -> Type -> IO Variable
140+flattenHelp :: Int -> Pools -> Map.Map N.Name Variable -> Type -> IO Variable
141141flattenHelp maxRank pools aliasDict tipe =
142142 case tipe of
143143 PlaceHolder name ->
src/Type/Type.hs+9−9
@@ -53,19 +53,19 @@ data FlatType
5353 = App1 ModuleName.Canonical N.Name [Variable]
5454 | Fun1 Variable Variable
5555 | EmptyRecord1
56− | Record1 (Map.Map Text Variable) Variable
56+ | Record1 (Map.Map N.Name Variable) Variable
5757 | Unit1
5858 | Tuple1 Variable Variable (Maybe Variable)
5959
6060
6161data Type
62− = PlaceHolder Text
63− | AliasN ModuleName.Canonical N.Name [(Text, Type)] Type
62+ = PlaceHolder N.Name
63+ | AliasN ModuleName.Canonical N.Name [(N.Name, Type)] Type
6464 | VarN Variable
6565 | AppN ModuleName.Canonical N.Name [Type]
6666 | FunN Type Type
6767 | EmptyRecordN
68− | RecordN (Map.Map Text Type) Type
68+ | RecordN (Map.Map N.Name Type) Type
6969 | UnitN
7070 | TupleN Type Type (Maybe Type)
7171
@@ -84,12 +84,12 @@ data Descriptor =
8484
8585
8686data Content
87− = FlexVar (Maybe Text)
88− | FlexSuper T.Super (Maybe Text)
89− | RigidVar Text
90− | RigidSuper T.Super Text
87+ = FlexVar (Maybe N.Name)
88+ | FlexSuper T.Super (Maybe N.Name)
89+ | RigidVar N.Name
90+ | RigidSuper T.Super N.Name
9191 | Structure FlatType
92− | Alias ModuleName.Canonical N.Name [(Text,Variable)] Variable
92+ | Alias ModuleName.Canonical N.Name [(N.Name,Variable)] Variable
9393 | Error Text
9494
9595