Created
January 3, 2018 07:04
-
-
Save anonymous/f6d15676401ab6a1bd414a54cd3e8e78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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