[Haskell-cafe] Template Haskell -- Bug?

Wolfgang Jeltsch wolfgang at jeltsch.net
Thu Oct 20 09:30:00 EDT 2005


Am Donnerstag, 20. Oktober 2005 15:02 schrieb Gracjan Polak:
> Hi,
>
> Could somebody try to compile these two files *TWICE*?

Hello Gracjan,

I did so, using GHC 6.4.1 on Debian GNU/Linux, installed from the binary 
archive for generic Linux.

Upon the first run, I got the same messages, you got.  Upon the second run, I 
got the following output:

	Chasing modules from: THTest1.hs
	Skipping  THTest1TH        ( ./THTest1TH.hs, ./THTest1TH.o )
	Compiling THTest1          ( THTest1.hs, THTest1.o )
	Loading package base-1.0 ... linking ... done.
	Loading package haskell98-1.0 ... linking ... done.
	Loading package template-haskell-1.0 ... linking ... done.

	THTest1.hs:1:0:
	    Couldn't match `Maybe (a, b)' against `(a1, b1)'
	      Expected type: Maybe (a, b)
	      Inferred type: (a1, b1)
	    In the third argument of `maybe', namely `value[a1Qx]'
	    In the definition of `value2[a1QD]':
	        value2[a1QD] = maybe Nothing (Just . snd) value[a1Qx]

	THTest1.hs:1:0:
	    Couldn't match `Maybe (a, b)' against `(a1, b1)'
	      Expected type: Maybe (a, b)
	      Inferred type: (a1, b1)
	    In the third argument of `maybe', namely `value[a1Qx]'
	    In the definition of `value1[a1QC]':
	        value1[a1QC] = maybe Nothing (Just . fst) value[a1Qx]

> [...]

Best wishes,
Wolfgang


More information about the Haskell-Cafe mailing list