haskell / haskeline

A Haskell library for line input in command-line programs.
https://hackage.haskell.org/package/haskeline
BSD 3-Clause "New" or "Revised" License
221 stars 75 forks source link

Support for Text #80

Open EarthCitizen opened 6 years ago

EarthCitizen commented 6 years ago

Many applications use Text as the "string" type instead of String. It would be great if Haskeline directly supported IO with Text.

srghma commented 5 years ago

@judah how would you implement this?

would you:

  1. just change String to Text
  2. use IsString everywhere
bjartur commented 5 years ago
  1. Just use the generalized string functions from the strings package.

Is library support for Text & Text.Lazy purely a matter of improving the ergonomics of Text and Text.Lazy? So that users can use Text and Text.Lazy consistently, avoiding performance problems in less interactive code paths? Or has anyone found Haskeline noticeably slow?

odanoburu commented 4 years ago

Or has anyone found Haskeline noticeably slow?

personally, no! but I'd say it's a matter of the rest of the application using Text (which might be for performance reasons), and it being cumbersome/boring/slower to convert from String to Text