Opened 2 years ago

Closed 2 years ago

#9879 closed bug (fixed)

Panic with partial type signatures

Reported by: monoidal Owned by: thomasw
Priority: high Milestone: 7.10.1
Component: Compiler (Type checker) Version: 7.9
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHCi crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D572
Wiki Page:

Description

Attempting to check kind of type hole _ in GHCi or putting it in a TH quotation causes a panic rnHsTyKi HsWildcardTy:

:kind _

let x = [t|_|]

Change History (6)

comment:1 Changed 2 years ago by thomasw

Owner: set to thomasw

comment:2 Changed 2 years ago by thomasw

I'll look into this.

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

In 48222831ae392cb556707b6b290a4dcc2677d97b/ghc:

Fix panic on [t| _ |] (Trac #9879)

Summary:
Type brackets containing a wildcard, e.g. `[t| _ |]`, caused a panic.
Fix it by disallowing wildcards in type brackets.

Together with D572, this fixes #9879.

Test Plan: new test WildcardInTypeBrackets should pass

Reviewers: austin

Reviewed By: austin

Subscribers: carter, thomie, monoidal

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

GHC Trac Issues: #9879

comment:4 Changed 2 years ago by simonpj

Differential Rev(s): Phab:D572
Milestone: 7.10.1
Priority: normalhigh
Status: newpatch

So Phab:D572 should be merged for 7.10.1, right?

Simon

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

In 6eb86a56135a9274d2c958a2ccf4df510c9dab86/ghc:

Fix panic on :kind _ in GHCi (Trac #9879)

Summary:
Running `:kind _` in GHCi produced a panic, fix it by extracting the
wildcards. Now, `:kind _` produces `_ :: k0`. Unfortunately, a `0` is
added after the kind is tidied and I haven't found a way to get rid of
it...

This does not fix the other panic involving TemplateHaskell mentioned
in #9879.

Test Plan: new test GHCiWildcardKind should pass

Reviewers: austin, simonpj

Reviewed By: austin

Subscribers: simonpj, carter, thomie, monoidal

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

GHC Trac Issues: #9879

comment:6 Changed 2 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged in HEAD and 7.10.1.

Note: See TracTickets for help on using tickets.