On 4 April 2015 at 11:44, Matt Oliveri <[email protected]> wrote:

> You are missing the point. Type-level expressions may not denote
> types, but the point of type-level expressions is they will be used as
> subexpressions for type expressions. In order to ensure that type
> inference algorithms do not encounter cases they can't handle, we
> generally need to restrict types on the basis of the non-type
> subexpressions they can use.
>
>
I don't think this needs to be a problem for inference, I think you can
design inference so that it does work, but you sometimes have to take the
right design decisions. For example in Mark Jones's FCP you can infer types
for higher order expressions, but you can't do this in Haskell, and it
requires type-annotations.

Type-annotations provide an escape-hatch in the sense that you can infer
were possible, and require an annotation where the inferred type is
ambiguous.


Keean.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to