chshersh / iris

🌈 Haskell CLI Framework supporting Command Line Interface Guidelines
https://hackage.haskell.org/package/iris
Mozilla Public License 2.0
173 stars 21 forks source link

[RFC] The 'Output' abstraction #110

Open chshersh opened 1 year ago

chshersh commented 1 year ago

From other issues, I noticed a pattern of having a data type displayed based on the terminal settings:

So I'm thinking about the best way to have an interface with the following requirements:

If you have any ideas, I'd love to hear 🙂

chshersh commented 1 year ago

Adding an idea for the desired API.

Current usage: together with pretty-terminal

Iris.putStderrColouredLn
    (Pretty.style Pretty.Bold . Pretty.color Pretty.Green)
    "my message"

Desired usage: no external dependency besides iris

Iris.errLn $ Iris.bold $ Iris.green "my message"