diff options
Diffstat (limited to 'compiler/parser')
| -rw-r--r-- | compiler/parser/RdrHsSyn.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs index 8c78fb5a0e..9712034b7a 100644 --- a/compiler/parser/RdrHsSyn.hs +++ b/compiler/parser/RdrHsSyn.hs @@ -871,12 +871,12 @@ equalsDots = text "= ..." checkDatatypeContext :: Maybe (LHsContext GhcPs) -> P () checkDatatypeContext Nothing = return () -checkDatatypeContext (Just (dL->L loc c)) +checkDatatypeContext (Just c) = do allowed <- extension datatypeContextsEnabled unless allowed $ - parseErrorSDoc loc - (text "Illegal datatype context (use DatatypeContexts):" <+> - pprHsContext c) + parseErrorSDoc (getLoc c) + (text "Illegal datatype context (use DatatypeContexts):" + <+> pprLHsContext c) type LRuleTyTmVar = Located RuleTyTmVar data RuleTyTmVar = RuleTyTmVar (Located RdrName) (Maybe (LHsType GhcPs)) |
