Open harendra-kumar opened 7 years ago
Yep I agree. Definitively the creation of Transient.ConsoleIO is necessary and later think about renaming. since I have a conference in which I present Transient at Lambda Conf at the end of this month it is better no to rename primitives.
Transient.Input is not as good as Trasient.ConsoleIO IMO, since there are other forms of input using widgets in axiom, for example.
I would go as far as to keep a separate package. I'm thinking along the lines of having transient-base
be the core TransientIO
monad definition and implementation with all the building-block APIs async
, parallel
, etc. and backtracking/exception handling. Anything outside of the domain of core asynchronous primitives should be in the main transient
package like console I/O, etc and the transient
package can re-export all the main APIs from transient-base
. How does that sound?
The reason why I suggest this is that you won't need to worry about the console when you build concurrent/distributed backends - the most common use case of transient
besides using with axiom
which also probably doesn't require console I/O for non-trivial applications?
It sounds well. That's how things should be. I have to change the git repo and create a mega-repo. Now the impedance on creating more packages and make builds works and synchronise in travis, hackage and stackage and maybe in docker is a big barrier for creating more packages. I want to create at least another additional module for parsing, including code that I have scattered in transient-Move and Axiom.
First the law of least effort recommend to separate it in a different modules as a first step. Also the console code should be rewritten to eliminate STM since it is not justified for the work.
I would suggest the following:
1) Move
keep, option, input
to a separate module, sayTransient.ConsoleIO
. We can possibly call the new moduleTransient.Input
if there are more input methods to be covered. We can renamekeep
to something more appropriate likewithConsole
orwithAsyncInput
orinteractive
.2)
keep'
andexit
can stay in Base. But we can renamekeep'
to something more appropriate likewait
orstayput
.