Skip to content

Commit 8729d3e

Browse files
author
Brian Huffman
committed
Switch jvm-parser package to use prettyprinter library.
Fixes #951.
1 parent a2b9c75 commit 8729d3e

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/SAWScript/Crucible/JVM/MethodSpecIR.hs

-4
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ type instance MS.TypeName CJ.JVM = JIdent
6868

6969
type instance MS.ExtType CJ.JVM = J.Type
7070

71-
-- TODO: remove when jvm-parser switches to prettyprinter
72-
instance PPL.Pretty J.Type where
73-
pretty = PPL.viaShow
74-
7571
--------------------------------------------------------------------------------
7672
-- *** JVMMethodId
7773

src/SAWScript/JavaPretty.hs

+3-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ prettyField :: Field -> Doc ann
5353
prettyField f = hsep $
5454
[ viaShow (fieldVisibility f) ] ++
5555
attrs ++
56-
[ viaShow (ppType (fieldType f)) -- TODO: Ick. Different PPs.
56+
[ ppType (fieldType f)
5757
, pretty (fieldName f)
5858
]
5959
where attrs = concat
@@ -67,12 +67,11 @@ prettyMethod :: Method -> Doc ann
6767
prettyMethod m =
6868
hsep $
6969
(if methodIsStatic m then ["static"] else []) ++
70-
[ maybe "void" prettyType ret
70+
[ maybe "void" ppType ret
7171
, pretty name
72-
, (parens . commas . map prettyType) params
72+
, (parens . commas . map ppType) params
7373
]
7474
where (MethodKey name params ret) = methodKey m
75-
prettyType = viaShow . ppType -- TODO: Ick.
7675

7776
commas :: [Doc ann] -> Doc ann
7877
commas = sep . punctuate comma

0 commit comments

Comments
 (0)