summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_compile/tc206.hs
blob: c54618950a119da40dfe45c65b4c8a1c5999a363 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 (++)