Skip to content

Instantly share code, notes, and snippets.

Created January 3, 2018 07:04
Show Gist options
  • Save anonymous/f6d15676401ab6a1bd414a54cd3e8e78 to your computer and use it in GitHub Desktop.
Save anonymous/f6d15676401ab6a1bd414a54cd3e8e78 to your computer and use it in GitHub Desktop.
signature PARSER = sig
eqtype tok
type 'a result = ('a * tok list) option
type 'a parser = tok list -> 'a result
...
end
functor Parser (eqtype token) : PARSER = struct
type tok = token (* Another question: if I put `eqtype` here the compiler yells at me... *)
(* Why do I need the following two lines? *)
type 'a result = ('a * tok list) option
type 'a parser = tok list -> 'a result
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment