commercialhaskell / rio

A standard library for Haskell
Other
838 stars 54 forks source link

How to improve integration with Haskeline or vty, using RIO with a terminal interface. #252

Open trilogysci opened 1 year ago

trilogysci commented 1 year ago

Seems there should be better options to integrate with haskeline or vty to provide improved terminal interface. This is what I have so far trying to integrate with haskeline. https://gist.github.com/trilogysci/f7d99258560ee3b92e3fbbde45b09b37 Is not really ideal, the logSticky doesn't really work well with getInputLine or outputStr and outputStr doesn't support colors which is one of the benefits I like about RIO logs. I haven't yet tried to take on vtk as that would require writing a custom log function and output as a vty Image. Probably two one for normal logs and one for sticky logs, and also determine how to handle colors. Suggestions for improvements are welcome.