GHC compiler error for 6.6

Chris Kuklewicz haskell at list.mightyreason.com
Tue Jan 23 09:27:59 EST 2007


Simon Peyton-Jones wrote:
> Oh yes, please do make a test case. That should never happen.  Also use
> -dcore-lint, which might well nail it closer to source
> 
> Simon

It may have been some weird version skew -- recompiling regex-parsec against the
current regex-base seems to have cured it.  So there is no problem now.

Before I did that the error only occurred with -O1 and -O2 but not with -O0.

The -dcore-lint results from when it failed:

Reason:~/Documents/projects/haskell/develop/regex-unstable/regex-devel/regex-devel/quickcheck
chrisk$ ghc -O1 -dcore-lint --make TestCase3.hs
Reason:~/Documents/projects/haskell/develop/regex-unstable/regex-devel/regex-devel/quickcheck
chrisk$ ghc -O1 -dcore-lint --make TestCase2.hs
[1 of 1] Compiling Main             ( TestCase2.hs, TestCase2.o )

TestCase2.hs:31:0:
    Warning: No explicit method nor default method for `coarbitrary'
             In the instance declaration for `Arbitrary RegexSource'

TestCase2.hs:58:0:
    Warning: No explicit method nor default method for `coarbitrary'
             In the instance declaration for `Arbitrary RegexString'
ghc-6.6: panic! (the 'impossible' happened)
  (GHC version 6.6 for powerpc-apple-darwin):
        Iface Lint failure
    Unfolding of regex-parsec-0.85:Text.Regex.Parsec.String.$f1{v rUs} <no
location info>:

    In the expression: regex-base-0.80:Text.Regex.Base.RegexLike.:DRegexLike{v
r1Ws} [gid]
                         @ regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}
                         @ base:GHC.Base.String{tc rJ7}
                         regex-base-0.80:Text.Regex.Base.RegexLike.$f4{v r1WS} [gid]
                         regex-parsec-0.85:Text.Regex.Parsec.String.matchAll{v
rVc} [gid]
    Argument value doesn't match argument type:
    Fun type:
        (regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}
         -> base:GHC.Base.String{tc rJ7}
         -> base:Data.Maybe.Maybe{tc rY9}
regex-base-0.80:Text.Regex.Base.RegexLike.MatchArray{tc rVT})
        -> (regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}
            -> base:GHC.Base.String{tc rJ7}
            -> [regex-base-0.80:Text.Regex.Base.RegexLike.MatchArray{tc rVT}])
        -> (regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}
            -> base:GHC.Base.String{tc rJ7}
            -> base:GHC.Base.Int{(w) tc 3J})
        -> (regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}
            -> base:GHC.Base.String{tc rJ7}
            -> base:GHC.Base.Bool{(w) tc 3c})
        -> (regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}
            -> base:GHC.Base.String{tc rJ7}
            -> [regex-base-0.80:Text.Regex.Base.RegexLike.MatchText{tc rVS}
base:GHC.Base.String{tc rJ7}])
        -> (regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}
            -> base:GHC.Base.String{tc rJ7}
            -> base:Data.Maybe.Maybe{tc rY9} (base:GHC.Base.String{tc rJ7},

regex-base-0.80:Text.Regex.Base.RegexLike.MatchText{tc rVS}
base:GHC.Base.String{tc rJ7},
                                              base:GHC.Base.String{tc rJ7}))
        -> (regex-base-0.80:Text.Regex.Base.RegexLike.:TRegexLike{tc r1Wo})
regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}

base:GHC.Base.String{tc rJ7}
    Arg type:
        regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}
        -> base:GHC.Base.String{tc rJ7}
        -> [regex-base-0.80:Text.Regex.Base.RegexLike.MatchArray{tc rVT}]
    Arg:
        regex-parsec-0.85:Text.Regex.Parsec.String.matchAll{v rVc} [gid]

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

