[Grace-core] Pondering types

Timothy Jones tim at ecs.vuw.ac.nz
Fri Mar 7 18:13:23 PST 2014


The runtime representation of types are objects that satisfy the pattern interface. Their compile-time representation is just the node in the AST, which is what the type checker uses to do static type checking. The runtime objects could certainly have more methods, but it's not necessary for the static type checker.

On 8/03/2014, at 2:59 pm, PSU via GMail <andrew.p.black at gmail.com> wrote:
> Michael, can you please explain how you see the relationship between types and patterns?   I thought that there was a pattern corresponding to each type, which could be used in match()case() ...  I didn't realize that types _were_ patterns: don't types need to be _more than_ patterns for the type checker to work?

-- 
Tim




More information about the Grace-core mailing list