summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail109.hs
blob: 861183a399d0a557247895a21c5e737a4907684f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}

-- Strangely, this program does not elicit an error message
-- in GHC 5.03.  I don't know why. It fails correctly in
-- 5.04


module ShouldFail where

class Eq ce => Collects e ce | ce -> e where
    empty :: ce
    empty = error("empty")

data Stupid = Stupid -- without equality

instance Collects Bool Stupid where