🚧 Work in progress 🚧
- Polymorphic Teletype
- Library for interacting with
- programs
- programs running in POXIS pseudo terminals via posix-pty
- serial terminals via serialport
- Expect on steroids
- Program interaction library with Asciinema recorder
- My first polysemy endeavour and a playground (for now)
- Collection of useful effects related to the topic
- Interacting with and testing other programs
- Testing of terminal UIs
- Making demos of terminal UIs with Asciinema asciicast output
- Testing hardware (or virtual machines) over serial connection
- Streaming inputs and outputs of programs, terminals, serial connections
- Variations of the previous ones
To explore effect systems and polymorphic IO automation framework. Originally the project
was called multitype
, based on Free
monads which proved difficult to interpret with
all the required bits like async
and timeout
.
Later it was rewritten using transformers
but never released because it still felt too
opinionated about the use of e.g. character vs line based input or Text
vs ByteString
specialization.
This library tries to be much less picky about the type of its inputs and outputs allowing the user to choose what types to work with or convert between different Teletypes. polysemys effect system allows the user to write programs using the same eDSL and choosing interpreters according to the target environment.
import Polytype
main :: IO ()
main =
. runM
. teletypeToIO
. runLogShow
. teletypeLog
$ do
writeTTY "Type something"
i <- readTTY
writeTTY $ "You wrote: " ++ i
Types of effects are in pretty good shape. Names and interpreters are subject to change.
The library grew quite a bit since the work started and some parts will be split into sub-packages.
Inspired by:
- teletype
- polysemy
- polysemys Teletype example
- co-logs polymorphic logger effect
- and few other bits credited in source files