[Haskell] Re: (small) records proposal for Haskell '06

Dylan Thurston dthurston at barnard.edu
Tue Jan 3 20:25:56 EST 2006


On Tue, Jan 03, 2006 at 02:41:40PM -0800, Ashley Yakeley wrote:
> David Roundy wrote:
> >On Mon, Jan 02, 2006 at 04:23:32PM -0800, Ashley Yakeley wrote:
> >>>One open question (in my mind) would be whether we'd allow
> >>>
> >>>data Foo = FooInt { foo :: Int } | FooChar { foo :: Char }
> >>>
> >>>In the "new" system, there's no reason this need be illegal.
> >>How would this behave?
> >>
> >> data Foo a b = FooA {foo :: a} | FooB {foo :: b}
> >I'm not sure I understand the problem.  Why would there be any difficulty
> >with this?
> What type would "foo" have? ...

Nothing, since in David's proposal there would be no 'foo' defined on
the top level at all.

Peace,
	Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/haskell/attachments/20060103/1540094b/attachment.bin


More information about the Haskell mailing list