Created
July 29, 2019 12:36
-
-
Save Pitometsu/632154f60eecb1312e285d266ea7ecbc to your computer and use it in GitHub Desktop.
question about constraint syntax
This file contains hidden or 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
utop # type t = unit -> (string, string, 'a) Map.t option constraint 'a = String.comparator_witness;; | |
type t = unit -> (string, string, String.comparator_witness) Map.t option | |
utop # let f : 'a. unit -> (string, string, 'a) Map.t option constraint 'a = String.comparator_witness = fun () -> failwith "hello";; | |
Error: Syntax error | |
utop # let f : unit -> (string, string, 'a) Map.t option constraint 'a = String.comparator_witness = fun () -> failwith "hello";; | |
Error: Syntax error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment