Update Trac ticket URLs to point to GitLab
[ghc.git] / testsuite / tests / polykinds / T11248.hs
1 {-# OPTIONS_GHC -O #-}
2 -- #11248, comment:6 showed that this tests failed with -O
3
4 {-# LANGUAGE DataKinds, TypeOperators, TypeFamilies,
5 KindSignatures, ConstraintKinds #-}
6
7 module T11248 where
8
9 import GHC.TypeLits
10
11 type a / b = FDiv a b
12 type a ** b = FMul a b
13
14 type family FDiv a b where
15 FDiv 11648 128 = 91
16
17 type family FMul a b where
18 FMul 64 91 = 5824
19
20 type family FGCD a b where
21 FGCD 128 448 = 64
22 FGCD 128 5824 = 64
23
24 type family FLCM a b where
25 FLCM 128 5824 = 11648
26
27 data CT (m :: Nat) (m' :: Nat)
28 type H0 = 128
29 type H1 = 448
30 type H0' = 11648
31 type H1' = 5824
32
33 main' = let x = undefined :: CT H0 H0'
34 in foo x :: CT H1 H1'
35
36 foo x = bug x
37
38 type Ctx2 e r s e' r' =
39 (e ~ FGCD r e', r' ~ FLCM r e', e ~ FGCD r s)
40
41 type Ctx1 e r s e' r' =
42 (Ctx2 e r s e' r', e' ~ (e ** (r' / r)))
43
44 bug :: (Ctx1 e r s e' r')
45 => CT r r' -> CT s s'
46 bug = undefined