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

Add functions for coverting between annotated and unannotated Docs. #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

judah
Copy link

@judah judah commented Mar 2, 2020

  • docToUnitDoc :: Doc -> Ann.Doc ()
  • unitDocToAnnotatedDoc :: Ann.Doc () -> Ann.Doc a

These two functions together allow you to combine together annotated
and unannotated documents. In particular, it lets you embed a unannotated Doc
inside another, annotated Doc a of arbitrary annotation type.

- `docToUnitDoc :: Doc -> Ann.Doc ()`
- `unitDocToAnnotatedDoc :: Ann.Doc () -> Ann.Doc a`

These two functions together allow you to combine together annotated
and unannotated documents.  In particular, it lets you embed a unannotated `Doc`
inside another, annotated `Doc a` of arbitrary annotation type.
@phadej
Copy link
Contributor

phadej commented Mar 3, 2020

It indeed makes sense to have these. Thanks!

I'll leave this open now, I have to think about naming. Please ping me if nothing happens in two weeks.

@judah
Copy link
Author

judah commented May 11, 2020

@phadej, friendly ping?

@Ailrun
Copy link
Member

Ailrun commented Mar 9, 2024

@phadej May I ask the status of this PR?

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

Successfully merging this pull request may close these issues.

3 participants