Advertisement
Guest User

Untitled

a guest
Aug 13th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.65 KB | None | 0 0
  1. # Module
  2.   type selltable_key = (Product.t * Country.t)
  3.   type selltable_value = Sell.t list
  4.   type t
  5.   ...
  6. end
  7.  
  8. module Selltable = struct
  9.   type selltable_key = (Product.t * Country.t)
  10.   type selltable_value = Sell.t list
  11.   type t = (selltable_value, selltable_key) Hashtbl.t
  12.   ...
  13. end
  14.  
  15. match Hashtbl.find_opt sells @@ get_product_key product with
  16.     | None -> []
  17.     | Some product_sells' -> ...
  18. end
  19.  
  20. #Error
  21. This expression has type
  22.   (Matching_engine__Selltable.Selltable.selltable_key,
  23.    Matching_engine__Selltable.Selltable.selltable_value)
  24.   Hashtbl.t
  25. but an expression was expected of type Matching_engine__Selltable.Selltable.t
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement