[Haskell-cafe] User data type with operator contructors only

Dušan Kolář kolar at fit.vutbr.cz
Tue Sep 5 08:16:07 EDT 2006


Hello all,

  my question probably comes from not reading manual properly. But, why 
is it not possible to have something like:

infixr 5 :>

data Stack a
  = a :> (Stack a)
  | :||

And if yes, how can I do that? I know that lists are a hack in Haskell, 
but anyway. Having:

infixr 5 :>

data Stack a
  = a :> (Stack a)
  | Bottom

is not what I would like to have. :-(

Thanks for any reference to/or explanation,

  Dusan





More information about the Haskell-Cafe mailing list