summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail098.hs
blob: c1c7e93f1ef92f5d16366eba0df4c789f70a6082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE UndecidableInstances #-}

module ShouldFail where

-- The constraint in the context of an instance declaration
-- is ambiguous, but we have UndecidableInstances on, so
-- it could conceivably be ok (we'd need OverlappingInstances
-- too in this case).  So we allow it.
-- See Note [The ambiguity check for type signatures] in GHC.Tc.Utils.TcMType

class Bar a
instance Bar a => Bar Bool