snoyberg / mono-traversable

Type classes for mapping, folding, and traversing monomorphic containers
152 stars 63 forks source link

No getLine in ClassyPrelude #146

Closed beojan closed 6 years ago

beojan commented 6 years ago

It appears there's no getLine in ClassyPrelude. Is this intentional or an oversight?

snoyberg commented 6 years ago

Mostly on oversight, though the correct type to use is slightly sensitive. I'm assuming you're thinking of getLine :: MonadIO m => m Text, am I correct?

On Sat, Dec 2, 2017 at 12:39 PM, Beojan Stanislaus <notifications@github.com

wrote:

It appears there's no getLine in ClassyPrelude. Is this intentional or an oversight?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/snoyberg/mono-traversable/issues/146, or mute the thread https://github.com/notifications/unsubscribe-auth/AADBB6cd9Brlha2AlB76Ff5nM3vWmQlrks5s8SjzgaJpZM4QzQoX .

beojan commented 6 years ago

Yes. In fact all the prelude terminal input actions seem to be missing.

On Dec 3, 2017 08:29, "Michael Snoyman" notifications@github.com wrote:

Mostly on oversight, though the correct type to use is slightly sensitive. I'm assuming you're thinking of getLine :: MonadIO m => m Text, am I correct?

On Sat, Dec 2, 2017 at 12:39 PM, Beojan Stanislaus < notifications@github.com

wrote:

It appears there's no getLine in ClassyPrelude. Is this intentional or an oversight?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/snoyberg/mono-traversable/issues/146, or mute the thread https://github.com/notifications/unsubscribe-auth/ AADBB6cd9Brlha2AlB76Ff5nM3vWmQlrks5s8SjzgaJpZM4QzQoX .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/snoyberg/mono-traversable/issues/146#issuecomment-348746015, or mute the thread https://github.com/notifications/unsubscribe-auth/ADjiNXKrxxc7cOZGC4ZzXt2SGYjJOi5Pks5s8k3RgaJpZM4QzQoX .

snoyberg commented 6 years ago

I'm pretty sure I avoided it because there's some serious ugliness around these things due to dependence on environment variables. See https://www.snoyman.com/blog/2016/12/beware-of-readfile. But the terminal-oriented functions should be fine, as long as the caveats are documented. You interested in sending a PR?

beojan commented 6 years ago

Submitted (https://github.com/snoyberg/mono-traversable/pull/148).

snoyberg commented 6 years ago

Fixed by #148, thanks!