Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type default_tokenizer = string -> to_tokenize list;;
- type lifted_tokenizer = to_tokenize list -> to_tokenize list;;
- let rec lift (tokenizer:default_tokenizer): lifted_tokenizer = function
- | [] -> []
- | a::b -> match a with
- | `To_Tokenize(s) -> (tokenizer s) @ (lift tokenizer b)
- | `Info_Token(i) -> `Info_Token(i) :: (lift tokenizer b)
- ;;
- Line 7
- Error: This pattern matches values of type [? `To_Tokenize of 'a ]
- but a pattern was expected which matches values of type
- to_tokenize =
- [ `Info_Token of info_token | `To_Tokenize of string ] list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement