Opened 3 years ago

Closed 3 years ago

#13466 closed bug (fixed)

Ghci panics with type applications to unknown functions

Reported by: aspiwack Owned by:
Priority: normal Milestone: 8.2.1
Component: GHCi Version: 8.0.2
Keywords: TypeApplications Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: ghci/scripts/T13466
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I haven't investigated further, but I stumbled upon the following:

Prelude> :set -XTypeApplications
Prelude> :t nonexistant @[]
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.2 for x86_64-unknown-linux):
	initTc: unsolved constraints
  WC {wc_insol =
        [W] nonexistant_a2YB :: t_a2YA[tau:3] (CHoleCan: nonexistant)}

Change History (6)

comment:1 Changed 3 years ago by simonpj

Could this be #13106? Try with HEAD? Thanks!

comment:2 Changed 3 years ago by RyanGlScott

Keywords: TypeApplications added

Actually, it's not #13106 for once! I can reproduce this on GHC HEAD as well:

GHCi, version 8.3.20170322:  :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
λ> :set -XTypeApplications
λ> :t nonexistant @[]
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 8.3.20170322 for x86_64-unknown-linux):
        initTc: unsolved constraints
  WC {wc_insol =
        [WD] nonexistant_a1tE {0}:: t1_a1tD[tau:2] (CHoleCan: nonexistant)}
  Call stack:
      CallStack (from HasCallStack):
        prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1191:58 in ghc:Outputable
        callStackDoc, called at compiler/utils/Outputable.hs:1195:37 in ghc:Outputable
        pprPanic, called at compiler/typecheck/TcRnMonad.hs:343:17 in ghc:TcRnMonad

comment:3 Changed 3 years ago by Simon Peyton Jones <simonpj@…>

In feca929b/ghc:

Fix 'unsolved constraints' in GHCi

In initTc, if the computation fails with an exception, we
should not complain about unsolved constraints.

Fixes Trac #13466.

comment:4 Changed 3 years ago by simonpj

Status: newmerge
Test Case: ghci/scripts/T13466

comment:5 Changed 3 years ago by simonpj

Milestone: 8.2.1

comment:6 Changed 3 years ago by bgamari

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.