[clean-list] where are function type restrictions discussed?
Arthur Gold
artiegold at austin.rr.com
Tue Aug 26 17:45:27 MEST 2008
On Tue, Aug 26, 2008 at 9:05 AM, terrence.brannon <
terrence.x.brannon at jpmchase.com> wrote:
>
>
>
> terrence.brannon wrote:
> >
> >
> >
> > I am confused by the pipe syntax. Where is it fully discussed with
> > examples?
> >
> >
>
> Here's another example:
>
> sumlength :: [t] t t -> (t,t) | +, one t
>
> I'm guessing this is saying that both + and one must be applicable to the
> argument of type t
>
> So in some cases it seems to be saying that a certain function must be
> applicable and in other cases it is saying that the datum has to be of a
> certain type.
>
> But I dont know where to find this fully described with examples, so I'm
> sort of hitting in the dark :)
>
The place where this is described is in "Type classes", section 6.1 of the
language report.
HTH,
--ag
--
Artie Gold, Austin, Texas
70 is a weird number.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.science.ru.nl/pipermail/clean-list/attachments/20080826/d713cf4d/attachment.html
More information about the clean-list
mailing list