Update Trac ticket URLs to point to GitLab
[ghc.git] / testsuite / tests / typecheck / should_fail / T10715.hs
1 {-# LANGUAGE FlexibleContexts #-}
2 module T10715 where
3
4 import Data.Coerce (coerce, Coercible)
5 import Data.Ord ( Down ) -- convenient newtype
6
7 data X a
8
9 -- See #10715 for a long discussion about whether
10 -- this should be accepted or not.
11 --
12 -- But in #12466 we decided to accept contradictory
13 -- type signatures, so definition is now accepeted even
14 -- though you can never call it. Instead we get a
15 -- redundant pattern-match warning, in the
16 -- post-typechecking pattern-match checks
17 doCoerce :: Coercible a (X a) => a -> X a
18 doCoerce = coerce