Add Fixity info for infix types
[ghc.git] / testsuite / tests / th / T10704a.hs
1 {-# LANGUAGE MultiParamTypeClasses, TypeFamilies, TypeOperators #-}
2 module T10704a where
3
4 import Language.Haskell.TH
5
6 infixl 1 :=>
7 infixl 2 :+:
8 infix 3 :*:
9 infix 4 :%:
10 infixr 5 :?:
11 infixr 6 :@:
12
13 class a :=> b
14 type a :+: b = Either a b
15 data a :*: b = a :*: b
16 newtype a :%: b = Percent (a, b)
17 data family a :?: b
18 type family a :@: b where a :@: b = Int
19
20 fixityExp :: Name -> Q Exp
21 fixityExp n = reifyFixity n >>= stringE . show