summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Solver
diff options
context:
space:
mode:
authorHécate <hecate+gitlab@glitchbra.in>2020-09-22 20:35:49 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-10-10 14:49:59 -0400
commitea59fd4d0abe73e1127dcdd91855a39232e62d41 (patch)
tree8860a8eb4357979680c43362251b2b733661e7e4 /compiler/GHC/Tc/Solver
parent5884fd325248e75d40c9da431b4069e43a2c182c (diff)
downloadhaskell-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.hs4
-rw-r--r--compiler/GHC/Tc/Solver/Interact.hs17
-rw-r--r--compiler/GHC/Tc/Solver/Monad.hs2
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 -> ()