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

2006-09-05 Thread Dušan Kolář
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

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

2006-09-05 Thread Donald Bruce Stewart
kolar: 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, infixr 5 : data

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

2006-09-05 Thread Dušan Kolář
Donald Bruce Stewart wrote: kolar: 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,