Find a more general replacement for class PrettyPrint
from SAWScript.AST
#950
Labels
Milestone
PrettyPrint
from SAWScript.AST
#950
Module
SAWScript.AST
(which includes pretty printing functions for the AST datatypes) defines a classPrettyPrint
with a functionpretty :: Int -> a -> Doc
:saw-script/src/SAWScript/AST.hs
Lines 348 to 349 in 14bab8f
As @kquick points out (#931 (comment)), this definition is a bit confusing, considering that other prettyprinting libraries define a very similar class with a similarly-named function that has a different type:
It doesn't appear that class
PrettyPrint
is used anywhere else in saw-script at the moment. However, a type class for pretty-printing with precedences might be quite useful if it was standardized, given function names that don't conflict with other pretty printing libraries, and maybe put into a separate package so that it could be used across multiple projects.The text was updated successfully, but these errors were encountered: