AMP (#8004) almost finished, review would be nice

Simon Peyton-Jones simonpj at microsoft.com
Wed Sep 4 13:24:37 CEST 2013


| GHC/Base.lhs:1:1:
|     GHC internal error: ‛GHC.Base.Monad’ is not in scope during type
|     checking, but it passed the renamer tcl_env of environment: []

I don't understand this.  The message comes from TcEnv.notFound, presumably from tcLookupGlobal.  But the latter only calls notFound for an internal name (which this is not), or when compiling the very same module (GHC.Base in this case). But I think you are saying this message

So something mysterious is going on.  Can you try the obvious thing again and let's look at it?  

(I suppose you could commit as-is (when you've unravelled the validation questions) so that I can see it too.)

Simon

| 
| (and the full build errored with "missing interfaces for GHC.Base"). The
| maybe business fixed this. (Subject of the discussion: "Cannot make
| ghc: Failed to load interface for GHC.Base")
| 
| Also note that the Prelude is not necessarily imported, so I think the
| lookups here can fail regardless of the issue mentioned before.
| 
| 
| 
| > I don't see any documentation.
| 
| In what sense? More comments, longer function headers? I thought the
| names used were clear, with comments giving an overview over longer
| sections. (If you're talking about Haddock: the AMP functions are not
| exported, hence no HTML docs. tcAmpWarn is called from inside
| tcTopSrcDecls in the same module.)
| 
| 
| 
| > I don't know about this validation stuff; maybe others can help.
| > Why not *not* add -fno-warn-amp to GcStage1HcOpts?
| 
| The flag is mysteriously passed to the existing GHC, i.e. it appears
| when building phase 1. However, the current compiler doesn't know about
| the flag and fails. (This was my initial attempt.)
| 
| 
| 
| Thanks for the advice,
| David/quchen


More information about the ghc-devs mailing list