hadrian: Add support for bindist compressors other than Xz
[ghc.git] / testsuite / tests / typecheck / should_compile / TcCustomSolverSuper.hs
1 {-# LANGUAGE DataKinds #-}
2 {-# LANGUAGE FlexibleInstances #-}
3 module TcCustomSolverSuper where
4
5 import GHC.TypeLits
6 import Data.Typeable
7
8 {-
9
10 When solving super-class instances, GHC solves the evidence without
11 using the solver (see `tcSuperClasses` in `TcInstDecls`).
12
13 However, some classes need to be excepted from this behavior,
14 as they have custom solving rules, and this test checks that
15 we got this right.
16
17 PS: this test used to have Typeable in the context too, but
18 that's a redundant constraint, so I removed it
19
20 PPS: the whole structre of tcSuperClasses has changed,
21 so I'm no longer sure what is being tested here
22 -}
23
24
25 class (KnownNat x) => C x
26 class (KnownSymbol x) => D x
27
28 instance C 2
29 instance D "2"
30