Opened 4 years ago

Closed 22 months ago

#9478 closed feature request (fixed)

Partial type signatures

Reported by: simonpj Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: partial-sigs/should_compile/PatBind2 partial-sigs/should_compile/EqualityConstraint
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D168
Wiki Page:


This ticket tracks progress on partial type signatures.

Change History (10)

comment:1 Changed 4 years ago by simonpj

Type: bugfeature request

comment:2 Changed 3 years ago by Austin Seipp <austin@…>

In d831b6f41b3b89dc4a643069d5668c05a20f3c37/ghc:

Implement Partial Type Signatures

Add support for Partial Type Signatures, i.e. holes in types, see:

This requires an update to the Haddock submodule.

Test Plan: validate

Reviewers: austin, goldfire, simonpj

Reviewed By: simonpj

Subscribers: thomie, Iceland_jack, dominique.devriese, simonmar, carter, goldfire

Differential Revision:

GHC Trac Issues: #9478

comment:3 Changed 3 years ago by Thomas Miedema <thomasmiedema@…>

In 5e66a698dae8c01bcd1a9335346145b32016e119/ghc:

Testsuite: change some expect_fail tests to expect_broken

Change the following tests from expect_fail to expect_broken: and list
the ticket number:

    * driver/sigof03m/sigof03 (#9252)
    * driver/static001 (#8127)
    * partial-sigs/should_compile/EqualityConstraint (#9478)
    * partial-sigs/should_compile/ExtraNumAMROn (#9478)
    * partial-sigs/should_compile/PatBind2 (#9478)
    * partial-sigs/should_fail/TidyClash2 (#9478)
    * simplCore/should_compile/T8832 (#8832)

The following tests are still marked as expect_fail, but it is not
clearly documented why so:

    * gadt/lazypatok
    * indexed-types/should_fail/SkolemOccursLoop

All other expect_fail tests are only expected to fail on either a
certain platform/os or for a certain way only.

Differential Revision:

comment:4 Changed 22 months ago by mpickering

Resolution: fixed
Status: newclosed

comment:5 Changed 22 months ago by Thomas Miedema <thomasmiedema@…>

In 2ae39acd/ghc:

Testsuite: accept new output for 2 partial-sigs tests

Test Plan: make TEST='ExtraNumAMROn TidyClash2'

Differential Revision:

GHC Trac Issues: #9478

comment:6 Changed 22 months ago by thomie

Resolution: fixed
Status: closednew
Test Case: partial-sigs/should_compile/PatBind2 partial-sigs/should_compile/EqualityConstraint

Reopening, because the tests EqualityConstraint and PatBind2 are still marked expect_broken for this ticket.

comment:7 Changed 22 months ago by Simon Peyton Jones <simonpj@…>

In e1ff2b49/ghc:

Fix partial sigs and pattern bindings interaction

It turns out that GHC 8.0 would accept entirely bogus
programs like

   f2 :: (True, _) -> Char
   Just f2 = Just (\x->x)

(which is now partial-sigs/should_fail/PatBind3)

This also fixes Trac #9478, test `PatBind2`.

comment:8 Changed 22 months ago by Simon Peyton Jones <simonpj@…>

In e24b50c3/ghc:

Use partial-sig constraints as givens

In TcSimplify.simplifyInfer, use the context of a partial type
signature as 'givens' when simplifying the inferred constraints of the
group.  This way we get maximum benefit from them.  See
Note [Add signature contexts as givens].

This (finally) fixes test EqualityConstraints in Trac #9478.

And it's a nice tidy-up.

comment:9 Changed 22 months ago by Simon Peyton Jones <simonpj@…>

In 1a43783e/ghc:

Record that EqualityConstraint now works

Fixing Trac #9478

comment:10 Changed 22 months ago by simonpj

Resolution: fixed
Status: newclosed

This last patch finally fixes the EqualityConstraint test.

Note: See TracTickets for help on using tickets.