diff options
Diffstat (limited to 'compiler/GHC/Tc/Instance/Class.hs')
-rw-r--r-- | compiler/GHC/Tc/Instance/Class.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Instance/Class.hs b/compiler/GHC/Tc/Instance/Class.hs index f2ffeea8c6..e6407b13bb 100644 --- a/compiler/GHC/Tc/Instance/Class.hs +++ b/compiler/GHC/Tc/Instance/Class.hs @@ -28,6 +28,7 @@ import GHC.Builtin.Types import GHC.Builtin.Types.Prim import GHC.Builtin.Names +import GHC.Types.FieldLabel import GHC.Types.Name.Reader( lookupGRE_FieldLabel, greMangledName ) import GHC.Types.SafeHaskell import GHC.Types.Name ( Name, pprDefinedAt ) @@ -52,6 +53,8 @@ import GHC.Utils.Panic import GHC.Utils.Misc( splitAtList, fstOf3 ) import GHC.Data.FastString +import Language.Haskell.Syntax.Basic (FieldLabelString(..)) + import Data.Maybe {- ******************************************************************* @@ -891,7 +894,7 @@ matchHasField dflags short_cut clas tys -- use representation tycon (if data family); it has the fields , let r_tc = fstOf3 (tcLookupDataFamInst fam_inst_envs tc args) -- x should be a field of r - , Just fl <- lookupTyConFieldLabel x r_tc + , Just fl <- lookupTyConFieldLabel (FieldLabelString x) r_tc -- the field selector should be in scope , Just gre <- lookupGRE_FieldLabel rdr_env fl |