Building ghc stages - solved

Simon Peyton-Jones simonpj at microsoft.com
Thu Apr 20 17:35:20 EDT 2006


Currently
	-fglasgow-exts
implies
	-fth

That is, you get Template Haskell if you specify -fglasgow-exts.  The
trouble is that if you don't know about TH, then the error messages can
be deeply strange, as Marc found.

Suggestion: if you want TH, you must specify -fth explicitly;
-fglasgow-exts won't imply it.  That way any messages about staging will
only happen if you've explicitly asked for TH. 

Any objections?

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org
[mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of Marc Weber
| Sent: 18 April 2006 19:22
| To: glasgow-haskell-users at haskell.org
| Subject: Re: Building ghc stages - solved
| 
| On Mon, Apr 17, 2006 at 01:20:34PM +0200, Marc Weber wrote:
| > GHC stage restriction: `view'
| > is used in a top-level splice, and must be imported, not
| > defined locally
| 
| The solution was to change
| where elemFromList  = listToMaybe $ drop 1 $(dropWhile (/= view) $
(xs++[x]))
| into :
| where elemFromList  = listToMaybe $ drop 1 $ (dropWhile (/= view) $
(xs++[x]))
|                                             ^
| 
| Really missleading error message ;)
| 
| Marc
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


More information about the Glasgow-haskell-users mailing list