patch applied (ghc): Major change in compilation of
instancedeclarations (fix Trac #955, #2328)
Simon Peyton-Jones
simonpj at microsoft.com
Thu Sep 4 12:58:52 EDT 2008
Good point, Claus. Having thought I was done, I have, sadly, spent the entire day trying to unravel the subtle consequences of the way regex-base (and DoCon in fact) use overlapping instances.
I think I've fixed that now, but am chasing a specialiser bug -- I can't think how my last nofib run went so well. Sigh
Ian also points out that a couple of test fail. One (tc192) is because of the change to 'pure'; I'm pushing a patch for that. The other (tc176) I need to look at more. It's odd because I did validate.
So I will not commit tonight. You'll find that the odd test fails; I'll try to finish this off tomorrow.
Simon
| -----Original Message-----
| From: Claus Reinke [mailto:claus.reinke at talk21.com]
| Sent: 03 September 2008 23:22
| To: Simon Peyton-Jones; cvs-ghc at haskell.org
| Subject: Re: patch applied (ghc): Major change in compilation of instancedeclarations (fix Trac #955,
| #2328)
|
|
| I'm not sure whether it is this patch, but regex-base is now broken.
| From the fragment of your exchange with Serge, I understand that
| overlap handling has changed in some way?
|
| Browsing through the code indicated in the first error message, it
| seems as if the implementation of method 'match' calls 'matchM'
| with exactly the same 'regex', 'source', and 'target' types, so if those
| types are sufficient to select that instance for 'match', why would
| there be an unresolved overlap when 'match' calls 'matchM'?
|
| Claus (who is still convinced that extralibs provide a good test for ghc;-)
|
|
| -- last lines of make for ghc head on windows
|
| c:/fptools/ghc/ghc/stage1-inplace/ghc.exe -package-name
| regex-base-0.72.0.1 -hide-all-packages -no-user-package-conf -i -idist/build -i. -idist/build/autogen
| -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir
| dist/build -hidir dist/build -stubdir dist/build -package array-0.1 -package base-3.0.3.0 -package
| bytestring-0.9 -O -Wall -O2 -XMultiParamTypeClasses -XFunctionalDependencies -XCPP -idist/build -H32m
| -O2 -Wall -fno-warn-deprecated-flags -c Text/Regex/Base/Context.hs -o
| dist/build/Text/Regex/Base/Context.o -ohi dist/build/Text/Regex/Base/Context.hi
|
| Text\Regex\Base\Context.hs:200:34:
| Overlapping instances for RegexContext a b (Array Int b)
| arising from a use of `matchM'
| at Text\Regex\Base\Context.hs:200:34-43
| Matching instances:
| instance (RegexLike a b) => RegexContext a b (Array Int b)
| -- Defined at Text\Regex\Base\Context.hs:199:9-57
| instance (RegexLike a b) => RegexContext a b MatchArray
| -- Defined at Text\Regex\Base\Context.hs:190:9-54
| (The choice depends on the instantiation of `a, b'
| To pick the first instance above, use -XIncoherentInstances
| when compiling the other instance declarations)
| In the third argument of `maybe', namely `(matchM r s)'
| In the expression: maybe nullArray id (matchM r s)
| In the definition of `match':
| match r s = maybe nullArray id (matchM r s)
|
| Text\Regex\Base\Context.hs:230:11:
| Overlapping instances for RegexContext a b [MatchArray]
| arising from a use of `nullFail'
| at Text\Regex\Base\Context.hs:230:11-18
| Matching instances:
| instance (RegexLike a b) => RegexContext a b [MatchArray]
| -- Defined at Text\Regex\Base\Context.hs:228:9-56
| instance (RegexLike a b) => RegexContext a b [Array Int b]
| -- Defined at Text\Regex\Base\Context.hs:248:9-57
| instance (RegexLike a b) => RegexContext a b [b]
| -- Defined at Text\Regex\Base\Context.hs:244:9-47
| (The choice depends on the instantiation of `a, b'
| To pick the first instance above, use -XIncoherentInstances
| when compiling the other instance declarations)
| In the expression: nullFail
| In the definition of `matchM': matchM = nullFail
| In the instance declaration for `RegexContext a b [MatchArray]'
|
| Text\Regex\Base\Context.hs:241:11:
| Overlapping instances for RegexContext
| a b [(MatchOffset, MatchLength)]
| arising from a use of `nullFail'
| at Text\Regex\Base\Context.hs:241:11-18
| Matching instances:
| instance (RegexLike a b) =>
| RegexContext a b [(MatchOffset, MatchLength)]
| -- Defined at Text\Regex\Base\Context.hs:239:9-71
| instance (RegexLike a b) => RegexContext a b [b]
| -- Defined at Text\Regex\Base\Context.hs:244:9-47
| (The choice depends on the instantiation of `a, b'
| To pick the first instance above, use -XIncoherentInstances
| when compiling the other instance declarations)
| In the expression: nullFail
| In the definition of `matchM': matchM = nullFail
| In the instance declaration for `RegexContext
| a b [(MatchOffset, MatchLength)]'
|
| Text\Regex\Base\Context.hs:246:11:
| Overlapping instances for RegexContext a b [b]
| arising from a use of `nullFail'
| at Text\Regex\Base\Context.hs:246:11-18
| Matching instances:
| instance (RegexLike a b) => RegexContext a b [b]
| -- Defined at Text\Regex\Base\Context.hs:244:9-47
| instance (RegexLike a b) =>
| RegexContext a b [(MatchOffset, MatchLength)]
| -- Defined at Text\Regex\Base\Context.hs:239:9-71
| instance (RegexLike a b) => RegexContext a b [MatchArray]
| -- Defined at Text\Regex\Base\Context.hs:228:9-56
| (The choice depends on the instantiation of `a, b'
| To pick the first instance above, use -XIncoherentInstances
| when compiling the other instance declarations)
| In the expression: nullFail
| In the definition of `matchM': matchM = nullFail
| In the instance declaration for `RegexContext a b [b]'
|
| Text\Regex\Base\Context.hs:250:11:
| Overlapping instances for RegexContext a b [Array Int b]
| arising from a use of `nullFail'
| at Text\Regex\Base\Context.hs:250:11-18
| Matching instances:
| instance (RegexLike a b) => RegexContext a b [Array Int b]
| -- Defined at Text\Regex\Base\Context.hs:248:9-57
| instance (RegexLike a b) => RegexContext a b [MatchArray]
| -- Defined at Text\Regex\Base\Context.hs:228:9-56
| (The choice depends on the instantiation of `a, b'
| To pick the first instance above, use -XIncoherentInstances
| when compiling the other instance declarations)
| In the expression: nullFail
| In the definition of `matchM': matchM = nullFail
| In the instance declaration for `RegexContext a b [Array Int b]'
|
| make[2]: *** [dist/build/Text/Regex/Base/Context.o] Error 1
| make[2]: Leaving directory `/cygdrive/c/fptools/ghc/libraries/regex-base'
| make[1]: *** [make.library.regex-base] Error 2
| make[1]: Leaving directory `/cygdrive/c/fptools/ghc/libraries'
| make: *** [stage1] Error 2
|
More information about the Cvs-ghc
mailing list