classes and template haskell (bug?)
Jeremy Shaw
jeremy.shaw at lindows.com
Wed Dec 31 15:46:53 EST 2003
Hello,
I attempted to build cvs head but it died with the following error:
/usr/bin/ghc6 -H16m -O -istage1/utils -istage1/basicTypes -istage1/types -istage1/hsSyn -istage1/prelude -istage1/rename -istage1/typecheck -istage1/deSugar -istage1/coreSyn -istage1/specialise -istage1/simplCore -istage1/stranal -istage1/stgSyn -istage1/simplStg -istage1/codeGen -istage1/absCSyn -istage1/main -istage1/profiling -istage1/parser -istage1/cprAnalysis -istage1/compMan -istage1/ndpFlatten -istage1/cbits -istage1/iface -istage1/nativeGen -cpp -fglasgow-exts -Rghc-timing -I. -IcodeGen -InativeGen -Iparser -package concurrent -package posix -package util -recomp -Rghc-timing -H16M '-#include "hschooks.h"' -fno-warn-incomplete-patterns -fvia-C -Onot -fno-ignore-interface-pragmas -c parser/Parser.hs -o stage1/parser/Parser.o -ohi stage1/parser/Parser.hi
parser/Parser.hs:1878: Variable not in scope: `$>'
parser/Parser.hs:1887: Variable not in scope: `$>'
parser/Parser.hs:1899: Variable not in scope: `$>'
parser/Parser.hs:1908: Variable not in scope: `$>'
parser/Parser.hs:2019: Variable not in scope: `$>'
<snip> <snip> <snip> <snip> <snip>
parser/Parser.hs:5284: Variable not in scope: `$>'
parser/Parser.hs:5301: Variable not in scope: `$>'
<<ghc: 265818248 bytes, 39 GCs, 3755749/7737668 avg/max bytes residency (4 samples), 19M in use, 0.00 INIT (0.00 elapsed), 3.22 MUT (6.99 elapsed), 0.83 GC (1.75 elapsed) :ghc>>
make[3]: *** [stage1/parser/Parser.o] Error 1
make[2]: *** [all] Error 1
make[2]: Leaving directory `/home/toadx/src/fptools/ghc'
make[1]: *** [build] Error 1
make[1]: Leaving directory `/home/toadx/src/fptools'
make: *** [build-stamp] Error 2
~/src/fptools $
It seems that the autobuilder had the same barfage on Dec 11, 2003,
but worked fine on Dec 12, 2003. Any idea what changed?
http://www.haskell.org/pipermail/cvs-ghc/2003-December/019309.html
http://www.haskell.org/pipermail/cvs-ghc/2003-December/019313.html
I am enjoying template haskell so far (despites the bugs), and the
changes since 6.0 are pretty nice! I find the naming scheme in
THSyntax.hs in 6.2 much easier to read than in 6.0.
Thanks!
Jeremy Shaw.
At Wed, 31 Dec 2003 08:11:47 -0000,
Simon Peyton-Jones wrote:
>
> In GHC 6.2, Template Haskell has various bugs. I think they are all
> fixed in the HEAD, so you can either build from source or grab a
> development snapshot from the GHC site.
>
> The HEAD version of TH has a slightly different programming interface
> too -- see
> http://research.microsoft.com/~simonpj/tmp/notes2.ps
>
> Simon
>
> | -----Original Message-----
> | From: glasgow-haskell-users-bounces at haskell.org
> [mailto:glasgow-haskell-users-
> | bounces at haskell.org] On Behalf Of Jeremy Shaw
> | Sent: 31 December 2003 02:19
> | To: glasgow-haskell-users at haskell.org
> | Subject: classes and template haskell (bug?)
> |
> | Hello,
> |
> | I have loaded the following from a file into ghci 6.2:
> |
> | module Main where
> |
> | import Language.Haskell.THSyntax
> |
> | class Test a where
> | test :: a -> a
> |
> | instance Test (a,b,c) where
> | test x = x
> |
> | main = putStrLn "Hello, World!"
> |
> | This works for me:
> |
> | *Main> runQ [d| instance Test (Int,Int) |] >>= putStrLn . show
> | [InstanceD [] (AppT (ConT "Main:Test") (AppT (AppT (TupleT 2) (ConT
> "GHC.Base:Int")) (ConT
> | "GHC.Base:Int"))) []]
> |
> | But this doesn't:
> |
> | *Main> runQ [d| instance Test (a,b) |] >>= putStrLn . show
> | ghc-6.2: panic! (the `impossible' happened, GHC version 6.2):
> | Failed binder lookup: a {- tv a20x -}
> |
> | Please report it as a compiler bug to
> glasgow-haskell-bugs at haskell.org,
> | or http://sourceforge.net/projects/ghc/.
> |
> |
> | Am I doing something wrong, or is this a bug?
> |
> | Thanks!
> | Jeremy Shaw.
> | _______________________________________________
> | 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