touch_grass/harness/computer

The effects available to a program running on a computer.

Naming

Name “computer” is not great as lots of things are computers. This is the default based on some assumption, so a machine with filesystem etc. Is posix a better name, I’ve not dived in that deeply and maybe Linux etc is not very Posix.

Types

The case effect requested before any processing.

Does not have an Abort that is a helpful tools that is based on top of Exit in this circumstance.

Should CreateKey end up in an assumption of workspace platform.

pub type Effect {
  AppendFile(append_file.Input)
  CreateKey(create_key.Algorithm)
  Cwd
  DecodeJson(BitArray)
  DeleteFile(path: String)
  Env(name: String)
  Exit(status: Int)
  EygParse(source: String)
  Fetch(request.Request(BitArray))
  Flip
  Hash(hash.Input)
  MakeDirectory(path: String)
  Now
  Random(Int)
  ReadDirectory(path: String)
  ReadFile(read_file.Input)
  Sign(sign.Request)
  Sleep(Int)
  StandardError(String)
  StandardIn
  StanardOut(String)
  WriteFile(write_file.Input)
}

Constructors

Values

pub fn effects() -> List(interface.Interface(Effect, meta))

The complete computer harness.

Search Document