
I was getting errors somewhere in haddock about some ambiguous function, so I did a darcs pull to see if that would pull in a fix for the problem (unfortunately I didn't make a note of the errors). But now the compile fails earlier with errors in deSugar/DsMeta.hs: deSugar/DsMeta.hs:471:48: Not in scope: type constructor or class `TH.InlineSpecQ' deSugar/DsMeta.hs:504:16: Not in scope: type constructor or class `TH.TyVarBndr' deSugar/DsMeta.hs:538:50: Not in scope: type constructor or class `TH.TyVarBndr' deSugar/DsMeta.hs:640:29: Not in scope: type constructor or class `TH.Kind' etc. Is the code in darcs supposed to be compilable normally? And what can I do about such situations? Just report them here? -- Colin Adams Preston Lancashire

Excerpts from Colin Paul Adams's message of Sun Mar 29 09:29:43 -0500 2009:
I was getting errors somewhere in haddock about some ambiguous function, so I did a darcs pull to see if that would pull in a fix for the problem (unfortunately I didn't make a note of the errors).
But now the compile fails earlier with errors in deSugar/DsMeta.hs:
deSugar/DsMeta.hs:471:48: Not in scope: type constructor or class `TH.InlineSpecQ'
deSugar/DsMeta.hs:504:16: Not in scope: type constructor or class `TH.TyVarBndr'
deSugar/DsMeta.hs:538:50: Not in scope: type constructor or class `TH.TyVarBndr'
deSugar/DsMeta.hs:640:29: Not in scope: type constructor or class `TH.Kind'
etc.
Is the code in darcs supposed to be compilable normally?
And what can I do about such situations? Just report them here?
Sounds like it has to do with a template haskell update.
From the root of the source tree, do:
$ make distclean $ ./darcs-all pull -a Then, $ ./configure ... $ make ... like usual. Austin

"Austin" == Austin Seipp
writes:
Austin> Excerpts from Colin Paul Adams's message of Sun Mar 29 Austin> 09:29:43 -0500 2009: >> I was getting errors somewhere in haddock about some ambiguous >> function, so I did a darcs pull to see if that would pull in a >> fix for the problem (unfortunately I didn't make a note of the >> errors). >> >> But now the compile fails earlier with errors in >> deSugar/DsMeta.hs: >> >> deSugar/DsMeta.hs:471:48: Not in scope: type constructor or >> class `TH.InlineSpecQ' Austin> Sounds like it has to do with a template haskell update. >> From the root of the source tree, do: Austin> $ make distclean $ ./darcs-all pull -a Austin> $ ./configure ... $ make ... Austin> like usual. Thanks. That gets me bsak to the original problem, which is: [23 of 24] Compiling Haddock.Backends.Html ( src/Haddock/Backends/Html.hs, dist-install/build/haddock/haddock-tmp/Haddock/Backends/Html.o ) src/Haddock/Backends/Html.hs:1495:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39 src/Haddock/Backends/Html.hs:1511:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39 etc. -- Colin Adams Preston Lancashire

The HEAD and several other packages travel together: if you update one you must update the others. http://hackage.haskell.org/trac/ghc/wiki/Commentary/Libraries In this case you need to update template-haskell. Simon | -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users- | bounces@haskell.org] On Behalf Of Colin Paul Adams | Sent: 29 March 2009 15:30 | To: glasgow-haskell-users@haskell.org | Subject: Unable to compile ghc from darcs | | I was getting errors somewhere in haddock about some ambiguous | function, so I did a darcs pull to see if that would pull in a fix for | the problem (unfortunately I didn't make a note of the errors). | | But now the compile fails earlier with errors in deSugar/DsMeta.hs: | | deSugar/DsMeta.hs:471:48: | Not in scope: type constructor or class `TH.InlineSpecQ' | | deSugar/DsMeta.hs:504:16: | Not in scope: type constructor or class `TH.TyVarBndr' | | deSugar/DsMeta.hs:538:50: | Not in scope: type constructor or class `TH.TyVarBndr' | | deSugar/DsMeta.hs:640:29: | Not in scope: type constructor or class `TH.Kind' | | etc. | | Is the code in darcs supposed to be compilable normally? | | And what can I do about such situations? Just report them here? | -- | Colin Adams | Preston Lancashire | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Hello Colin,
In my working with GHC, I have found this page very helpful since it
succinctly outlines the steps for Rebuilding GHC and ensuring you are
up-to-date with everything GHC needs:
http://hackage.haskell.org/trac/ghc/wiki/Building/Rebuilding
Best of luck!
--
Donnie Jones
On Mon, Mar 30, 2009 at 2:56 AM, Simon Peyton-Jones
The HEAD and several other packages travel together: if you update one you must update the others.
http://hackage.haskell.org/trac/ghc/wiki/Commentary/Libraries
In this case you need to update template-haskell.
Simon
| -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users- | bounces@haskell.org] On Behalf Of Colin Paul Adams | Sent: 29 March 2009 15:30 | To: glasgow-haskell-users@haskell.org | Subject: Unable to compile ghc from darcs | | I was getting errors somewhere in haddock about some ambiguous | function, so I did a darcs pull to see if that would pull in a fix for | the problem (unfortunately I didn't make a note of the errors). | | But now the compile fails earlier with errors in deSugar/DsMeta.hs: | | deSugar/DsMeta.hs:471:48: | Not in scope: type constructor or class `TH.InlineSpecQ' | | deSugar/DsMeta.hs:504:16: | Not in scope: type constructor or class `TH.TyVarBndr' | | deSugar/DsMeta.hs:538:50: | Not in scope: type constructor or class `TH.TyVarBndr' | | deSugar/DsMeta.hs:640:29: | Not in scope: type constructor or class `TH.Kind' | | etc. | | Is the code in darcs supposed to be compilable normally? | | And what can I do about such situations? Just report them here? | -- | Colin Adams | Preston Lancashire | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

"Donnie" == Donnie Jones
writes:
Donnie> Hello Colin, In my working with GHC, I have found this Donnie> page very helpful since it succinctly outlines the steps Donnie> for Rebuilding GHC and ensuring you are up-to-date with Donnie> everything GHC needs: Donnie> http://hackage.haskell.org/trac/ghc/wiki/Building/Rebuilding Thanks. I did this and it cured the TH problems, but I still have haddock problems: src/Haddock/Backends/Html.hs:1495:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39 src/Haddock/Backends/Html.hs:1511:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39 src/Haddock/Backends/Html.hs:1515:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39 src/Haddock/Backends/Html.hs:1532:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39 -- Colin Adams Preston Lancashire

Colin Paul Adams wrote:
"Donnie" == Donnie Jones
writes: Donnie> Hello Colin, In my working with GHC, I have found this Donnie> page very helpful since it succinctly outlines the steps Donnie> for Rebuilding GHC and ensuring you are up-to-date with Donnie> everything GHC needs: Donnie> http://hackage.haskell.org/trac/ghc/wiki/Building/Rebuilding
Thanks.
I did this and it cured the TH problems, but I still have haddock problems:
src/Haddock/Backends/Html.hs:1495:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39
src/Haddock/Backends/Html.hs:1511:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39
src/Haddock/Backends/Html.hs:1515:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39
src/Haddock/Backends/Html.hs:1532:4: Ambiguous occurrence `maybeParen' It could refer to either `Haddock.Backends.Html.maybeParen', defined at src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', imported from GHC at src/Haddock/Backends/Html.hs:42:0-39
Are you using a build tree made with lndir? If you, you probably want to link the _darcs directory from your source tree into your build tree. This will enable configure to generate a more accurate version number, which will probably fix the compile problem with Haddock. Cheers, Simon

"Simon" == Simon Marlow
writes:
>> src/Haddock/Backends/Html.hs:1532:4: Ambiguous occurrence >> `maybeParen' It could refer to either >> `Haddock.Backends.Html.maybeParen', defined at >> src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', >> imported from GHC at src/Haddock/Backends/Html.hs:42:0-39 >> Simon> Are you using a build tree made with lndir? If you, you probably want Simon> to link the _darcs directory from your source tree into Simon> your build tree. This will enable configure to generate a Simon> more accurate version number, which will probably fix the Simon> compile problem with Haddock. I don't think so. I am just typing ./configure and make within the source tree (the parent of the _darcs directory). Is this bad? -- Colin Adams Preston Lancashire

Colin Paul Adams wrote:
"Simon" == Simon Marlow
writes: >> src/Haddock/Backends/Html.hs:1532:4: Ambiguous occurrence >> `maybeParen' It could refer to either >> `Haddock.Backends.Html.maybeParen', defined at >> src/Haddock/Backends/Html.hs:1462:0 or `GHC.maybeParen', >> imported from GHC at src/Haddock/Backends/Html.hs:42:0-39 >>
Simon> Are you using a build tree made with lndir? If you, you probably want Simon> to link the _darcs directory from your source tree into Simon> your build tree. This will enable configure to generate a Simon> more accurate version number, which will probably fix the Simon> compile problem with Haddock.
I don't think so. I am just typing ./configure and make within the source tree (the parent of the _darcs directory). Is this bad?
No, that should be fine. The Haddock build error indicates that either your Haddock sources are out of date with respect to your GHC sources, or Haddock thinks your GHC is a different version than it really is. What GHC are you using to bootstrap with, BTW? Cheers, Simon

"Simon" == Simon Marlow
writes:
Simon> Are you using a build tree made with lndir? If you, you Simon> probably want to link the _darcs directory from your source Simon> tree into your build tree. This will enable configure to Simon> generate a more accurate version number, which will Simon> probably fix the compile problem with Haddock. >> >> I don't think so. I am just typing ./configure and make within >> the source tree (the parent of the _darcs directory). Is this >> bad? Simon> No, that should be fine. The Haddock build error indicates Simon> that either your Haddock sources are out of date with Simon> respect to your GHC sources, or Haddock thinks your GHC is Simon> a different version than it really is. Simon> What GHC are you using to bootstrap with, BTW? 6.11.20090319 (formerly bootstrapped from 6.10.1). So it used to work. haddock --version says 2.4.2 -- Colin Adams Preston Lancashire

Colin Paul Adams wrote:
"Simon" == Simon Marlow
writes: Simon> Are you using a build tree made with lndir? If you, you Simon> probably want to link the _darcs directory from your source Simon> tree into your build tree. This will enable configure to Simon> generate a more accurate version number, which will Simon> probably fix the compile problem with Haddock. >> >> I don't think so. I am just typing ./configure and make within >> the source tree (the parent of the _darcs directory). Is this >> bad?
Simon> No, that should be fine. The Haddock build error indicates Simon> that either your Haddock sources are out of date with Simon> respect to your GHC sources, or Haddock thinks your GHC is Simon> a different version than it really is.
Simon> What GHC are you using to bootstrap with, BTW?
6.11.20090319 (formerly bootstrapped from 6.10.1).
Ah, there's your problem. In general you can't bootstrap GHC using a development snapshot, we only support building using fixed released versions. Cheers, Simon

Hello Simon and Colin,
This information is available on the Prequisites page of the GHC wiki;
however, it's buried at the bottom of the page. I have updated the
page to mention that a stable release version of GHC is needed when
setting up for Linux and Windows, and I have changed the "Other"
section to be called "Details" since this section describes in detail
the software necessary for building GHC.
http://hackage.haskell.org/trac/ghc/wiki/Building/Prerequisites
Hope this helps other users in the future.
--
Donnie Jones
On Tue, Mar 31, 2009 at 8:33 AM, Simon Marlow
Colin Paul Adams wrote:
> > "Simon" == Simon Marlow
writes: Simon> Are you using a build tree made with lndir? If you, you Simon> probably want to link the _darcs directory from your source Simon> tree into your build tree. This will enable configure to Simon> generate a more accurate version number, which will Simon> probably fix the compile problem with Haddock. >> >> I don't think so. I am just typing ./configure and make within >> the source tree (the parent of the _darcs directory). Is this >> bad?
Simon> No, that should be fine. The Haddock build error indicates Simon> that either your Haddock sources are out of date with Simon> respect to your GHC sources, or Haddock thinks your GHC is Simon> a different version than it really is.
Simon> What GHC are you using to bootstrap with, BTW?
6.11.20090319 (formerly bootstrapped from 6.10.1).
Ah, there's your problem. In general you can't bootstrap GHC using a development snapshot, we only support building using fixed released versions.
Cheers, Simon
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Donnie Jones wrote:
Hello Simon and Colin,
This information is available on the Prequisites page of the GHC wiki; however, it's buried at the bottom of the page. I have updated the page to mention that a stable release version of GHC is needed when setting up for Linux and Windows, and I have changed the "Other" section to be called "Details" since this section describes in detail the software necessary for building GHC.
http://hackage.haskell.org/trac/ghc/wiki/Building/Prerequisites
Thanks Donnie. I've also just modified the configure script so it issues the following helpful message: configure: error: /home/simonmar/builds/testing/ghc/stage2-inplace/ghc is a development snapshot of GHC, version 6.11 Bootstrapping using this version of GHC is not supported, and may not work. Use --enable-bootstrap-with-devel-snapshot to try it anyway, or --with-ghc to specify a different GHC to use. Cheers, Simon

"Simon" == Simon Marlow
writes:
>> 6.11.20090319 (formerly bootstrapped from 6.10.1). Simon> Ah, there's your problem. In general you can't bootstrap Simon> GHC using a development snapshot, we only support building Simon> using fixed released versions. So I re-installed ghc 6.10.1. Same problem. N.B. haddock --version now reports 2.3.0 -- Colin Adams Preston Lancashire

Colin Paul Adams wrote:
"Simon" == Simon Marlow
writes: >> 6.11.20090319 (formerly bootstrapped from 6.10.1).
Simon> Ah, there's your problem. In general you can't bootstrap Simon> GHC using a development snapshot, we only support building Simon> using fixed released versions.
So I re-installed ghc 6.10.1.
Same problem.
N.B. haddock --version now reports 2.3.0
I have to ask - you did do a complete 'make distclean' etc. before rebuilding? If so, could you send me a complete log of the build. Cheers, Simon

"Simon" == Simon Marlow
writes:
Simon> Colin Paul Adams wrote:
>>>>>>> "Simon" == Simon Marlow

Colin Paul Adams wrote:
"Simon" == Simon Marlow
writes: Simon> Colin Paul Adams wrote: >>>>>>> "Simon" == Simon Marlow
writes: >> >> >> 6.11.20090319 (formerly bootstrapped from 6.10.1). >> Simon> Ah, there's your problem. In general you can't bootstrap Simon> GHC using a development snapshot, we only support building Simon> using fixed released versions. >> >> So I re-installed ghc 6.10.1. >> >> Same problem. >> >> N.B. haddock --version now reports 2.3.0 Simon> I have to ask - you did do a complete 'make distclean' Simon> etc. before rebuilding?
I did.
Simon> If so, could you send me a complete log of the build.
My xterm window doesn't have a big enough buffer. Should I run the complete procedure (starting with make distclean) all over again, diverting output and error to a file?
Yes, I normally do it like this: 'make |& tee log' (or if you're using an impoverished shell, 'make 2>&1 | tee log'). The build seems to be working smoothly for most people at the moment, so I'm fairly sure this is something specific to your setup somehow. Could you check for things like local changes: $ ./darcs-all w -s $ ./push-all http://darcs.haskell.org/ --dry-run Cheers, Simon

"Simon" == Simon Marlow
writes:
Simon> $ ./darcs-all w -s Only: == running darcs w -s --repodir . M ./compiler/ghc.cabal.in -5 +6 M ./compiler/main/DynFlags.hs +4 M ./compiler/main/GHC.hs +1 M ./compiler/main/HscTypes.lhs -1 +1 M ./compiler/rename/RnSource.lhs +3 M ./compiler/simplCore/SimplCore.lhs -4 +4 which is what I expect. Nothing that touches Haddock, as far as I know. Simon> $ ./push-all http://darcs.haskell.org/ --dry-run == running darcs push --no-set-default http://darcs.haskell.org//ghc --dry-run --repodir . NOTE: Pushing to http URLs is not supported. You may be able to hack this to work using DARCS_APPLY_HTTP Would push the following changes: Fri Mar 27 19:06:16 GMT 2009 colin@colina.demon.co.uk * Incorporated ESC/Haskell was all that was found. That's the comment for the changes above. -- Colin Adams Preston Lancashire

Colin Paul Adams wrote:
"Simon" == Simon Marlow
writes: Simon> $ ./darcs-all w -s
Only:
== running darcs w -s --repodir . M ./compiler/ghc.cabal.in -5 +6 M ./compiler/main/DynFlags.hs +4 M ./compiler/main/GHC.hs +1 M ./compiler/main/HscTypes.lhs -1 +1 M ./compiler/rename/RnSource.lhs +3 M ./compiler/simplCore/SimplCore.lhs -4 +4
Is it possible that you changed the exports of the GHC module, perhaps? Haddock is complaining about a name class with maybeParen from the GHC module, but I can't see how maybeParen is exported from GHC, unless that's something you changed. Cheers, Simon

"Simon" == Simon Marlow
writes:
Simon> Is it possible that you changed the exports of the GHC Simon> module, perhaps? Haddock is complaining about a name class Simon> with maybeParen from the GHC module, but I can't see how Simon> maybeParen is exported from GHC, unless that's something Simon> you changed. Maybe by accident. How do I do a diff for ghc/ghc.cabal.in against the online repository? If I search for maybeParen in the added modules, I can only find one occurrence, and that is in a commented-out functions. -- Colin Adams Preston Lancashire

Colin Paul Adams wrote:
"Simon" == Simon Marlow
writes: Simon> Is it possible that you changed the exports of the GHC Simon> module, perhaps? Haddock is complaining about a name class Simon> with maybeParen from the GHC module, but I can't see how Simon> maybeParen is exported from GHC, unless that's something Simon> you changed.
Maybe by accident. How do I do a diff for ghc/ghc.cabal.in against the online repository?
darcs w ghc/ghc.cabal.in that shows your local changes.
If I search for maybeParen in the added modules, I can only find one occurrence, and that is in a commented-out functions.
start with 'darcs w' - I noticed you had a 1-line change to GHC.hs, what was that? Also you had a local patch "Incorporated ESC/Haskell", perhaps that made some changes? Cheers, Simon

"Simon" == Simon Marlow
writes:
Simon> start with 'darcs w' - I noticed you had a 1-line change to Simon> GHC.hs, what was that? Also you had a local patch You can see it in the diff below. But as the diff is not complete, it's not very informative. Simon> "Incorporated ESC/Haskell", perhaps that made some changes? Yes, but I can't see how they could affect haddock. Here is the output of darcs w. I don't see anything that explains the problem. But it is not conatinging the full history of changes from the online repository.: hunk ./compiler/ghc.cabal.in 68 + Build-Depends: parsec >= 2.1 && < 3 hunk ./compiler/ghc.cabal.in 452 - Verify - BasicAbs - EscSyn + Verify + BasicAbs + EscSyn hunk ./compiler/ghc.cabal.in 457 - HsContract - TcHsContract + HsContract + TcHsContract hunk ./compiler/main/DynFlags.hs 143 + | Opt_D_dump_vr + | Opt_D_dump_vr_trace hunk ./compiler/main/DynFlags.hs 963 + | CoreDoVerify Int -- the Int: unrolling depth during CEG unrolling + | CoreDoVerifyWOThmProver Int -- the Int: unrolling depth during CEG unrolling hunk ./compiler/main/GHC.hs 1228 + mg_contracts = emptyContractEnv, hunk ./compiler/main/HscTypes.lhs 1019 - mg_contracts :: !ContractEnv, -- contracts {-# CONTRACT f :: {x | x>0} -> {r | r > x} #-} + mg_contracts :: !ContractEnv, -- ^ contracts {-# CONTRACT f :: {x | x>0} -> {r | r > x} #-} hunk ./compiler/rename/RnSource.lhs 19 + extendLocalRdrEnv, hunk ./compiler/rename/RnSource.lhs 55 +import HsContract + hunk ./compiler/simplCore/SimplCore.lhs 183 -doCorePass (CoreDoVerify n) = {-# SCC "Verification" #-} ^I$ - verifyBinds n +--doCorePass (CoreDoVerify n) = {-# SCC "Verification" #-} ^I$ +-- verifyBinds n hunk ./compiler/simplCore/SimplCore.lhs 186 -doCorePass (CoreDoVerifyWOThmProver n) = {-# SCC "VerifyWOProver" #-} $ - verifyBindsWOThmProver n +--doCorePass (CoreDoVerifyWOThmProver n) = {-# SCC "VerifyWOProver" #-} $ +-- verifyBindsWOThmProver n -- Colin Adams Preston Lancashire

"Colin" == Colin Paul Adams
writes:
"Simon" == Simon Marlow
writes:
Simon> "Incorporated ESC/Haskell", perhaps that made some changes? I found it. maybeParen was added to the export list for HsTypes. I've added a hiding clause for it when importing HsSyn unqualified into GHC. (I don't know if that's the best fix - this isn't my code - I'm just trying to incorporate it into the current version so I can check the contracts in my code. I'm really out of my depth - I should learn to swim first) Anyway, it does the trick - the make now completes. -- Colin Adams Preston Lancashire
participants (5)
-
Austin Seipp
-
Colin Paul Adams
-
Donnie Jones
-
Simon Marlow
-
Simon Peyton-Jones