Skip to content

Instantly share code, notes, and snippets.

@deontologician
Created June 23, 2009 04:51
Show Gist options
  • Save deontologician/134366 to your computer and use it in GitHub Desktop.
Save deontologician/134366 to your computer and use it in GitHub Desktop.
type Callback m a = [String] -> CommandLineT m a
type CallbackList m a = Map.Map String (Callback m a)
type Environment = Map.Map String String
data CommandState m a = CS { registry :: Environment
, callbacks :: CallbackList m a
}
newtype CommandLineT m a = CommandLine (StateT (CommandState m a) (InputT m) a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment