Merge branch 'master' into anri
This commit is contained in:
commit
aa5009e94c
4 changed files with 5 additions and 7 deletions
|
@ -110,7 +110,7 @@ and branch =
|
|||
| Branch of pattern located * expression located
|
||||
|
||||
and ty =
|
||||
(** An instantiated type constructor [t <ty₁, .., tyₙ>]. *)
|
||||
(** An instantiated type constructor [t <ty₁, ..., tyₙ>]. *)
|
||||
| TyCon of type_constructor * ty located list
|
||||
(** A function type [ty₁ → ty₂]. *)
|
||||
| TyArrow of ty located * ty located
|
||||
|
|
|
@ -32,11 +32,12 @@ let rec program p =
|
|||
|
||||
and definition = function
|
||||
| DefineType (t, ts, tdef) ->
|
||||
let eq = match tdef with Abstract -> empty | _ -> string "=" in
|
||||
nest 2 (
|
||||
group (group (string "type"
|
||||
++ located type_constructor t
|
||||
^^ group (type_parameters_angles ts))
|
||||
++ string "=")
|
||||
++ eq)
|
||||
++ type_definition tdef)
|
||||
| DeclareExtern (x, t) ->
|
||||
group (string "extern" ++ located identifier x
|
||||
|
|
|
@ -2,11 +2,8 @@ open HopixAST
|
|||
|
||||
(** Abstract syntax for types.
|
||||
|
||||
The following internal syntax for types is the same as the one for
|
||||
the types [ty] defined in {!HopixAST} except that all positions
|
||||
have been erased.
|
||||
|
||||
*)
|
||||
The following internal syntax for types is the same as the one for the types
|
||||
[ty] defined in {!HopixAST} except that all positions have been erased. *)
|
||||
type aty =
|
||||
| ATyVar of type_variable
|
||||
| ATyCon of type_constructor * aty list
|
||||
|
|
Binary file not shown.
Reference in a new issue