From de4275d9728104167726bda4d260c197a40ff3d7 Mon Sep 17 00:00:00 2001 From: Greg Brown Date: Thu, 12 Jan 2023 17:55:43 +0000 Subject: Slightly prettify pretty printing. --- src/Obs/NormalForm.idr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Obs/NormalForm.idr') diff --git a/src/Obs/NormalForm.idr b/src/Obs/NormalForm.idr index b290240..3139daf 100644 --- a/src/Obs/NormalForm.idr +++ b/src/Obs/NormalForm.idr @@ -142,7 +142,7 @@ prettyPrecCnstr d Bool = pretty "Bool" prettyPrecCnstr d True = pretty "True" prettyPrecCnstr d False = pretty "False" prettyPrecCnstr d (Box {prop}) = prettyApp d (pretty "Box") [prettyPrec App prop] -prettyPrecCnstr d MkBox = pretty "box" +prettyPrecCnstr d MkBox = prettyApp d (pretty "box") [pretty "_"] prettyPrecCnstr d Top = pretty "()" prettyPrecCnstr d Bottom = pretty "Void" @@ -156,8 +156,8 @@ prettyPrecNtrl d (Second {firstRel, arg}) = prettyApp d (pretty "snd") [prettyPrecNtrl App arg] prettyPrecNtrl d (If {discriminant, true, false}) = prettyApp d (pretty "if") $ - [prettyPrecNtrl App discriminant, prettyPrec App true, prettyPrec App false] -prettyPrecNtrl d Absurd = pretty "absurd" + [pretty "_", prettyPrecNtrl App discriminant, prettyPrec App true, prettyPrec App false] +prettyPrecNtrl d Absurd = prettyApp d (pretty "absurd") [pretty "_"] prettyPrecNtrl d (Equal {type, left, right}) = prettyEqual d (prettyPrec Equal left) (prettyPrec Equal right) prettyPrecNtrl d (EqualL {left, right}) = @@ -168,13 +168,13 @@ prettyPrecNtrl d (EqualStuck {left, right}) = prettyEqual d (prettyPrecCnstr Equal left) (prettyPrecCnstr Equal right) prettyPrecNtrl d (CastL {oldType, newType, value}) = prettyApp d (pretty "cast") $ - [prettyPrecNtrl App oldType, prettyPrec App newType, prettyPrec App value] + [prettyPrecNtrl App oldType, prettyPrec App newType, pretty "_", prettyPrec App value] prettyPrecNtrl d (CastR {oldType, newType, value}) = prettyApp d (pretty "cast") $ - [prettyPrecCnstr App oldType, prettyPrecNtrl App newType, prettyPrec App value] + [prettyPrecCnstr App oldType, prettyPrecNtrl App newType, pretty "_", prettyPrec App value] prettyPrecNtrl d (CastStuck {oldType, newType, value}) = prettyApp d (pretty "cast") $ - [prettyPrecCnstr App oldType, prettyPrecCnstr App newType, prettyPrec App value] + [prettyPrecCnstr App oldType, prettyPrecCnstr App newType, pretty "_", prettyPrec App value] prettyPrec d (Ntrl t) = prettyPrecNtrl d t prettyPrec d (Cnstr t) = prettyPrecCnstr d t -- cgit v1.2.3