Re: [Haskell-cafe] Adding GLUT package to WinHugs

Hi Peter,
Also typing runhugs Setup.hs configure fails with
runhugs: Error occurred ERROR "c:\program files\winhugs\packages\base\Text\ParserCombinators\ReadP.hs":156 - Syntax error in type expression (unexpected `.')
This is because Cabal gets it wrong. You need to type runhugs -98 Setup configure. There is an easy fix, which is for the Cabal developers to always use the bundled ReadP rather than the library one. I talked to Duncan about this in Germany, and he said he'd fix it :-) Thanks Neil

Ross, What do you reckon we should do? We could change: #if __GLASGOW_HASKELL__ >= 603 || __HUGS__ import Text.ParserCombinators.ReadP hiding (ReadP) import qualified Text.ParserCombinators.ReadP as ReadP ... to drop the || __HUGS__ and have hugs always use the bundled H98 ReadP, or we can continue to use the non-H98 one that comes with hugs. This has the obvious downside that users need to know to run: runhugs -98 Setup.hs which is a bit unfortunate. Duncan On Wed, 2007-10-10 at 18:01 +0100, Neil Mitchell wrote:
Hi Peter,
Also typing runhugs Setup.hs configure fails with
runhugs: Error occurred ERROR "c:\program files\winhugs\packages\base\Text\ParserCombinators\ReadP.hs":156 - Syntax error in type expression (unexpected `.')
This is because Cabal gets it wrong. You need to type runhugs -98 Setup configure. There is an easy fix, which is for the Cabal developers to always use the bundled ReadP rather than the library one. I talked to Duncan about this in Germany, and he said he'd fix it :-)

On Mon, Oct 15, 2007 at 10:10:40PM +0100, Duncan Coutts wrote:
What do you reckon we should do? We could change:
#if __GLASGOW_HASKELL__ >= 603 || __HUGS__
import Text.ParserCombinators.ReadP hiding (ReadP) import qualified Text.ParserCombinators.ReadP as ReadP ...
to drop the || __HUGS__ and have hugs always use the bundled H98 ReadP, or we can continue to use the non-H98 one that comes with hugs. This has the obvious downside that users need to know to run:
runhugs -98 Setup.hs
which is a bit unfortunate.
On the other hand, changing the ReadP in Cabal would leave the parsers in Cabal incompatible with other ReadP parsers.

On Tue, 2007-10-16 at 00:31 +0100, Ross Paterson wrote:
On Mon, Oct 15, 2007 at 10:10:40PM +0100, Duncan Coutts wrote:
What do you reckon we should do? We could change:
#if __GLASGOW_HASKELL__ >= 603 || __HUGS__
import Text.ParserCombinators.ReadP hiding (ReadP) import qualified Text.ParserCombinators.ReadP as ReadP ...
to drop the || __HUGS__ and have hugs always use the bundled H98 ReadP, or we can continue to use the non-H98 one that comes with hugs. This has the obvious downside that users need to know to run:
runhugs -98 Setup.hs
which is a bit unfortunate.
On the other hand, changing the ReadP in Cabal would leave the parsers in Cabal incompatible with other ReadP parsers.
We already have this problem. If people import the 'standard' ReadP and use it with Cabal then we get type errors on systems where we use the bundled one. We've already had to change a few imports of Text.ParserCombinators.ReadP to Distribution.Compat.ReadP, eg in cabal-install. The same applies to any Setup script that uses Cabal's parser functions. Duncan
participants (3)
-
Duncan Coutts
-
Neil Mitchell
-
Ross Paterson