summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T10019.script
blob: 97ecbe115e3ed06cace3837a08b923577d98cad8 (plain)
1
2
3
4
5
6
7
8
9
10
11
:set -XTemplateHaskell
import Language.Haskell.TH
data Option a = Some a | None
$(reify 'Some >>= litE . integerL . toInteger . length . show)
-- By taking the length we avoid wobbling when the exact uniques
-- chosen by TH change
--
-- This was the original
-- $(reify 'Some >>= stringE . show)
-- which yields
-- "DataConI Ghci1.Some (ForallT [KindedTV a_1627391549 StarT] [] (AppT (AppT ArrowT (VarT a_1627391549)) (AppT (ConT Ghci1.Option) (VarT a_1627391549)))) Ghci1.Option (Fixity 9 InfixL)"