Advertisement
Guest User

Untitled

a guest
Oct 18th, 2015
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.48 KB | None | 0 0
  1. open Core.Std
  2.  
  3. module type SymbolMapSig = sig
  4.   type t
  5.  
  6.   type 'a table
  7.  
  8.   val empty : 'a table
  9. end
  10.  
  11. module SymbolMap : SymbolMapSig = struct
  12.   type t = int
  13.  
  14.   type 'a table = 'a Int.Map.t
  15.  
  16.   let empty = Int.Map.empty
  17. end
  18.  
  19. module type SymbolHashSig = sig
  20.   type t
  21.  
  22.   type 'a table
  23.  
  24.   val create : unit -> 'a table
  25. end
  26.  
  27. module SymbolHash : SymbolHashSig = struct
  28.   type t = int
  29.  
  30.   type 'a table = (int, 'a) Hashtbl.t
  31.  
  32.   let create () = Int.Table.create ()
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement