mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-12 12:50:21 +03:00
fix #4352 and add regression test
This commit is contained in:
parent
ddf15e39b3
commit
6d704104a5
@ -228,7 +228,7 @@ pretty0
|
|||||||
tm' <- pretty0 (ac 10 Normal im doc) tm
|
tm' <- pretty0 (ac 10 Normal im doc) tm
|
||||||
tp' <- TypePrinter.pretty0 im 0 t
|
tp' <- TypePrinter.pretty0 im 0 t
|
||||||
pure . paren (p >= 0) $ tm' <> PP.hang (fmt S.TypeAscriptionColon " :") tp'
|
pure . paren (p >= 0) $ tm' <> PP.hang (fmt S.TypeAscriptionColon " :") tp'
|
||||||
Int' i -> pure . fmt S.NumericLiteral $ (if i >= 0 then l "+" else mempty) <> l (show i)
|
Int' i -> pure . fmt S.NumericLiteral . l $ (if i >= 0 then ("+" ++ show i) else (show i))
|
||||||
Nat' u -> pure . fmt S.NumericLiteral . l $ show u
|
Nat' u -> pure . fmt S.NumericLiteral . l $ show u
|
||||||
Float' f -> pure . fmt S.NumericLiteral . l $ show f
|
Float' f -> pure . fmt S.NumericLiteral . l $ show f
|
||||||
-- TODO How to handle Infinity, -Infinity and NaN? Parser cannot parse
|
-- TODO How to handle Infinity, -Infinity and NaN? Parser cannot parse
|
||||||
|
@ -265,6 +265,9 @@ So we can see the pretty-printed output:
|
|||||||
Some x -> x
|
Some x -> x
|
||||||
None -> bug "oops"
|
None -> bug "oops"
|
||||||
|
|
||||||
|
fix_4352 : Doc2
|
||||||
|
fix_4352 = {{ `` +1 `` }}
|
||||||
|
|
||||||
Fix_525.bar.quaffle : Nat
|
Fix_525.bar.quaffle : Nat
|
||||||
Fix_525.bar.quaffle = 32
|
Fix_525.bar.quaffle = 32
|
||||||
|
|
||||||
|
@ -466,3 +466,5 @@ test3 = do
|
|||||||
-- this would previously get printed as `Join.Join`
|
-- this would previously get printed as `Join.Join`
|
||||||
structural type foo.Join =
|
structural type foo.Join =
|
||||||
Table | Join Boolean | Values [Nat]
|
Table | Join Boolean | Values [Nat]
|
||||||
|
|
||||||
|
fix_4352 = {{``+1``}}
|
Loading…
Reference in New Issue
Block a user