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

Q: why decode expects ByteString and not Text #58

Closed
PierreR opened this issue Feb 12, 2015 · 2 comments
Closed

Q: why decode expects ByteString and not Text #58

PierreR opened this issue Feb 12, 2015 · 2 comments

Comments

@PierreR
Copy link

PierreR commented Feb 12, 2015

I have been wondering why Data.Yaml.decode expects a ByteString instead of a Text.

(if you don't like the use of Issue for question, let me know)

Thanks for your help.

@snoyberg
Copy link
Owner

Because that's the way the underlying C library works, and requiring a Text in between would be a performance hit. We could provide a decodeText function, but it would just call encodeUtf8 on the incoming Text. If that would be useful to you, could you send a pull request?

@PierreR
Copy link
Author

PierreR commented Feb 12, 2015

Thanks for your quick answer. I would submit a PR if I need decodeText.

@PierreR PierreR closed this as completed Feb 12, 2015
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

2 participants