systemF.txt 634 Bytes
Newer Older
1
namespace TermVar: Term
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
namespace TypeVar: Type

sort Term
    inh ctx  TermVar
    inh tctx TypeVar
    | TmVar (x@ctx)
    | TmAbs (x: Term) (t: Type) [z: TermVar]
        x.tctx = lhs.tctx
        x.ctx = lhs.ctx, z
        t.tyctx = lhs.tctx
    | TmApp (t1: Term) (t2: Term)
    | TmTApp (t1: Term) (t: Type)
    | TmTAbs (t1: Term) [t: TypeVar]
        t1.ctx = lhs.ctx
        t1.tctx = lhs.tctx, t

sort Type
    inh tyctx TypeVar
    | TyVar (t@tyctx)
    | TyArr (t1: Type) (t2: Type)
        t1.tyctx = lhs.tyctx
        t2.tyctx = lhs.tyctx
    | TyAll (t1: Type) [t: TypeVar]
        t1.tyctx = lhs.tyctx, t
    | TyBase