Safe Haskell | None |
---|---|
Language | Haskell2010 |
- Remember to call init_board for your specific board.
- data Polyester a
- outPolyester :: (Eq a, Graphic g) => (a -> g) -> [a] -> Polyester ()
- outPolyesterEvents :: Graphic g => [Maybe g] -> Polyester ()
- outPolyesterCount :: Graphic g => (Integer -> g) -> [Maybe a] -> Polyester ()
- writeSocketPolyester :: String -> [Maybe String] -> Polyester ()
- inPolyester :: a -> (Char -> a -> a) -> Polyester [a]
- readSocketPolyester :: String -> Polyester [Maybe Word8]
- getPolyesterExecMode :: Polyester ExecMode
- getPolyesterClkSpeed :: Polyester Integer
- getPolyesterSimSpeed :: Polyester Integer
- runPolyester :: ExecMode -> Integer -> Integer -> Polyester () -> IO ()
- data ExecMode
- generic_init :: (Graphic g1, Graphic g2) => g1 -> (Integer -> g2) -> Polyester ()
- data ANSI a where
- data Color :: *
- class Graphic g where
- drawGraphic :: g -> ANSI ()
The (abstract) Fake Fabric Monad
Monad Polyester | |
Functor Polyester | |
MonadFix Polyester | |
Applicative Polyester | |
Spartan3e Polyester |
|
The Polyester non-proper morphisms
outPolyester :: (Eq a, Graphic g) => (a -> g) -> [a] -> Polyester () Source
Checks an input list for diffences between adjacent elements, and for changes, maps a graphical event onto the internal stepper. The idea is that sending a graphical event twice should be idempotent, but internally the system only writes events when things change.
outPolyesterEvents :: Graphic g => [Maybe g] -> Polyester () Source
Turn a list of graphical events into a Polyester
, without processing.
outPolyesterCount :: Graphic g => (Integer -> g) -> [Maybe a] -> Polyester () Source
creates single graphical events, based on the number of Events, when the first real event is event 1, and there is a beginning of time event 0. Example of use: count the number of bytes send or recieved on a device.
writeSocketPolyester :: String -> [Maybe String] -> Polyester () Source
write a socket from a clocked list input. Example of use is emulating RS232 (which only used empty or singleton strings), for the inside of a list.
Turn an observation of the keyboard into a list of values.
readSocketPolyester :: String -> Polyester [Maybe Word8] Source
readSocketPolyester
reads from a socket.
The stream is on-demand, and is not controlled by any clock
inside the function. Typically would be read one cons per
clock, but slower reading is acceptable.
This does not make any attempt to register
what is being observed on the screen; another
process needs to do this.
Running the Fake Polyester
runPolyester :: ExecMode -> Integer -> Integer -> Polyester () -> IO () Source
runPolyester
executes the Polyester, never returns, and ususally replaces reifyPolyester
.
Fast | run as fast as possible, and do not display the clock |
Friendly | run in friendly mode, with |
Support for building fake Boards
generic_init :: (Graphic g1, Graphic g2) => g1 -> (Integer -> g2) -> Polyester () Source
generic_init
builds a generic board_init, including
setting up the drawing of the board, and printing the (optional) clock.
Support for the (ANSI) Graphics
data Color :: *
ANSI colors: come in various intensities, which are controlled by ColorIntensity