[Haskell] ambiguous record field names which actually aren’t ambigious

Wolfgang Jeltsch g9ks157k at acme.softbase.org
Mon May 28 14:19:17 EDT 2007


Am Montag, 28. Mai 2007 17:41 schrieb Wolfgang Jeltsch:
> Hello,
>
> I have the following modules:
>
>     module A where
>         data A = A { label :: Int }
>
>     module B where
>         data B = B { label :: Int }
>
>     b :: B
>     b = B { label = 0 }
>
>     x :: B -> ()
>     x B { label = 0 } = ()

Oops, the indentation of the declarations of b and x was too small.  Both b 
and x are meant to be defined in module B.

> […]

Best wishes,
Wolfgang


More information about the Haskell mailing list