Make dataToQa aware of Data instances which use functions to implement toConstr
[ghc.git] / testsuite / tests / th / T10796a.hs
1 {-# LANGUAGE TemplateHaskell #-}
2 module T10796a where
3
4 import Data.Ratio
5 import Data.Set (Set, fromList)
6 import Language.Haskell.TH.Syntax (liftData)
7
8 -- Data instance with toConstr implemented using a variable,
9 -- not a data constructor
10 splicedSet :: Set Char
11 splicedSet = $(liftData (fromList "test"))
12
13 -- Infix data constructor
14 splicedRatio :: Ratio Int
15 splicedRatio = $(liftData (1 % 2 :: Ratio Int))