RE: GHC import bug (# 231631)
I'm sending this to the list, because I did not get much satisfaction from the SourceForge bug-tracking tool. I have just encountered a GHC bug similar to the one numbered 231631 on SourceForge. I have some further observations about it, and a small tar file (attached) showing how to reproduce a stronger form of it. The bug is still present in 5.02, and it does not have to involve the current directory - any directory in the import path will do. Nor do I see any connection to the re-compilation system, or package manager. Ok, I propose to change the story to this: In single-file-compilation mode (ie. ghc -c), we search for .hi files *only* when locating imported modules. this will have the slightly unfortunate consequence that when compiling a module in GHCi you might end up importing different modules than when the module is compiled using ghc -c, but it is a more sensible thing to do in ghc -c mode. Cheers, Simon ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
compiler bug
Hello, Im relativly new at this, when i tried to compile i got this message: - ghc-5.00.2: panic! (the `impossible' happened, GHC version 5.00.2): does not exist Action: openFile Reason: dangling symlink File: ./GameFrontEnd.hi Please report it as a compiler bug to [EMAIL PROTECTED], or http://sourceforge.net/projects/ghc/. - GameFrontEnd.hi is a file that has been proven to work, by my university lecturers, somthing we are told to take for granted, but they're not around at the moment so i send you this in the hope you can tell me what it means. Cheers. ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
RE: Bug with -h and -c together
Here's another one, using GHC 5.02 [ian@urchin current]$ cat W.lhs module Main where main :: IO() main = putStrLn $ show $ last [1..10] [ian@urchin current]$ ghc W.lhs -prof -auto-all -o W [ian@urchin current]$ ./W +RTS -h 10 [ian@urchin current]$ ./W +RTS -c 10 [ian@urchin current]$ ./W +RTS -h -c Segmentation fault (core dumped) [ian@urchin current]$ The compacting collector is currently incompatible with single-generation GC (i.e. -G1), and the heap profiler automatically turns on -G1. We added a test to automatically disable compaction in the presence of -G1, but the patch got overlooked during the run-up to the release of 5.02 and never made it into the stable branch. The workaround is don't do that :-) Cheers, Simon ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
RE: Mysterious type error with Glasgow Haskell
George For a change, this is your fault! You wrote: let minus :: Int - Int - Int minus = (-) toRValue :: Int - Radio value toRValue -1 = NoRadio -- (*) toRValue i = ... Alas, the line marked (*) defines the infix operator (-). So in effect you have let (-) toRValue 1 = NoRadio minus = (-) toRValue i = ... And then the result you get isn't surprising. Solution: put parens round your (-1). I don't see how to give a better error message given the defn of Haskell as it is! But it's a nice example. Simon | -Original Message- | From: George Russell [mailto:[EMAIL PROTECTED]] | Sent: 18 October 2001 15:55 | To: [EMAIL PROTECTED]; Simon Peyton-Jones; Simon Marlow | Subject: Mysterious type error with Glasgow Haskell | | | Hello Glasgow hackers (cc'd to both Simons as the mailing | list will complain that this bug report is too big). | | If you don't redefine the (-) operator, then | |minus :: Int - Int - Int |minus = (-) | should work, shouldn't it? Also it should be equivalent to |minus :: Int - Int - Int |minus a b = a + (-1) * b | | The attached bzip2 file contains (1) a lot of .hi files; (2) | a file SimpleForm.hs. Compiling it with ghc5.02 on | Sparc/Solaris, with the following command line: | | /usr/local/pub-bkb/ghc/ghc-latest/bin/ghc -c | toolkit/SimpleForm.hs -package concurrent -package data | -package net -package posix -package text -package util | -package lang | -i.:packer:resources:canvasitems:kernel:containers:menuitems:t | oolkit:components:toplevel:widgets:devices:textitems:tix:/home | /ger/uni/util:/home/ger/uni/events:/home/ger/uni/reactor:/home | /ger/uni/server:/home/ger/uni/htk:/home/ger/uni/davinci:/home/ | ger/uni/graphs:/home/ger/uni/tools:/home/ger/uni/cvs:/home/ger | /uni/types -fglasgow-exts -fallow-overlapping-instances | -fallow-undecidable-instances -cpp -ddump-hi-diffs -H25M | -recomp -fwarn-deprecations -Onot -DDEBUG -Onot -H30M -fasm | | gives an error: | | toolkit/SimpleForm.hs:379: | Couldn't match `Int' against `Radio x' | Expected type: Int - Int - Int | Inferred type: Int - Int - Radio x | In the definition of `minus': (-) | | However if you go to line 379, comment out the line minus = | (-) and decomment the next line to give minus a b = a + | (-1) * b the error message magically disappears and it goes | through the compiler. | | Am I somehow mistaken, or is this a bug in GHC? | ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs