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,351
    • Issues 5,351
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 573
    • Merge requests 573
  • 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
  • #14591
Closed
Open
Issue created Dec 17, 2017 by tianxiaogu@trac-tianxiaogu

HEAD panic: tcSyntaxOp "noSyntaxExpr"

The following program triggers a bug in 8.2.2 and 8.5.20171215.

-- Checks that the ordering constraint on the groupWith function is respected
{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
import GHC.Exts (groupWith)
data Unorderable = Gnorf | Pinky | Brain
foo = [ ()
      | Gnorf <- [Gnorf, Brain]
      , then group by x using groupWith
      ]

Reproduce:

ghc bug.hs

Output:

` [1 of 1] Compiling ShouldFail ( bug.hs, bug.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.5.20171215 for x86_64-unknown-linux): tcSyntaxOp "noSyntaxExpr" Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable pprPanic, called at compiler/typecheck/TcExpr.hs:1436:31 in ghc:TcExpr

Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug`

Trac metadata
Trac field Value
Version 8.2.2
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