var prod
This commit is contained in:
parent
32cc3ba032
commit
71c0a7db93
1 changed files with 5 additions and 0 deletions
|
@ -22,6 +22,11 @@ let typeof t =
|
||||||
(match proj with
|
(match proj with
|
||||||
| Term.First -> Some ty1, env
|
| Term.First -> Some ty1, env
|
||||||
| Term.Second -> Some ty2, env)
|
| Term.Second -> Some ty2, env)
|
||||||
|
| Some (Type.Var id), env' ->
|
||||||
|
(* Variable is a product *)
|
||||||
|
(match TypeSubstitution.find id env' with
|
||||||
|
| Some ty -> Some ty, env'
|
||||||
|
| None -> None, env')
|
||||||
| _ -> None, env)
|
| _ -> None, env)
|
||||||
| Term.Fun (id, body) ->
|
| Term.Fun (id, body) ->
|
||||||
let arg = TypeSubstitution.singleton id (Type.Var id) in
|
let arg = TypeSubstitution.singleton id (Type.Var id) in
|
||||||
|
|
Reference in a new issue