summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail001.hs
blob: 4e3e13072f203568f5e50eac92888e3e52ad0ad8 (plain)
1
2
3
4
5
6
7
8
9
-- !!! This should fail with a type error: the instance method
-- !!! has a function type when it should have the type [a].
module ShouldFail where

class A a where
 op :: a

instance (A a, A a) => A [a] where
 op [] = []