Overloaded record fields

Barney Hilken b.hilken at ntlworld.com
Mon Jul 1 11:50:10 CEST 2013

(sorry, accidentally failed to send this to the list)

All this extra syntax, whether it's ., #, or {} seems very heavy for a problem described as very rare.
Why not simply use a declaration

	field name

whose effect is to declare 

	name :: r {name ::t} => r -> t
	name = getFld

unless name is already in scope as a field name, in which case the declaration does nothing?
Then we could continue to use standard functional notation for projection, and still deal with the
case of unused projections.


More information about the Glasgow-haskell-users mailing list