RE: ghc-5.02.x: getTcTyVar
Thanks. Turned out to be a rather bizarre thing. The derived instance should look like instance X T c = Show S where ... but the 'c' in the instance that doesn't appear after the = sent the system into a loop. I hadn't anticipated that I spent longer than I should have peering at this, and decided in the end that it is asking too much from the deriving mechanism to figure this out. The main difficulty is finding the fixpoint when figuring out the context for the instance declarations. So I just made it illegal. You'll have to write out your Show instance. An intermediate position would be to have some syntax for writing down the contexts of the instance decl. Simon | -Original Message- | From: Armin Groesslinger [mailto:[EMAIL PROTECTED]] | Sent: 28 December 2001 03:35 | To: [EMAIL PROTECTED] | Subject: ghc-5.02.x: getTcTyVar | | | Hello, | | when I try to compile the program below with ghc | -fglasgow-exts -fallow-undecidable-instances ghc-5.02.1 and | 5.02.2 (from today's | CVS) go into an infinite loop saying | | getTcTyVar c{-r4D-} | | all the time instead of complaining for the missing | instance X T c to derive Show S . | | | Regards, | | Armin | | | | module Test where | | data T = T Integer | | class X a b | a - b where | f :: a - b | | instance X T c = Show T where | show _ = | | data S = S T deriving Show | | | ___ | Glasgow-haskell-bugs mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/glasgow-| haskell-bugs | ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Failed to find interface decl for `Offside.a1' with -O2
Hi guys, I'm afraid I haven't got a simple test case for this one. ghc is giving me the error Failed to find interface decl for `Offside.a1' in a rather large program. I have shown how to reproduce the problem below (indenting the output). The code, compiled as shown below, is at http://c93.keble.ox.ac.uk/~ian/igl-0.0.8-b1.tar.gz $ hmake -ghc Project -package lang -O2 ghc -package lang -O2 -c -o Tokens.o Tokens.lhs ghc -package lang -O2 -c -o Tree.o Tree.lhs ghc -package lang -O2 -c -o Subject.o Subject.lhs ghc -package lang -O2 -c -o PPTeX.o PPTeX.lhs ghc -package lang -O2 -c -o Position.o Position.lhs ghc -package lang -O2 -c -o Either.o Either.lhs ghc -package lang -O2 -c -o PCbase.o PCbase.lhs ghc -package lang -O2 -c -o PC.o PC.lhs ghc -package lang -O2 -c -o Parser.o Parser.lhs ghc -package lang -O2 -c -o Mangle.o Mangle.lhs ghc -package lang -O2 -c -o Sort.o Sort.lhs ghc -package lang -O2 -c -o FiniteMap.o FiniteMap.lhs ghc -package lang -O2 -c -o IA.o IA.lhs ghc -package lang -O2 -c -o Offside.o Offside.lhs Offside.lhs:116: Warning: Pattern match(es) are overlapped In the definition of `step': step _ pos [] _ = ... ghc -package lang -O2 -c -o Scanner.o Scanner.lhs ghc -package lang -O2 -c -o Args.o Args.lhs ghc -package lang -O2 -c -o Project.o Project.lhs Project.lhs:4: Failed to find interface decl for `Offside.a1' from module `Offside' Project.lhs:4: Failed to find interface decl for `Offside.a3' from module `Offside' $ ghc -package lang -O -c -o Project.o Project.lhs Project.lhs:4: Failed to find interface decl for `Offside.a1' from module `Offside' Project.lhs:4: Failed to find interface decl for `Offside.a3' from module `Offside' $ ghc -package lang -c -o Project.o Project.lhs $ Thanks Ian ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
RE: Setting up ghc for GPH and GranSim
You can't use any old GHC for GpH, I'm afraid. (GpH modifies GHC internally.) Best thing to do is to go to the GpH website and get your GHC from there. http://www.cee.hw.ac.uk/~dsg/gph/ There's a GpH mailing list, which I'm ccing. Perhaps they are planning a new release? Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] | Sent: 21 December 2001 17:52 | To: [EMAIL PROTECTED] | Subject: Setting up ghc for GPH and GranSim | | | Hi all, | | I'm new to both this list and Haskell, so apologies if these | questions have been answered before or seem obvious. I've | trawled the website and my suspicion is that I'm using a 'too | new' version of the compiler that doesn't support GranSim. Anyway: | | I'm trying to set up a ghc. I want to compile GPH programs | and run them on GranSim. | | With my current setup (details at the bottom of the mail) I | get the following error when I try to compile a GPH program: | [mjb67@mjb67 mjb67]$ ghc -gransim -fvia-c -fglasgow-exts | --make parfib.hs | ghc-5.02.1: can't find module `Prelude' | | Does anyone have any idea what I might be doing wrong? The | error is reported even when the program is normal Haskell, | whenever I use the -gransim or -parallel options to the | compiler. I presume this is some sort of library issue? | | My compiler was set up in the following way: | | I installed the binary RPMs: | http://www.haskell.org/ghc/dist/5.02.1/ghc-5.02.1-rh71-1.i386. rpm http://www.haskell.org/happy/dist/1.11/happy-1.11-1.i386.rpm I downloaded the source RPM from: http://www.haskell.org/ghc/dist/5.02.1/ghc-5.02.1-rh71-1.src.rpm I unpacked the source. I then typed (in the source root directory) ./configure --enable-gransim make make install Thanks in advance, Matthew ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: punning in GHC?
Punning was removed from Haskell some while ago, I believe when Haskell 98 was fixed in Feb 1999. See the Preface section 0.4.1 Simon | -Original Message- | From: Iavor S. Diatchki [mailto:[EMAIL PROTECTED]] | Sent: 26 December 2001 18:55 | To: [EMAIL PROTECTED] | Subject: punning in GHC? | | | hi there, | | i just discovered that GHC does not support punning with the | -fglasgow-exts | option. is there another flag to turn this on or has it been | completely | removed? if so could we have it back - i really like the feature (in | patterns anyways) and use it (hugs -98 supports it). i don't | particularly | care that it is not in haskell 98 as i rarely write haskell | 98 programs. | | by the way before posting this i did a search on punning | through the | mailing list archive to see if someone asked this already. i | couldnt find | anything but it seems that since 1997 there were 7 posts on | punning and | all of them seemed to agree that it was a useful feature, so | why was it | removed? | | bye | iavor | | ___ | Haskell mailing list | [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell | ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell