diff options
Diffstat (limited to 'testsuite/tests/th/T3100.hs')
-rw-r--r-- | testsuite/tests/th/T3100.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/th/T3100.hs b/testsuite/tests/th/T3100.hs new file mode 100644 index 0000000000..edb943933a --- /dev/null +++ b/testsuite/tests/th/T3100.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE RankNTypes, FlexibleContexts, ImplicitParams, TemplateHaskell #-} + +-- This test makes sure TH understands types where +-- there is a predicate but no 'forall' +-- +-- There are two tests in here; both should be fine +-- Trac ticket: #3100 + +module T3100 where + +import Language.Haskell.TH + +flop :: Ord Int => Int -> Int +flop x = x + +$(do { t <- reify 'flop; return [] }) + +type T a = Eq a => a + +$(do { reify ''T; return []}) |