Portability | Haskell 98 |
---|---|
Stability | experimental |
Maintainer | Douglas Burke |
Safe Haskell | None |
The main interface for connecting to the Raspberry-PI version
of MineCraft. The Internal
module
provides lower-level access in case this module in insufficient.
There are two types of calls to MineCraft: command and query. Commands change the state of the server and do not return anything, queries return information from the server, and presumably does not change the server state. This terminology may change.
I am not sure the use of the FromMineCraft
and ToMineCraft
type classes is justified, given that the API has a very limited
set of types.
Documentation
type MCPI = ReaderT ConnInfo IOSource
Represent a program that communicates with a MineCraft PI server.
runMCPI :: MCPI a -> IO aSource
Run a Raspberry-PI program.
An exception is raised if the server is not running, or can not be contacted.
Conversion routines
class FromMineCraft a whereSource
Convert the return value from MineCraft into a Haskell type.
FromMineCraft Float | |
FromMineCraft Int | |
FromMineCraft BlockData | |
FromMineCraft BlockType | |
FromMineCraft a => FromMineCraft [a] | |
FromMineCraft a => FromMineCraft (Pos a) | |
(FromMineCraft a, FromMineCraft b) => FromMineCraft (a, b) |
class ToMineCraft a whereSource
Send a value to MineCraft.
ToMineCraft Float | |
ToMineCraft Int | |
ToMineCraft BlockData | |
ToMineCraft BlockType | |
ToMineCraft a => ToMineCraft [a] | |
ToMineCraft a => ToMineCraft (Pos a) | |
(ToMineCraft a, ToMineCraft b) => ToMineCraft (a, b) |