#1870: ghc-6.8.1 panics compiling regex-tdfa-0.93
----------------------------+-----------------------------------------------
 Reporter:  ChrisKuklewicz  |          Owner:         
     Type:  bug             |         Status:  new    
 Priority:  normal          |      Milestone:         
Component:  Compiler        |        Version:  6.8.1  
 Severity:  normal          |     Resolution:         
 Keywords:                  |     Difficulty:  Unknown
 Testcase:                  |   Architecture:  Unknown
       Os:  Unknown         |  
----------------------------+-----------------------------------------------
Changes (by simonpj):

  * difficulty:  => Unknown

Old description:

> This was reported to me by [EMAIL PROTECTED]
>
> Short summary: The file that dies indicated that use of "mdo" may be the
> problem, since the file is quite ordinary otherwise.
>
> There is no cut down test case yet.  The regex-base and regex-tdfa were
> pulled from
> http://darcs.haskell.org/packages/regex-unstable/
>
> > I darcs got the newest regex-tdfa (0.93 iirc) and made all the obvious
> changes involving LANGUAGE/OPTION_GHC pragmas to get this to work on
> ghc-6.8.1
> >
> > prereq regex_base 0.93 installs ok
> > regex-tdfa panics with
>
> > [EMAIL PROTECTED]:~/installs/regexstuff/regex-newest/regex-tdfa>runghc
> Setup.hs build
> > Preprocessing library regex-tdfa-0.93...
> > Building regex-tdfa-0.93...
> > [ 1 of 21] Compiling Data.IntMap.CharMap ( Data/IntMap/CharMap.hs,
> dist/build/Data/IntMap/CharMap.o )
> >
> > Data/IntMap/CharMap.hs:9:27:
> >     Warning: Imported from `Data.Char' but not used: `chr'
> > [ 2 of 21] Compiling Data.IntSet.EnumSet ( Data/IntSet/EnumSet.hs,
> dist/build/Data/IntSet/EnumSet.o )
> > [ 3 of 21] Compiling Data.IntMap.EnumMap ( Data/IntMap/EnumMap.hs,
> dist/build/Data/IntMap/EnumMap.o )
> > [ 4 of 21] Compiling Text.Regex.TDFA.IntArrTrieSet (
> Text/Regex/TDFA/IntArrTrieSet.hs,
> dist/build/Text/Regex/TDFA/IntArrTrieSet.o )
> > [ 5 of 21] Compiling Text.Regex.TDFA.Common (
> Text/Regex/TDFA/Common.hs, dist/build/Text/Regex/TDFA/Common.o )
> > [ 6 of 21] Compiling Text.Regex.TDFA.Pattern (
> Text/Regex/TDFA/Pattern.hs, dist/build/Text/Regex/TDFA/Pattern.o )
> > [ 7 of 21] Compiling Text.Regex.TDFA.ReadRegex (
> Text/Regex/TDFA/ReadRegex.hs, dist/build/Text/Regex/TDFA/ReadRegex.o )
> > [ 8 of 21] Compiling Text.Regex.TDFA.CorePattern (
> Text/Regex/TDFA/CorePattern.hs, dist/build/Text/Regex/TDFA/CorePattern.o
> )
> > ghc-6.8.1: panic! (the 'impossible' happened)
> >   (GHC version 6.8.1 for i386-unknown-linux):
> >         splitFunTy
> >     <nt>mtl-1.1.0.0:Control.Monad.RWS.Lazy.RWS{tc rsRo}
> >       (base:Data.Maybe.Maybe{tc r6}
> >          regex-tdfa-0.93:Text.Regex.TDFA.Common.GroupIndex{tc raaa})
> >       [base:Data.Either.Either{tc 344}
> >          regex-tdfa-0.93:Text.Regex.TDFA.Common.Tag{tc raai}
> >          regex-tdfa-0.93:Text.Regex.TDFA.Common.GroupInfo{tc raa4}]
> >       ([regex-tdfa-0.93:Text.Regex.TDFA.Common.OP{tc raae}]
> >        -> [regex-tdfa-0.93:Text.Regex.TDFA.Common.OP{tc raae}],
> >        regex-tdfa-0.93:Text.Regex.TDFA.Common.Tag{tc raai})
> >       (base:GHC.Prim.Any{(w) tc 31N},
> >        [regex-tdfa-0.93:Text.Regex.TDFA.Common.Tag{tc raai}])
> >
> > Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

New description:

 This was reported to me by [EMAIL PROTECTED]

 Short summary: The file that dies indicated that use of "mdo" may be the
 problem, since the file is quite ordinary otherwise.

 There is no cut down test case yet.  The regex-base and regex-tdfa were
 pulled from
 http://darcs.haskell.org/packages/regex-unstable/
 {{{
 > I darcs got the newest regex-tdfa (0.93 iirc) and made all the obvious
 changes involving LANGUAGE/OPTION_GHC pragmas to get this to work on
 ghc-6.8.1
 >
 > prereq regex_base 0.93 installs ok
 > regex-tdfa panics with

 > [EMAIL PROTECTED]:~/installs/regexstuff/regex-newest/regex-tdfa>runghc
 Setup.hs build
 > Preprocessing library regex-tdfa-0.93...
 > Building regex-tdfa-0.93...
 > [ 1 of 21] Compiling Data.IntMap.CharMap ( Data/IntMap/CharMap.hs,
 dist/build/Data/IntMap/CharMap.o )
 >
 > Data/IntMap/CharMap.hs:9:27:
 >     Warning: Imported from `Data.Char' but not used: `chr'
 > [ 2 of 21] Compiling Data.IntSet.EnumSet ( Data/IntSet/EnumSet.hs,
 dist/build/Data/IntSet/EnumSet.o )
 > [ 3 of 21] Compiling Data.IntMap.EnumMap ( Data/IntMap/EnumMap.hs,
 dist/build/Data/IntMap/EnumMap.o )
 > [ 4 of 21] Compiling Text.Regex.TDFA.IntArrTrieSet (
 Text/Regex/TDFA/IntArrTrieSet.hs,
 dist/build/Text/Regex/TDFA/IntArrTrieSet.o )
 > [ 5 of 21] Compiling Text.Regex.TDFA.Common ( Text/Regex/TDFA/Common.hs,
 dist/build/Text/Regex/TDFA/Common.o )
 > [ 6 of 21] Compiling Text.Regex.TDFA.Pattern (
 Text/Regex/TDFA/Pattern.hs, dist/build/Text/Regex/TDFA/Pattern.o )
 > [ 7 of 21] Compiling Text.Regex.TDFA.ReadRegex (
 Text/Regex/TDFA/ReadRegex.hs, dist/build/Text/Regex/TDFA/ReadRegex.o )
 > [ 8 of 21] Compiling Text.Regex.TDFA.CorePattern (
 Text/Regex/TDFA/CorePattern.hs, dist/build/Text/Regex/TDFA/CorePattern.o )
 > ghc-6.8.1: panic! (the 'impossible' happened)
 >   (GHC version 6.8.1 for i386-unknown-linux):
 >         splitFunTy
 >     <nt>mtl-1.1.0.0:Control.Monad.RWS.Lazy.RWS{tc rsRo}
 >       (base:Data.Maybe.Maybe{tc r6}
 >          regex-tdfa-0.93:Text.Regex.TDFA.Common.GroupIndex{tc raaa})
 >       [base:Data.Either.Either{tc 344}
 >          regex-tdfa-0.93:Text.Regex.TDFA.Common.Tag{tc raai}
 >          regex-tdfa-0.93:Text.Regex.TDFA.Common.GroupInfo{tc raa4}]
 >       ([regex-tdfa-0.93:Text.Regex.TDFA.Common.OP{tc raae}]
 >        -> [regex-tdfa-0.93:Text.Regex.TDFA.Common.OP{tc raae}],
 >        regex-tdfa-0.93:Text.Regex.TDFA.Common.Tag{tc raai})
 >       (base:GHC.Prim.Any{(w) tc 31N},
 >        [regex-tdfa-0.93:Text.Regex.TDFA.Common.Tag{tc raai}])
 >
 > Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

Comment:

 I tried to reproduce this.  I got the code from
 http://darcs.haskell.org/packages/regex-unstable/

 After adjusting the Cabal files to depend on `containers` etc, I compiled
 `regex-base` ok.  Then I tried `regex-tdfa`.  First I got this:
 {{{
 Text/Regex/TDFA/MutRunBS.hs:12:17:
     Could not find module `Data.ByteString.Base':
 }}}
 OK, so I changed the import to `Data.ByteString.Unsafe`.  Then I get
 {{{
 bash-3.1$ runhaskell Setup.hs  build
 Preprocessing library regex-tdfa-0.93...
 Building regex-tdfa-0.93...
 [ 1 of 21] Compiling Data.IntMap.CharMap ( Data/IntMap/CharMap.hs,
 dist/build/Data/IntMap/CharMap.o )
 [ 2 of 21] Compiling Data.IntSet.EnumSet ( Data/IntSet/EnumSet.hs,
 dist/build/Data/IntSet/EnumSet.o )
 [ 3 of 21] Compiling Data.IntMap.EnumMap ( Data/IntMap/EnumMap.hs,
 dist/build/Data/IntMap/EnumMap.o )
 [ 4 of 21] Compiling Text.Regex.TDFA.IntArrTrieSet (
 Text/Regex/TDFA/IntArrTrieSet.hs,
 dist/build/Text/Regex/TDFA/IntArrTrieSet.o )
 [ 5 of 21] Compiling Text.Regex.TDFA.Common ( Text/Regex/TDFA/Common.hs,
 dist/build/Text/Regex/TDFA/Common.o )
 [ 6 of 21] Compiling Text.Regex.TDFA.Pattern ( Text/Regex/TDFA/Pattern.hs,
 dist/build/Text/Regex/TDFA/Pattern.o )
 [ 7 of 21] Compiling Text.Regex.TDFA.ReadRegex (
 Text/Regex/TDFA/ReadRegex.hs, dist/build/Text/Regex/TDFA/ReadRegex.o )
 [ 8 of 21] Compiling Text.Regex.TDFA.CorePattern (
 Text/Regex/TDFA/CorePattern.hs, dist/build/Text/Regex/TDFA/CorePattern.o )
 [ 9 of 21] Compiling Text.Regex.TDFA.TNFA ( Text/Regex/TDFA/TNFA.hs,
 dist/build/Text/Regex/TDFA/TNFA.o )
 [10 of 21] Compiling Text.Regex.TDFA.RunMutState (
 Text/Regex/TDFA/RunMutState.hs, dist/build/Text/Regex/TDFA/RunMutState.o )

 Text/Regex/TDFA/RunMutState.hs:608:9:
     Constructor `STUArray' should have 4 arguments, but has been given 3
     In the pattern: STUArray _ _ msource
     In the definition of `copySTU':
         copySTU (STUArray _ _ msource) (STUArray _ _ mdest)
                   = ST $ \ s1# -> case sizeofMutableByteArray# msource of
 n# -> ...
 }}}
 Notice it compiled `CorePattern` just fine.  At this point I stopped.
 This is all with GHC 6.8.1.

 If you can give further info on how to reproduce I'll happily look
 further.  Also trying compiling with `-dcore-lint`.  Did you make clean to
 start with?

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1870#comment:1>
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

Reply via email to