[GHC] #7094: Irrefutable pattern failed for pattern Data.Maybe.Just
GHC
cvs-ghc at haskell.org
Tue Jul 24 20:06:46 CEST 2012
#7094: Irrefutable pattern failed for pattern Data.Maybe.Just
---------------------------------+------------------------------------------
Reporter: pganelin | Owner:
Type: bug | Status: closed
Priority: normal | Milestone: 7.6.1
Component: Compiler (Parser) | Version: 7.4.1
Resolution: fixed | Keywords:
Os: Windows | Architecture: Unknown/Multiple
Failure: Compile-time crash | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
---------------------------------+------------------------------------------
Changes (by pcapriotti):
* status: new => closed
* difficulty: => Unknown
* resolution: => fixed
* milestone: => 7.6.1
Old description:
> 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
New description:
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
}}}
--
Comment:
Thanks for the report. This is fixed in HEAD.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7094#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list