[Haskell-beginners] a bunch o' questions

Brandon S Allbery KF8NH allbery at ece.cmu.edu
Thu Jul 1 15:00:08 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/1/10 14:48 , matthew coolbeth wrote:
> So, is it possible for me to define a parametric type with an infix binary
> data constructor?

With the appropriate extension, you can declare an infix type or data
constructor using a symbol starting with `:':

> data Listy a = Nil | a :*: Listy a

http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/data-type-extensions.html#infix-tycons

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      allbery at kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkws5bgACgkQIn7hlCsL25VhEACgxv82olCE0gdBxjRVx+1Gqvv2
nkgAn1UJ5dGCza6qfW+FK7POSOcFY96F
=PT6o
-----END PGP SIGNATURE-----


More information about the Beginners mailing list