Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.77 KB | None | 0 0
  1.         OCaml version 4.02.0
  2.  
  3.       _____________________________
  4.     [| +   | |   Batteries 2.3  - |
  5.      |_____|_|____________________|
  6.       _____________________________
  7.      | -  Type '#help;;'    | | + |]
  8.      |______________________|_|___|
  9.  
  10.  
  11. # module StrKey =
  12.   struct
  13.     type t = string
  14.     let equal s1 s2 = ( s1 == s2 )
  15.     let hash s = ( Hashtbl.hash  s )
  16.   end;;
  17.           module StrKey :
  18.   sig type t = string val equal : 'a -> 'a -> bool val hash : 'a -> int end
  19. # module type of Hashtbl.Make( StrKey );;
  20. Characters 12-14:
  21.   module type of Hashtbl.Make( StrKey );;
  22.               ^^
  23. Error: Syntax error
  24. # module type Hashtbl.Make( StrKey );;
  25. Characters 19-20:
  26.   module type Hashtbl.Make( StrKey );;
  27.                      ^
  28. Error: Syntax error
  29. #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement