HSE.Bracket
Documentation
class Brackets a where
Methods
addParen :: a -> a
Is this item lexically requiring no bracketing ever i.e. is totally atomic
needBracket :: Int -> a -> a -> Bool
Is the child safe free from brackets in the parent position. Err on the side of caution, True = don't know
descendBracket :: (Exp_ -> (Bool, Exp_)) -> Exp_ -> Exp_
Descend, and if something changes then add/remove brackets appropriately
rebracket1 :: Exp_ -> Exp_
Add/remove brackets as suggested needBracket at 1-level of depth
appsBracket :: [Exp_] -> Exp_