[Haskell-beginners] Is Cons in the Haskell Module Library

Vikraman vikraman.choudhury at gmail.com
Sun Dec 22 17:40:47 UTC 2013


On Sun, Dec 22, 2013 at 12:23:42PM -0500, Patrick Lynch wrote:
> Good morning,
> I'm going through Graham Hutton's link on Category Theory [and yes I understand that you needn't study CT in order to use Haskell] and he uses Cons.
> I realize that Cons may be a synonym for ':'.
> But can someone tell me how to search the Haskell Library to find the module containing Cons?
> Thank you and Merry Christmas

Cons is (:) and is defined in GHC.Types.

λ> :i (:)
data [] a = ... | a : [a]   -- Defined in `GHC.Types'
infixr 5 :

You could also try hoogle.

http://www.haskell.org/hoogle/?hoogle=cons

-- 
Vikraman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: PGP signature
URL: <http://www.haskell.org/pipermail/beginners/attachments/20131222/8b148b77/attachment.sig>


More information about the Beginners mailing list