Reason:~/Documents/projects/haskell/develop/regex-unstable/regex-devel/regex-devel/quickcheck
chrisk$ ghc -O1 -dcore-lint --make TestCase4.hs
[1 of 1] Compiling Main             ( TestCase4.hs, TestCase4.o )

TestCase4.hs:31:0:
    Warning: No explicit method nor default method for `coarbitrary'
             In the instance declaration for `Arbitrary RegexSource'

TestCase4.hs:58:0:
    Warning: No explicit method nor default method for `coarbitrary'
             In the instance declaration for `Arbitrary RegexString'
ghc-6.6: panic! (the 'impossible' happened)
  (GHC version 6.6 for powerpc-apple-darwin):
        Iface Lint failure
    Unfolding of regex-parsec-0.85:Text.Regex.Parsec.Wrap.=~{v rVd} <no location
info>:
 In the pattern of a case alternative:
(regex-base-0.80:Text.Regex.Base.RegexLike.:DRegexMaker{d r1Wf} tpl5{v a2Jm}
[lid] :: {regex-base-0.80:Text.Regex.Base.RegexLike.RegexOptions{tc rVJ}
regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}


regex-parsec-0.85:Text.Regex.Parsec.Common.CompOption{tc rWm}


<nt>regex-parsec-0.85:Text.Regex.Parsec.Common.ExecOption{tc rWv}},

                       tpl6{v a2Jn} [lid] :: source{tv a2J8} [tv]

                                          ->
regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM},

                       tpl7{v a2Jo} [lid] ::
regex-parsec-0.85:Text.Regex.Parsec.Common.CompOption{tc rWm}

                                          ->
<nt>regex-parsec-0.85:Text.Regex.Parsec.Common.ExecOption{tc rWv}

                                          -> source{tv a2J8} [tv]

                                          ->
regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM})

 In a case alternative, pattern result type doesn't match scrutinee type:

 Pattern result type: (forall e{tv a2Jq} [tv]
                              (m{tv a2Jr} [tv] :: *
                                                  -> *).
                       (mtl-1.0:Control.Monad.Error.MonadError{tc rji} e{tv
a2Jq} [tv]
                                                                       m{tv
a2Jr} [tv]) =>
                       source{tv a2J8} [tv]
                       -> m{tv a2Jr} [tv]
regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM})
                      -> (forall e{tv a2Js} [tv]
                                 (m{tv a2Jt} [tv] :: *
                                                     -> *).
                          (mtl-1.0:Control.Monad.Error.MonadError{tc rji} e{tv
a2Js} [tv]
                                                                          m{tv
a2Jt} [tv]) =>

regex-parsec-0.85:Text.Regex.Parsec.Common.CompOption{tc rWm}
                          ->
<nt>regex-parsec-0.85:Text.Regex.Parsec.Common.ExecOption{tc rWv}
                          -> source{tv a2J8} [tv]
                          -> m{tv a2Jt} [tv]
regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM})
                      ->
(regex-base-0.80:Text.Regex.Base.RegexLike.:TRegexMaker{tc r1Wd})
regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}

           regex-parsec-0.85:Text.Regex.Parsec.Common.CompOption{tc rWm}

           <nt>regex-parsec-0.85:Text.Regex.Parsec.Common.ExecOption{tc rWv}

           source{tv a2J8} [tv]
 Scrutinee type: {regex-base-0.80:Text.Regex.Base.RegexLike.RegexMaker{tc rSw}
regex-parsec-0.85:Text.Regex.Parsec.Common.Regex{tc rVM}

regex-parsec-0.85:Text.Regex.Parsec.Common.CompOption{tc rWm}

<nt>regex-parsec-0.85:Text.Regex.Parsec.Common.ExecOption{tc rWv}

source{tv a2J8} [tv]}

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

Reason:~/Documents/projects/haskell/develop/regex-unstable/regex-devel/regex-devel/quickcheck
chrisk$



More information about the Glasgow-haskell-users mailing list