On 9/28/07, David Menendez <[EMAIL PROTECTED]> wrote:
> I'm not sure there is a clash.
>
> data B k v where ...
>
> is easily distinguished from
>
> data B k v = ... where ...

Indeed.

Although Richard's proposal was simpler, I reckon it's worth
discussing whether the where clause should allow normal
type/data/newtype declarations, effectively introducing a new scope.
There are obviously some type variable quantification and name
resolution issues that should yield several conference papers.

Here are a couple of examples:


data Tree key val
    = Leaf key val
    | Node BST key val BST
    where
    type BST = Tree key val


data RelaxedTree key val
    = Leaf Bal [(key,val)]
    | Node Bal [(key,RelaxedTree key val)]
    where
    data Bal = Balanced | Unbalanced

-- 
Thomas Conway
[EMAIL PROTECTED]

Silence is the perfectest herald of joy:
I were but little happy, if I could say how much.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to