Commit da19c136 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

Print * has Unicode star with -fprint-unicode-syntax

Reviewers: austin, thomie

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1893
parent 023fc92f
......@@ -1817,7 +1817,10 @@ lang_set dflags lang =
extensionFlags = flattenExtensionFlags lang (extensions dflags)
}
-- | Check whether to use unicode syntax for output
-- | An internal helper to check whether to use unicode syntax for output.
--
-- Note: You should very likely be using 'Outputable.unicodeSyntax' instead
-- of this function.
useUnicodeSyntax :: DynFlags -> Bool
useUnicodeSyntax = gopt Opt_PrintUnicodeSyntax
......
......@@ -2648,7 +2648,8 @@ pprTyTcApp p tc tys
| tc `hasKey` tYPETyConKey
, [TyConApp lev_tc []] <- tys
= if | lev_tc `hasKey` liftedDataConKey -> char '*'
= if | lev_tc `hasKey` liftedDataConKey ->
unicodeSyntax (char '★') (char '*')
| lev_tc `hasKey` unliftedDataConKey -> char '#'
| otherwise -> ppr_deflt
......
......@@ -35,6 +35,7 @@ module Outputable (
fsep, fcat,
hang, hangNotEmpty, punctuate, ppWhen, ppUnless,
speakNth, speakN, speakNOf, plural, isOrAre, doOrDoes,
unicodeSyntax,
coloured, PprColour, colType, colCoerc, colDataCon,
colBinder, bold, keyword,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment