diff options
Diffstat (limited to 'compiler/GHC/Tc/Validity.hs')
-rw-r--r-- | compiler/GHC/Tc/Validity.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Validity.hs b/compiler/GHC/Tc/Validity.hs index 22b627a36f..1b3c517c2e 100644 --- a/compiler/GHC/Tc/Validity.hs +++ b/compiler/GHC/Tc/Validity.hs @@ -73,6 +73,8 @@ import GHC.Utils.Panic import GHC.Builtin.Uniques ( mkAlphaTyVarUnique ) import qualified GHC.LanguageExtensions as LangExt +import Language.Haskell.Syntax.Basic (FieldLabelString(..)) + import Control.Monad import Data.Foldable import Data.Function @@ -1567,7 +1569,7 @@ checkHasFieldInst cls tys@[_k_ty, x_ty, r_ty, _a_ty] = -> whoops (text "Record data type may not be a data family") | otherwise -> case isStrLitTy x_ty of Just lbl - | isJust (lookupTyConFieldLabel lbl tc) + | isJust (lookupTyConFieldLabel (FieldLabelString lbl) tc) -> whoops (ppr tc <+> text "already has a field" <+> quotes (ppr lbl)) | otherwise -> return () |