summaryrefslogtreecommitdiff
path: root/compiler/GHC/Builtin
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Builtin')
-rw-r--r--compiler/GHC/Builtin/Types/Literals.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/Builtin/Types/Literals.hs b/compiler/GHC/Builtin/Types/Literals.hs
index ef6fb962fd..cbb9f9e847 100644
--- a/compiler/GHC/Builtin/Types/Literals.hs
+++ b/compiler/GHC/Builtin/Types/Literals.hs
@@ -32,6 +32,7 @@ import GHC.Core.Coercion ( Role(..) )
import GHC.Tc.Types.Constraint ( Xi )
import GHC.Core.Coercion.Axiom ( CoAxiomRule(..), BuiltInSynFamily(..), TypeEqn )
import GHC.Types.Name ( Name, BuiltInSyntax(..) )
+import GHC.Types.Unique.FM
import GHC.Builtin.Types
import GHC.Builtin.Types.Prim ( mkTemplateAnonTyConBinders )
import GHC.Builtin.Names
@@ -50,7 +51,6 @@ import GHC.Builtin.Names
, typeSymbolAppendFamNameKey
)
import GHC.Data.FastString
-import qualified Data.Map as Map
import Data.Maybe ( isJust )
import Control.Monad ( guard )
import Data.List ( isPrefixOf, isSuffixOf )
@@ -401,7 +401,7 @@ axCmpSymbolDef =
s2' <- isStrLitTy s2
t2' <- isStrLitTy t2
return (mkTyConApp typeSymbolCmpTyCon [s1,t1] ===
- ordering (compare s2' t2')) }
+ ordering (lexicalCompareFS s2' t2')) }
axAppendSymbolDef = CoAxiomRule
{ coaxrName = fsLit "AppendSymbolDef"
@@ -457,8 +457,8 @@ axAppendSymbol0L = mkAxiom1 "Concat0L"
-- The list of built-in type family axioms that GHC uses.
-- If you define new axioms, make sure to include them in this list.
-- See Note [Adding built-in type families]
-typeNatCoAxiomRules :: Map.Map FastString CoAxiomRule
-typeNatCoAxiomRules = Map.fromList $ map (\x -> (coaxrName x, x))
+typeNatCoAxiomRules :: UniqFM FastString CoAxiomRule
+typeNatCoAxiomRules = listToUFM $ map (\x -> (coaxrName x, x))
[ axAddDef
, axMulDef
, axExpDef
@@ -706,7 +706,7 @@ matchFamCmpNat _ = Nothing
matchFamCmpSymbol :: [Type] -> Maybe (CoAxiomRule, [Type], Type)
matchFamCmpSymbol [s,t]
| Just x <- mbX, Just y <- mbY =
- Just (axCmpSymbolDef, [s,t], ordering (compare x y))
+ Just (axCmpSymbolDef, [s,t], ordering (lexicalCompareFS x y))
| tcEqType s t = Just (axCmpSymbolRefl, [s], ordering EQ)
where mbX = isStrLitTy s
mbY = isStrLitTy t