summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_fail/T7194.hs
blob: 753d177c4246f98fb7d2472d122ddb1faceebef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, FlexibleContexts #-} 

-- This one produced a Lint error in GHC 7.4 and 7.6

module Foo where

type family F a

class C b where {}

foo :: a -> F a
foo x = error "urk"

h :: (b -> ()) -> Int
h = error "urk"

f = h (\x -> let g :: C (F a) => a -> Int
                 g y = length [x, foo y]
             in ())