Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created October 20, 2019 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ELLIOTTCABLE/0179ac49dc371e077a601d27b3bc0032 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/0179ac49dc371e077a601d27b3bc0032 to your computer and use it in GitHub Desktop.
type 'a unresolved = Unresolved | Resolved of 'a | Absent
type 'a or_subexpr = Sub of expression | Literal of 'a | Absent
and flag = { name : string; mutable payload : string or_subexpr unresolved }
and arg = Positional of string or_subexpr | Flag of flag
and expression = { count : int; cmd : string or_subexpr; mutable args : arg array }
type t = { expressions : expression array }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment