summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs/should_fail/AnnotatedConstraint.hs
blob: f79ed44a446656c5cbc4466407a9c3488715700e (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE PartialTypeSignatures #-}
module NamedWildcardsEnabled where

foo :: Eq a => a -> (a, _)
foo x = (x, x)

test = foo id

-- As id (forall a. a -> a) doesn't implement Eq, the we cannot apply
-- foo with it. This test checks that foo gets the annotated type,
-- including constraints, not just the inferred type.