Skip to content

Instantly share code, notes, and snippets.

@Pitometsu
Created July 29, 2019 12:36
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 Pitometsu/632154f60eecb1312e285d266ea7ecbc to your computer and use it in GitHub Desktop.
Save Pitometsu/632154f60eecb1312e285d266ea7ecbc to your computer and use it in GitHub Desktop.
question about constraint syntax
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