pretty icon indicating copy to clipboard operation
pretty copied to clipboard

Missing exportations in the Text.PrettyPrint module

Open asr opened this issue 8 years ago • 2 comments

The documentation for Text.PrettyPrint says:

This module should be used as opposed to the HughesPJ module. Both are equivalent though as this module simply re-exports the other.

However, for example the function maybeParens defined in Text.PrettyPrint.HughesPJ is not exported by Text.PrettyPrint:

import Text.PrettyPrint

foo :: Bool -> Doc -> Doc
foo = maybeParens

-- Test.hs:5:7: error:
--    Variable not in scope: maybeParens :: Bool -> Doc -> Doc

Note also that in the above documentation, the module name 'HughesPJ' should be 'Text.PrettyPrint.HughesPJ'.

pretty version: 1.1.3.3.

asr avatar Dec 14 '16 01:12 asr

Thanks! I'll take a look at this shortly. I think I may switch the advice to be that the Text.PrettyPrint.HughesPJ module be the one you import and deprecate the Text.PrettyPrint one. It's annoying to have both and for this package to squat on the top-level namespace.

dterei avatar Dec 15 '16 04:12 dterei

I'll take a look at this shortly.

Famous last words.

andreasabel avatar Mar 22 '20 11:03 andreasabel