cynddl / sublime-text-merlin

Merlin package for Sublime Text 3
MIT License
46 stars 12 forks source link

Labeled argument ~f and type checking error #13

Closed gajaka closed 8 years ago

gajaka commented 8 years ago

Hi guys, There is an error I noticed ( static type checking ). Perhaps it is up to me but it passed successfully in UTop. Please take look at attached files. Regards Dragan error1 utop1

cynddl commented 8 years ago

Hi Dragan,

It seems like an issue with OCaml/Merlin and not the Sublime Text plugin. You try to use List.exists with labels. I assume you used Core.Std in utop and not in Sublime Text:

(* Works *)
open Core.Std;;

let func = function el -> true in
List.exists [] ~f:func;;
(* Fail *)
let func = function el -> true in
List.exists [] ~f:func;;

In the future, please insert source code directly (without images). It's easier to copy code.

gajaka commented 8 years ago

Thanks for your answer ( yes you are right I used Core.Std in utop and not in SublimeText ). Sure in the future I will paste code example.