My program has a different behaviour under hugs and ghc. I wrote a very simple parser with Parsec and it parses a file quite easily - as long as I use hugs to run it. But when I compile it with ghc, the parse fails. (I'm currently working on WinNT with cygwin). Something else, but related: how do I avoid writing different Code for Hugs and ghc? For example, I had to hide "Word" in Hugs with
import Prelude hiding (Word) but was not allowed to do that with ghc. I ended up using "Wort".
Why the difference? Markus
On Tue, 4 Mar 2003 Markus.Schnell@infineon.com wrote:
My program has a different behaviour under hugs and ghc. I wrote a very simple parser with Parsec and it parses a file quite easily -
I once got bitten by this: "brackets is now called angles, while squares is now called brackets." see http://www.cs.uu.nl/~daan/parsec.html -- -- Johannes Waldmann ---- http://www.informatik.uni-leipzig.de/~joe/ -- -- joe@informatik.uni-leipzig.de -- phone/fax (+49) 341 9732 204/207 --
hi, Markus.Schnell@infineon.com wrote:
Something else, but related: how do I avoid writing different Code for Hugs and ghc? For example, I had to hide "Word" in Hugs with ...
you are not allowed to hide things that are not exported. hugs erroneously used to export Word (and other stuff) from the prelude. i am glad to say that this is not the case anymore (in the CVS version). actually when using the CVS hugs nearly all programs that run in GHC run in hugs as well (Haskell 98 anyways, but even a lot of the other stuff matches). if you find differences (for the haskell 98 part) you should identify which of the two you think is doing something wrong and report it as a bug. bye iavor -- ================================================== | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU | | http://www.cse.ogi.edu/~diatchki | ==================================================
On Tue, Mar 04, 2003 at 04:00:53PM +0100, Markus.Schnell@infineon.com wrote:
My program has a different behaviour under hugs and ghc.
I wrote a very simple parser with Parsec and it parses a file quite easily - as long as I use hugs to run it. But when I compile it with ghc, the parse fails. (I'm currently working on WinNT with cygwin).
Something else, but related: how do I avoid writing different Code for Hugs and ghc?
Try the November release of Hugs with the +N option.
participants (4)
-
Iavor S. Diatchki -
Johannes Waldmann -
Markus.Schnell@infineon.com -
Ross Paterson