bug using records

Pepe Gallardo pepeg@lcc.uma.es
Thu, 4 Oct 2001 12:46:37 +0200


The following piece of code is accepted by hugs


data Record = MkRecord { field :: Int }

v = MkRecord { field = 10 }


but when i also include a class with the same name as the constructor


class MkRecord a


I get the following error:

Dependency analysis
ERROR "D:\test.hs":775 - Constructor "MkRecord" does
not have selected fields in MkRecord{field = 10}

If I try

v = MkRecord 10

instead, I get an internal error:

Type checking
INTERNAL ERROR: typeAp1



(¯`·.¸¸.->  pepeg  <-.¸¸.·´¯)