mcpi- Connect to MineCraft running on a Raspberry PI.

PortabilityHaskell 98
MaintainerDouglas Burke
Safe HaskellNone




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.



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.


fromMC :: String -> aSource

class ToMineCraft a whereSource

Send a value to MineCraft.


toMC :: a -> StringSource

Utility routine

eRead :: Read a => String -> aSource

Convert a value, but error out if it can not be converted.