summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T9973.hs
blob: 4639a6c76811889c9470a17214b1e948300f2ebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# OPTIONS_GHC -fwarn-redundant-constraints #-}

module T9973 where

duplicateDecl :: (Eq t) => t -> IO ()
-- #9973 was a bogus "redundant constraint" here
duplicateDecl sigs
 = do { newSpan <- return typeSig

         -- **** commenting out the next three lines causes the original warning to disappear
       ; let rowOffset = case typeSig of {  _  -> 1 }

       ; undefined }
   where
     typeSig = definingSigsNames sigs


definingSigsNames :: (Eq t) => t -> ()
definingSigsNames x = undefined
  where
    _ = x == x   -- Suppress the complaint on this