haskell-logger icon indicating copy to clipboard operation
haskell-logger copied to clipboard

Use Data.Text instead of String

Open k0ral opened this issue 10 years ago • 2 comments

Would you consider changing all Strings into Data.Texts ? The only issue I foresee is about the pretty-print library:

  • ansi-wl-pprint supports ANSI colors but doesn't support Text;
  • wl-pprint-text supports Text but doesn't support ANSI colors;
  • there is no ansi-wl-pprint-text at the moment...

I can submit a pull request if you don't have time to implement it, provided you tell me what you'd rather do regarding the above issue.

k0ral avatar Feb 20 '15 14:02 k0ral

I think moving to Text is a good idea, but the most important thing to me at the moment is the ability to color-print logs. We can of course convert the messages from Text to String during printing. Additional - if you do not need to use colors and you want your messages to base on Text, you are free to do it in the current library stage, simply by defining your own message type (analogously to the basic one defined here: https://github.com/wdanilo/haskell-logger/blob/master/src/System/Log/Data.hs#L190 ) During the upcoming month I would have very little time, because I'm representing the ocmpany I'm working in and I will be traveling over 3 weeks. After this time we've got big plans to develop haskell-logger much further. In the meantime, feel free to implement the things you think are usefull and I will try to look at them and merge as often as I can :) What do you think about it @k0ral ?

wdanilo avatar Feb 22 '15 15:02 wdanilo

@k0ral: ping

wdanilo avatar Nov 23 '15 21:11 wdanilo