Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,262
    • Issues 4,262
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 419
    • Merge Requests 419
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #7094

Closed
Open
Opened Jul 24, 2012 by pganelin@trac-pganelin

Irrefutable pattern failed for pattern Data.Maybe.Just

The following invalid program causes ghc panic

-----------------------
--State-Monad.hs
data Term =  Con Int
     | Div Term Term
     deriving (Show)

type M a =  State -> (a,State)
type State =Int

instance Monad Int -> (a,Int) where
    g >>= f = undefined
    return = undefined
-------------------------------
D:\>"C:\Free\Haskell Platform\2012.2.0.0\bin\ghc.exe" D:\State-Monad.hs
[1 of 1] Compiling Main             ( D:\State-Monad.hs, D:\State-Monad.o )
ghc.exe: panic! (the 'impossible' happened)
  (GHC version 7.4.1 for i386-unknown-mingw32):
        compiler\rename\RnSource.lhs:429:14-81: Irrefutable pattern failed for pattern Data.Maybe.Just (inst_tyvars,
                                                        _,
                                                        SrcLoc.L _ cls,
                                                        _)


Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Edited Mar 09, 2019 by pcapriotti
Assignee
Assign to
7.6.1
Milestone
7.6.1
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#7094