diff options
author | Hécate <hecate+gitlab@glitchbra.in> | 2020-09-22 20:35:49 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-10-10 14:49:59 -0400 |
commit | ea59fd4d0abe73e1127dcdd91855a39232e62d41 (patch) | |
tree | 8860a8eb4357979680c43362251b2b733661e7e4 /compiler/GHC/Tc/Deriv | |
parent | 5884fd325248e75d40c9da431b4069e43a2c182c (diff) | |
download | haskell-ea59fd4d0abe73e1127dcdd91855a39232e62d41.tar.gz |
Lint the compiler for extraneous LANGUAGE pragmas
Diffstat (limited to 'compiler/GHC/Tc/Deriv')
-rw-r--r-- | compiler/GHC/Tc/Deriv/Generics.hs | 13 | ||||
-rw-r--r-- | compiler/GHC/Tc/Deriv/Infer.hs | 3 | ||||
-rw-r--r-- | compiler/GHC/Tc/Deriv/Utils.hs | 7 |
3 files changed, 11 insertions, 12 deletions
diff --git a/compiler/GHC/Tc/Deriv/Generics.hs b/compiler/GHC/Tc/Deriv/Generics.hs index 9821d040e3..32567e1786 100644 --- a/compiler/GHC/Tc/Deriv/Generics.hs +++ b/compiler/GHC/Tc/Deriv/Generics.hs @@ -1,14 +1,15 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeFamilies #-} + +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + {- (c) The University of Glasgow 2011 -} -{-# LANGUAGE CPP, ScopedTypeVariables, TupleSections #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE TypeFamilies #-} - -{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} - -- | The deriving code for the Generic class module GHC.Tc.Deriv.Generics (canDoGenerics diff --git a/compiler/GHC/Tc/Deriv/Infer.hs b/compiler/GHC/Tc/Deriv/Infer.hs index fb038b23fb..eb81587eb7 100644 --- a/compiler/GHC/Tc/Deriv/Infer.hs +++ b/compiler/GHC/Tc/Deriv/Infer.hs @@ -464,8 +464,7 @@ and them simplify them in simplifyInstanceContexts; see Note [Simplifying the instance context]. In the functor-like case, we may need to unify some kind variables with * in -order for the generated instance to be well-kinded. An example from -#10524: +order for the generated instance to be well-kinded. An example from #10524: newtype Compose (f :: k2 -> *) (g :: k1 -> k2) (a :: k1) = Compose (f (g a)) deriving Functor diff --git a/compiler/GHC/Tc/Deriv/Utils.hs b/compiler/GHC/Tc/Deriv/Utils.hs index e14d1ca7d8..36d6293941 100644 --- a/compiler/GHC/Tc/Deriv/Utils.hs +++ b/compiler/GHC/Tc/Deriv/Utils.hs @@ -1113,8 +1113,7 @@ example of this is: data T a b = C (Show a) b => MkT b Here, the existential context (C (Show a) b) does technically mention the last -type variable b. But this is OK, because expanding the type synonym C would -give us the context (Show a), which doesn't mention b. Therefore, we must make -sure to expand type synonyms before performing this check. Not doing so led to -#13813. +type variable b. But this is OK, because expanding the type synonym C would give +us the context (Show a), which doesn't mention b. Therefore, we must make sure +to expand type synonyms before performing this check. Not doing so led to #13813. -} |