Opened 2 years ago

Closed 2 years ago

Last modified 23 months ago

#10519 closed bug (fixed)

Can't put wildcard behind forall

Reported by: yongqli Owned by: thomasw
Priority: normal Milestone: 8.0.1
Component: Compiler Version: 7.10.1-rc3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: partial-sigs/should_compile/T10519
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D994
Wiki Page:

Description

This type signature doesn't compile:

forall v. _
=> Acc (Array DIM2 (v Double))
-> Acc (Array DIM2 (v Double))
-> Acc (A.Vector Double)
-> Acc (Array DIM2 Double)

with "Invalid partial type signature ... An extra-constraints wildcard is only allowed at the top-level of the signature"

I need the forall because I use v in the body of the function.

This occurs with version 7.10.1.20150612 but not 7.10.1.20150519

Change History (7)

comment:1 Changed 2 years ago by thomasw

Owner: set to thomasw

comment:2 Changed 2 years ago by thomasw

This must be caused by my recent refactoring (Phab:613). I'll have a look.

comment:3 Changed 2 years ago by thomasw

Differential Rev(s): Phab:D994

comment:4 Changed 2 years ago by Ben Gamari <ben@…>

In f8563838603f9a60f5012c3837142c5df89b8de2/ghc:

Fix Trac #10519

Look through nested foralls when checking the validity of a partial type
signature. The combination of D836 and D613 prompts this change.

Test Plan: The test T10519 must pass

Reviewers: simonpj, alanz, austin

Reviewed By: simonpj, alanz, austin

Subscribers: thomie, bgamari

Differential Revision: https://phabricator.haskell.org/D994

GHC Trac Issues: #10519

comment:5 Changed 2 years ago by simonpj

Test Case: partial-sigs/should_compile/T10519

So this is fixed? If so let's close it.

comment:6 Changed 2 years ago by thomasw

Resolution: fixed
Status: newclosed

comment:7 Changed 23 months ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.