Module Karel

type direction =
  1. | North
  2. | East
  3. | South
  4. | West
type world
val world : ?bag:int -> string list -> world
val to_strings : world -> string list
val beepers : world -> int -> int -> int
val beepers_left : world -> int
val karel : world -> int * int * direction
val bag : world -> int
type condition
val front_is_clear : condition
val left_is_clear : condition
val right_is_clear : condition
val next_to_a_beeper : condition
val any_beepers_in_beeper_bag : condition
val facing : direction -> condition
val not_ : condition -> condition
type command
val move : command
val turn_left : command
val pick_beeper : command
val put_beeper : command
val turn_off : command
val iterate : int -> command list -> command
val if_ : ?else_:command list -> condition -> command list -> command
val while_ : condition -> command list -> command
val block : command list -> command
val call : string -> command
type status =
  1. | Running
  2. | Finished
  3. | Error of string
type run
val start : ?definitions:(string * command list) list -> world -> command list -> run
val step : run -> run
val status : run -> status
val current : run -> world
val steps : run -> int
val execute : ?definitions:(string * command list) list -> ?max_steps:int -> world -> command list -> run