Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing exportations in the Text.PrettyPrint module #40

Open
asr opened this issue Dec 14, 2016 · 2 comments
Open

Missing exportations in the Text.PrettyPrint module #40

asr opened this issue Dec 14, 2016 · 2 comments

Comments

@asr
Copy link

asr commented Dec 14, 2016

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 added a commit to agda/agda that referenced this issue Dec 14, 2016
The function `maybeParens` was introduced in pretty-1.1.2.0. I didn't
rename in the other way around due to
haskell/pretty#40.
@dterei
Copy link
Member

dterei commented Dec 15, 2016

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.

@andreasabel
Copy link
Member

I'll take a look at this shortly.

Famous last words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants