diff options
| author | Kathy Gray | 2016-04-25 16:17:27 +0100 |
|---|---|---|
| committer | Kathy Gray | 2016-04-25 16:17:36 +0100 |
| commit | 15d87c879ec4757c0637644af7ac5ba16e3a2d27 (patch) | |
| tree | cf140d814224480894664f23213330bca951835a | |
| parent | 3726e08c182118df9e3d56fe94c17c0229dd2711 (diff) | |
make pretty printer keep up with parser changes
| -rw-r--r-- | src/pretty_print.ml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml index ad6d02a7..1c5f891a 100644 --- a/src/pretty_print.ml +++ b/src/pretty_print.ml @@ -735,6 +735,12 @@ let doc_typ, doc_atomic_typ, doc_nexp = Typ_arg_aux (Typ_arg_typ (Typ_aux (Typ_id id, _)), _)]) -> (doc_id id) ^^ (brackets (if n = 0 then doc_int m else doc_op colon (doc_int n) (doc_int (n+m-1)))) | Typ_app(Id_aux (Id "vector", _), [ + Typ_arg_aux(Typ_arg_nexp (Nexp_aux(Nexp_constant n, _)), _); + Typ_arg_aux(Typ_arg_nexp (Nexp_aux(Nexp_constant m, _)), _); + Typ_arg_aux (Typ_arg_order (Ord_aux (Ord_dec, _)), _); + Typ_arg_aux (Typ_arg_typ (Typ_aux (Typ_id id, _)), _)]) -> + (doc_id id) ^^ (brackets (if n = m-1 then doc_int m else doc_op colon (doc_int n) (doc_int (m+1 -n)))) + | Typ_app(Id_aux (Id "vector", _), [ Typ_arg_aux(Typ_arg_nexp (Nexp_aux(Nexp_minus (Nexp_aux(Nexp_constant n, _), Nexp_aux(Nexp_constant 1, _)),_)),_); @@ -1251,11 +1257,11 @@ let doc_alias (AL_aux (alspec,_)) = let doc_dec (DEC_aux (reg,_)) = match reg with - | DEC_reg(typ,id) -> separate space [string "register"; doc_atomic_typ typ; doc_id id] + | DEC_reg(typ,id) -> separate space [string "register"; doc_typ typ; doc_id id] | DEC_alias(id,alspec) -> doc_op equals (string "register alias" ^^ space ^^ doc_id id) (doc_alias alspec) | DEC_typ_alias(typ,id,alspec) -> - doc_op equals (string "register alias" ^^ space ^^ doc_atomic_typ typ) (doc_alias alspec) + doc_op equals (string "register alias" ^^ space ^^ doc_typ typ) (doc_alias alspec) let doc_scattered (SD_aux (sdef, _)) = match sdef with | SD_scattered_function (r, typa, efa, id) -> |
