HaloO,

Jonathan Lang wrote:
2) We have A&B and the A B juxtaposition to mean $_ ~~ A && $_ ~~ B
    which is an intersection (sub)type of A and B.

Not according to my reading of S06: if you want to force a parameter
to match both of two different roles, you must use a where clause.

In section "Polymorphic types" S06 reads: "Since the terms in a parameter could be viewed as a set of constraints that are implicitly "anded" together (the variable itself supplies type constraints, and where clauses or tree matching just add more constraints), we relax this to allow juxtaposition of types to act like an "and" junction:"
The following example also makes it clear that a joined interface
is meant. So I think a where clause it not needed.

Regards, TSa.
--

Reply via email to