diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc206.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc206.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc206.hs b/testsuite/tests/typecheck/should_compile/tc206.hs new file mode 100644 index 0000000000..c54618950a --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc206.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE Rank2Types #-} + +-- This one showed up a bug in pre-subsumption + +module ShouldCompile where + +class Data a where {} + +type GenericQ r = forall a. Data a => a -> r + +everything :: (r -> r -> r) -> GenericQ r +everything k f = error "urk" + + +-- | Get a list of all entities that meet a predicate +listify :: (r -> Bool) -> GenericQ [r] +listify p = everything (++) |