Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,259
    • Issues 5,259
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 564
    • Merge requests 564
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #10072
Closed
Open
Issue created Feb 09, 2015 by thomasw@trac-thomasw

Panic: generalised wildcards in RULES

Generalised wildcards (PartialTypeSignatures) in the binder type annotation of a RULE cause panics.

Minimal example:

module WildcardInRuleBndrSig where
{-# RULES
"map/empty" forall (f :: a -> _). map f [] = []
  #-}

Output:

WildcardInRuleBndrSig.hs:3:31:ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.11.20150209 for x86_64-unknown-linux):
	No skolem info: w__alY[sk]

When a wildcard is generalised over, the error message reporting the inferred type gives some extra info about the type variables occurring in the inferred type. This extra information is retrieved by looking up the skolem information (getSkolemInfo) for the type variables in the enclosing implications (cec_encl). The problem is that there are no enclosing implications in this case, hence the panic.

Note that with the flags -XPartialTypeSignatures and -fno-warn-partial-type-signatures enabled, there is no panic, as no error/warning message is constructed.

Trac metadata
Trac field Value
Version 7.10.1-rc2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking