Skip to content

Commit

Permalink
Pretty print readable unicode characters
Browse files Browse the repository at this point in the history
  • Loading branch information
nitinprakash96 committed Jul 14, 2024
1 parent 37ecbc0 commit c6416e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/swarm-lang/Swarm/Language/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import Swarm.Language.Syntax.Direction
import Swarm.Language.Typecheck
import Swarm.Language.Types
import Swarm.Util (number, showEnum, showLowT, unsnocNE)
import Text.Show.Unicode (ushow)
import Witch

------------------------------------------------------------
Expand Down Expand Up @@ -271,7 +272,7 @@ instance PrettyPrec (Term' ty) where
TDir d -> ppr d
TInt n -> pretty n
TAntiInt v -> "$int:" <> pretty v
TText s -> fromString (show s)
TText s -> fromString (ushow s)
TAntiText v -> "$str:" <> pretty v
TBool b -> bool "false" "true" b
TRobot r -> "<a" <> pretty r <> ">"
Expand Down
1 change: 1 addition & 0 deletions swarm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ library swarm-lang
terminal-size >=0.3 && <1.0,
text,
text-rope >=0.2 && <0.3,
unicode-show,
vector,
vty,
witch,
Expand Down

0 comments on commit c6416e4

Please sign in to comment.