summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Obs/Sort.idr8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Obs/Sort.idr b/src/Obs/Sort.idr
index 16eaa96..281a053 100644
--- a/src/Obs/Sort.idr
+++ b/src/Obs/Sort.idr
@@ -1,5 +1,7 @@
module Obs.Sort
+import Text.PrettyPrint.Prettyprinter
+
-- Definition ------------------------------------------------------------------
public export
@@ -23,6 +25,12 @@ Show Sort where
show (Set 0) = "Set"
show (Set (S i)) = "Set \{show (S i)}"
+export
+Pretty Sort where
+ prettyPrec d Prop = pretty "Prop"
+ prettyPrec d (Set 0) = pretty "Set"
+ prettyPrec d (Set (S i)) = parenthesise (d >= App) $ pretty "Set \{show (S i)}"
+
-- Operations ------------------------------------------------------------------
infix 5 ~>