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/Solver | |
parent | 5884fd325248e75d40c9da431b4069e43a2c182c (diff) | |
download | haskell-ea59fd4d0abe73e1127dcdd91855a39232e62d41.tar.gz |
Lint the compiler for extraneous LANGUAGE pragmas
Diffstat (limited to 'compiler/GHC/Tc/Solver')
-rw-r--r-- | compiler/GHC/Tc/Solver/Flatten.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Tc/Solver/Interact.hs | 17 | ||||
-rw-r--r-- | compiler/GHC/Tc/Solver/Monad.hs | 2 |
3 files changed, 14 insertions, 9 deletions
diff --git a/compiler/GHC/Tc/Solver/Flatten.hs b/compiler/GHC/Tc/Solver/Flatten.hs index 2a4c7be1bb..dd214ceb7c 100644 --- a/compiler/GHC/Tc/Solver/Flatten.hs +++ b/compiler/GHC/Tc/Solver/Flatten.hs @@ -1,4 +1,6 @@ -{-# LANGUAGE CPP, DeriveFunctor, ViewPatterns, BangPatterns #-} +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE DeriveFunctor #-} {-# OPTIONS_GHC -Wno-incomplete-record-updates #-} diff --git a/compiler/GHC/Tc/Solver/Interact.hs b/compiler/GHC/Tc/Solver/Interact.hs index 57bca5fcec..fe349866d2 100644 --- a/compiler/GHC/Tc/Solver/Interact.hs +++ b/compiler/GHC/Tc/Solver/Interact.hs @@ -939,7 +939,7 @@ can change the behavior of the user's code. The following four modules produce a program whose output would change depending on whether we apply this optimization when IncoherentInstances is in effect: -######### +========= {-# LANGUAGE MultiParamTypeClasses #-} module A where @@ -949,8 +949,9 @@ on whether we apply this optimization when IncoherentInstances is in effect: class A a => C a b where m :: b -> a -> a -######### - {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} +========= + {-# LANGUAGE FlexibleInstances #-} + {-# LANGUAGE MultiParamTypeClasses #-} module B where import A @@ -961,9 +962,11 @@ on whether we apply this optimization when IncoherentInstances is in effect: instance C a [b] where m _ = id -######### - {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-} - {-# LANGUAGE IncoherentInstances #-} +========= + {-# LANGUAGE FlexibleContexts #-} + {-# LANGUAGE FlexibleInstances #-} + {-# LANGUAGE IncoherentInstances #-} + {-# LANGUAGE MultiParamTypeClasses #-} module C where import A @@ -977,7 +980,7 @@ on whether we apply this optimization when IncoherentInstances is in effect: intC :: C Int a => a -> Int -> Int intC _ x = int x -######### +========= module Main where import A diff --git a/compiler/GHC/Tc/Solver/Monad.hs b/compiler/GHC/Tc/Solver/Monad.hs index a524493b94..4c20eed977 100644 --- a/compiler/GHC/Tc/Solver/Monad.hs +++ b/compiler/GHC/Tc/Solver/Monad.hs @@ -1300,7 +1300,7 @@ This is triggered by test case typecheck/should_compile/SplitWD. Note [Examples of how Derived shadows helps completeness] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#10009, a very nasty example: +Ticket #10009, a very nasty example: f :: (UnF (F b) ~ b) => F b -> () |