Simplify the pretty printing of location info in DAML-LF (#2530)

This commit is contained in:
Martin Huschenbett 2019-08-14 12:05:50 +02:00 committed by mergify[bot]
parent 502b09e5e7
commit 4f178a3a63

View File

@ -421,7 +421,7 @@ instance Pretty Expr where
EUpdate upd -> pPrintPrec lvl prec upd
EScenario scen -> pPrintPrec lvl prec scen
ELocation loc x
| lvl >= PrettyLevel 1 -> sep ["@location" <> parens (pretty loc), nest 2 (parens (pPrintPrec lvl 0 x))]
| lvl >= PrettyLevel 1 -> prettyAppDoc lvl prec ("@location" <> parens (pretty loc)) [TmArg x]
| otherwise -> pPrintPrec lvl prec x
ESome typ body -> prettyAppKeyword lvl prec "some" [TyArg typ, TmArg body]
ENone typ -> prettyAppKeyword lvl prec "none" [TyArg typ]