Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#10242 closed bug (fixed)

Multiple constraint wildcards allowed with PartialTypeSignatures

Reported by: mpickering Owned by: thomasw
Priority: normal Milestone: 8.0.1
Component: Compiler Version: 7.10.1
Keywords: PartialTypeSignatures Cc: alanz, dominique.devriese@…, Thomas, Winant, <thomas.winant@…>
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHC accepts invalid program Test Case: partial-sigs/should_fail/ExtraConstraintsWildcardTwice
Blocked By: Blocking:
Related Tickets: #10098 Differential Rev(s): Phab:D613
Wiki Page:

Description

The wiki states that

As a single extra-constraints wildcard is enough to infer any number of constraints, only one is allowed in a type signature and it should come last in the list of constraints.

However the following program compiles with GHC 7.10.1

{-# LANGUAGE PartialTypeSignatures #-}

f :: (Eq a, _, _) => a -> a -> Bool
f x y = x == y

Change History (7)

comment:1 Changed 4 years ago by simonpj

Cc: dominique.devriese@… Thomas Winant <thomas.winant@…> added

comment:2 Changed 4 years ago by thomasw

Owner: set to thomasw

comment:3 Changed 4 years ago by thomasw

Differential Rev(s): Phab:D613

comment:4 Changed 4 years ago by thomasw

This is fixed by Phab:D613, which still needs to be merged.

comment:5 Changed 4 years ago by simonpj

Good. Let's land Phab:D613. I doubt it's worth putting it into 7.10.2

Austin can you do that?

Simon

comment:6 Changed 3 years ago by thomie

Milestone: 7.10.3
Resolution: fixed
Status: newclosed
Test Case: partial-sigs/should_fail/ExtraConstraintsWildcardTwice

Already fixed. Milestone should really be 7.10.2.

comment:7 Changed 3 years ago by bgamari

Milestone: 7.10.38.0.1

This won't be going in to 7.10.3.

Note: See TracTickets for help on using tickets.