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,252
    • Issues 5,252
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 577
    • Merge requests 577
  • 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
  • #2506
Closed
Open
Issue created Aug 09, 2008 by Galen Huntington@galenReporter

infix assert panics ghc

I was repeatedly getting this:

ghc-6.8.3: panic! (the 'impossible' happened)
  (GHC version 6.8.3 for i386-unknown-linux):
        rename/RnExpr.lhs:(139,26)-(150,42): Non-exhaustive patterns in lambda

After some narrowing down, I eventually found the culprit and got a repeatable error with this minimal snippet:

import Control.Exception (assert)
foo = True `assert` ()

The infixness is crucial; assert True () compiles without difficulty. I use infix notation elsewhere, so it appears to be something special about assert.

I was able to compile successfully if I used -O2. I see now that was likely because the asserts are simply eliminated early.

I compiled ghc from sources, so it's barely possible I did something wrong there, but the nature of the symptoms make this doubtful.

Trac metadata
Trac field Value
Version 6.8.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
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