diff --git a/flap/src/hopix/hopixAST.ml b/flap/src/hopix/hopixAST.ml index d3df029..9129e63 100644 --- a/flap/src/hopix/hopixAST.ml +++ b/flap/src/hopix/hopixAST.ml @@ -110,7 +110,7 @@ and branch = | Branch of pattern located * expression located and ty = - (** An instantiated type constructor [t ]. *) + (** An instantiated type constructor [t ]. *) | TyCon of type_constructor * ty located list (** A function type [ty₁ → ty₂]. *) | TyArrow of ty located * ty located diff --git a/flap/src/hopix/hopixPrettyPrinter.ml b/flap/src/hopix/hopixPrettyPrinter.ml index 93b9ebe..d59c79a 100644 --- a/flap/src/hopix/hopixPrettyPrinter.ml +++ b/flap/src/hopix/hopixPrettyPrinter.ml @@ -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 diff --git a/flap/src/hopix/hopixTypes.mli b/flap/src/hopix/hopixTypes.mli index e023f3a..981d471 100644 --- a/flap/src/hopix/hopixTypes.mli +++ b/flap/src/hopix/hopixTypes.mli @@ -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