[cvs-nhc98] patch applied (hat): Fixed a bug in hat-trans
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:32:30 EDT 2006
Thu Nov 3 11:23:51 PST 2005 olaf
* Fixed a bug in hat-trans
The problem was two deriving clauses of the same class at exactly the same positions in two modules, one importing the other:
module DeriveA where
data A = A deriving Show
module Main
import DeriveA
data B = B deriving Show
This yielded in compilation:
Ambiguous occurrence `a5v21v5v24showsPrec'
It could refer to either `Main.a5v21v5v24showsPrec', defined at Hat/Derive.hs:61:0
or `Hat.DeriveA.a5v21v5v24showsPrec', imported from Hat.DeriveA at Hat/Derive.hs:9:0-17
A variable "a5v21v5v24showsPrec" for the identifier of a method should not be exported from a module, but it was.
Now it no longer is. This requires collecting variables for identifiers of methods separately from collecting variables for other identifiers. (A method is kind of local, hence the variable should not be exported; however, it is also marked as a global function in the trace)
M ./src/hattrans/TraceTrans.hs -18 +25
More information about the Cvs-nhc98
mailing list