{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/reason/issues/495","repository_url":"https://api.github.com/repos/facebook/reason","labels_url":"https://api.github.com/repos/facebook/reason/issues/495/labels{/name}","comments_url":"https://api.github.com/repos/facebook/reason/issues/495/comments","events_url":"https://api.github.com/repos/facebook/reason/issues/495/events","html_url":"https://github.com/facebook/reason/issues/495","id":155763490,"number":495,"title":"Question: How to work with libraries?","user":{"login":"zsck","id":682761,"avatar_url":"https://avatars.githubusercontent.com/u/682761?v=3","gravatar_id":"","url":"https://api.github.com/users/zsck","html_url":"https://github.com/zsck","followers_url":"https://api.github.com/users/zsck/followers","following_url":"https://api.github.com/users/zsck/following{/other_user}","gists_url":"https://api.github.com/users/zsck/gists{/gist_id}","starred_url":"https://api.github.com/users/zsck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsck/subscriptions","organizations_url":"https://api.github.com/users/zsck/orgs","repos_url":"https://api.github.com/users/zsck/repos","events_url":"https://api.github.com/users/zsck/events{/privacy}","received_events_url":"https://api.github.com/users/zsck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-19T15:18:57Z","updated_at":"2016-05-19T15:41:25Z","closed_at":null,"body":"Hi there, I'm sorry I have a terribly silly question.\r\n\r\nI've just started poking around with Reason and I want to get an HTTP server running. I've decided to try to use the cohttp and lwt libraries in tandem, however I  have no idea how to get rebuild to compile/recognize them.\r\nI've got Atom set up with Nuclide and the Reason tools, and have been able to compile Reason programs that just use the builtin language. However, now that I've installed the libraries I want to use with\r\n\r\n    opam install cohttp lwt\r\n\r\nand written `main.re` containing\r\n\r\n```\r\nopen! Cohttp;\r\nopen! Lwt;\r\nopen! Cohttp_lwt_unix;\r\n\r\nprint_string \"Hello world!\\n\"\r\n```\r\n\r\nI get the following output from rebuild:\r\n\r\n```\r\n$ rebuild -mod cohttp -mod lwt main.native\r\n\r\n+ /Users/zmullaly/.opam/4.02.3/bin/ocamlc.opt -c -pp refmt -o main.cmo -intf-suffix .rei -impl main.re\r\nFile \"main.re\", line 1, characters 6-9:\r\nError: Unbound module Lwt\r\nCommand exited with code 2.\r\nHint: Recursive traversal of subdirectories was not enabled for this build,\r\n  as the working directory does not look like an ocamlbuild project (no\r\n  '_tags' or 'myocamlbuild.ml' file). If you have modules in subdirectories,\r\n  you should add the option \"-r\" or create an empty '_tags' file.\r\n\r\n  To enable recursive traversal for some subdirectories only, you can use the\r\n  following '_tags' file:\r\n\r\n      true: -traverse\r\n      <dir1> or <dir2>: traverse\r\n\r\nCompilation unsuccessful after building 2 targets (1 cached) in 00:00:00.\r\n```\r\n\r\nAnd no .native file is produced.\r\n\r\nLikewise, in Atom, I have the following errors:\r\n\r\n```\r\nError: unbound module Cohttp\r\nError: unbound module Lwt\r\nError: unbound module Cohttp_lwt_unix\r\n```\r\n\r\nWhat am I supposed to be doing here to link with the libraries I downloaded?"},"comment":{"url":"https://api.github.com/repos/facebook/reason/issues/comments/220364814","html_url":"https://github.com/facebook/reason/issues/495#issuecomment-220364814","issue_url":"https://api.github.com/repos/facebook/reason/issues/495","id":220364814,"user":{"login":"zsck","id":682761,"avatar_url":"https://avatars.githubusercontent.com/u/682761?v=3","gravatar_id":"","url":"https://api.github.com/users/zsck","html_url":"https://github.com/zsck","followers_url":"https://api.github.com/users/zsck/followers","following_url":"https://api.github.com/users/zsck/following{/other_user}","gists_url":"https://api.github.com/users/zsck/gists{/gist_id}","starred_url":"https://api.github.com/users/zsck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsck/subscriptions","organizations_url":"https://api.github.com/users/zsck/orgs","repos_url":"https://api.github.com/users/zsck/repos","events_url":"https://api.github.com/users/zsck/events{/privacy}","received_events_url":"https://api.github.com/users/zsck/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T15:41:25Z","updated_at":"2016-05-19T15:41:25Z","body":"**Update**\r\n\r\nI figured out that I had to compile with\r\n\r\n    rebuild -pkg cohttp -pkg lwt main.native\r\n\r\nThis gets the build to pass. However, I'm not sure what I can do about Atom not recognizing the installed modules."}}