Update Trac ticket URLs to point to GitLab
[ghc.git] / testsuite / tests / typecheck / should_compile / T9708.hs
1 {-# LANGUAGE DataKinds, TypeOperators, TypeFamilies #-}
2 {-# OPTIONS_GHC -fwarn-redundant-constraints #-}
3 module TcTypeNatSimple where
4
5 import GHC.TypeLits
6 import Data.Proxy
7
8 type family SomeFun (n :: Nat)
9
10 -- See the ticket; whether this succeeds or fails is distinctly random
11
12 -- upon creation, commit f861fc6ad8e5504a4fecfc9bb0945fe2d313687c, this failed
13
14 -- with Simon's optimization to the flattening algorithm, commit
15 -- 37b3646c9da4da62ae95aa3a9152335e485b261e, this succeeded
16
17 -- with the change to stop Deriveds from rewriting Deriveds (around Dec. 12, 2014),
18 -- this failed again
19
20 -- 2016-01-23: it just started passing again, when
21 -- -fwarn-redundant-constraints was removed from the default warning set.
22 -- Turning the warning back on for this module, ghc reports (and probably has
23 -- for some time):
24 -- Redundant constraints: (x <= y, y <= x)
25 -- In the type signature for:
26 -- ti7 :: (x <= y, y <= x) => Proxy (SomeFun x) -> Proxy y -> ()
27
28 ti7 :: (x <= y, y <= x) => Proxy (SomeFun x) -> Proxy y -> ()
29 ti7 _ _ = ()