#7079: Irrefutable pattern failed for pattern Data.Maybe.Just
------------------------------+---------------------------------------------
Reporter: lbolla | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.4.2 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
Compiling the following piece of code fails badly.
{{{
{-# LANGUAGE Rank2Types #-}
class Set s where
insert :: Ord a => a -> s a -> s a
data UnbalancedSet a = E | T (UnbalancedSet a) a (UnbalancedSet a)
instance Ord a => forall a ∘ Set (UnbalancedSet a) where
insert = undefined
}}}
Error message is:
{{{
$ ghc -v -dcore-lint ghc-bug.hs
Glasgow Haskell Compiler, Version 7.4.2, stage 2 booted by GHC version
7.4.1
Using binary package database:
/home/lbolla/src/junk/haskell/Okasaki/.hsenv_Okasaki/ghc_pkg_db/package.cache
hiding package QuickCheck-2.4.2 to avoid conflict with later version
QuickCheck-2.5
wired-in package ghc-prim mapped to ghc-
prim-0.2.0.0-23f345e1ec26a64d5ebc768bd0b2a5d9
wired-in package integer-gmp mapped to integer-
gmp-0.4.0.0-c15e185526893c3119f809251aac8c5b
wired-in package base mapped to
base-4.5.1.0-6909ea031307e047b8ba5b23968c534b
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-
haskell-2.7.0.0-718c7a8346a48b195831957f3dba0eac
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
*** Chasing dependencies:
Chasing modules from: *ghc-bug.hs
Stable obj: []
Stable BCO: []
Ready for upsweep
[NONREC
ModSummary {
ms_hs_date = Mon Jul 16 09:11:15 BST 2012
ms_mod = main:Main,
ms_textual_imps = [import (implicit) Prelude]
ms_srcimps = []
}]
*** Deleting temp files:
Deleting:
compile: input file ghc-bug.hs
Created temporary directory: /tmp/ghc6514_0
*** Checking old interface for main:Main:
[1 of 1] Compiling Main ( ghc-bug.hs, ghc-bug.o )
*** Parser:
*** Renamer/typechecker:
*** Deleting temp files:
Deleting: /tmp/ghc6514_0/ghc6514_0.s
Warning: deleting non-existent /tmp/ghc6514_0/ghc6514_0.s
*** Deleting temp dirs:
Deleting: /tmp/ghc6514_0
ghc: panic! (the 'impossible' happened)
(GHC version 7.4.2 for i386-unknown-linux):
compiler/rename/RnSource.lhs:430: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
}}}
System used:
{{{
$ uname -a
Linux arch 3.4.4-3-ARCH #1 SMP PREEMPT Tue Jul 3 15:35:13 UTC 2012 i686
GNU/Linux
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.7.1/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /build/src/gcc-4.7.1/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-
libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-
id --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check
--disable-cloog-version-check --enable-lto --enable-gold --enable-
ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-
style=gnu --disable-multilib --disable-libssp --disable-build-with-cxx
--disable-build-poststage1-with-cxx --enable-checking=release
Thread model: posix
gcc version 4.7.1 (GCC)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7079>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs