[Haskell-cafe] Definition of List type?
gcross at phys.washington.edu
Fri Jul 30 14:50:56 EDT 2010
List are actually built in to the language, but they are roughly
equivalent to the following definition:
data List a =
| a:List a
The reason why this definition never actually appears is because it
defines the constructors using operators rather than names, which is not
allowed in vanilla Haskell. (There is an extension, TypeOperators,
however, that does allow this.)
On 07/30/10 11:41, michael rice wrote:
> From: Data.Maybe
> The Maybe type, and associated operations.
> From: Data.List
> Operations on lists.
> One description has the type and associated operations, the other only
> has the operations.
> Where can I find the type definition for List, and why isn't it in
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe