{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/48026440","id":48026440,"diff_hunk":"@@ -0,0 +1,98 @@\n+require \"language/haskell\"\n+\n+class Elm < Formula\n+  include Language::Haskell::Cabal\n+\n+  desc \"Functional programming language for building browser-based GUIs\"\n+  homepage \"http://elm-lang.org\"\n+\n+  stable do\n+    url \"https://github.com/elm-lang/elm-compiler/archive/0.16.tar.gz\"\n+    sha256 \"ea4ff37ec6a1bfb8876e7a9b2aa0755df9ac92f5e5c8bfcc611b1886fb06bb13\"\n+\n+    resource \"elm-package\" do\n+      url \"https://github.com/elm-lang/elm-package/archive/0.16.tar.gz\"\n+      sha256 \"1cac7d27415a4d36d7b1c7260953e0c7b006e7cbb24d5bdb3b0d440d375a8bf5\"\n+    end\n+\n+    resource \"elm-make\" do\n+      url \"https://github.com/elm-lang/elm-make/archive/0.16.tar.gz\"\n+      sha256 \"ed2eb38ee3d41307751b9df4fd464987c7cdd96413a907b800923af8a25a8c15\"\n+    end\n+\n+    resource \"elm-repl\" do\n+      url \"https://github.com/elm-lang/elm-repl/archive/0.16.tar.gz\"\n+      sha256 \"ea89a6cccd546e26c6af12bd35b886bfa666888323596c60168013acf67fe2e4\"\n+    end\n+\n+    resource \"elm-reactor\" do\n+      url \"https://github.com/elm-lang/elm-reactor/archive/0.16.tar.gz\"\n+      sha256 \"fd105180b92364c3ba8df58bfa88306adb8a21074786267ab1eaa634777ded7f\"\n+    end\n+  end\n+\n+  head do\n+    url \"https://github.com/elm-lang/elm-compiler.git\"\n+\n+    resource \"elm-package\" do\n+      url \"https://github.com/elm-lang/elm-package.git\"\n+    end\n+\n+    resource \"elm-make\" do\n+      url \"https://github.com/elm-lang/elm-make.git\"\n+    end\n+\n+    resource \"elm-repl\" do\n+      url \"https://github.com/elm-lang/elm-repl.git\"\n+    end\n+\n+    resource \"elm-reactor\" do\n+      url \"https://github.com/elm-lang/elm-reactor.git\"\n+    end\n+  end\n+\n+  depends_on \"ghc\" => :build\n+  depends_on \"cabal-install\" => :build\n+\n+  setup_ghc_compilers\n+\n+  def install\n+    compiler_path = buildpath/\"elm-compiler\"\n+    mktemp do\n+      mv Dir[\"#{buildpath}/*\"], pwd\n+      mv pwd, compiler_path\n+    end\n+\n+    extras_no_reactor = [\"elm-package\", \"elm-make\", \"elm-repl\"]\n+    extras = extras_no_reactor + [\"elm-reactor\"]\n+    extras.each do |extra|\n+      resource(extra).stage buildpath/extra\n+    end\n+\n+    cabal_sandbox do\n+      system \"cabal\", \"sandbox\", \"add-source\", \"elm-compiler\", *extras\n+      cabal_install \"--only-dependencies\", \"elm-compiler\", *extras\n+      cabal_install \"--prefix=#{prefix}\", \"elm-compiler\", *extras_no_reactor\n+\n+      # elm-reactor needs to be installed last because of a post-build dependency on elm-make\n+      ENV.prepend_path \"PATH\", bin\n+\n+      cabal_install \"--prefix=#{prefix}\", \"elm-reactor\"\n+    end\n+    cabal_clean_lib\n+  end\n+\n+  test do\n+    src_path = testpath/\"Hello.elm\"\n+    src_path.write <<-EOS.undent\n+      import Html exposing (text)\n+      main = text \"Hello, world!\"\n+    EOS\n+\n+    system \"elm\", \"package\", \"install\", \"evancz/elm-html\", \"--yes\"","path":"Library/Formula/elm.rb","position":92,"original_position":92,"commit_id":"a517f8ff5f19cdbf210b82efaab8e0b167c3ee16","original_commit_id":"a517f8ff5f19cdbf210b82efaab8e0b167c3ee16","user":{"login":"bfontaine","id":1334295,"avatar_url":"https://avatars.githubusercontent.com/u/1334295?v=3","gravatar_id":"","url":"https://api.github.com/users/bfontaine","html_url":"https://github.com/bfontaine","followers_url":"https://api.github.com/users/bfontaine/followers","following_url":"https://api.github.com/users/bfontaine/following{/other_user}","gists_url":"https://api.github.com/users/bfontaine/gists{/gist_id}","starred_url":"https://api.github.com/users/bfontaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfontaine/subscriptions","organizations_url":"https://api.github.com/users/bfontaine/orgs","repos_url":"https://api.github.com/users/bfontaine/repos","events_url":"https://api.github.com/users/bfontaine/events{/privacy}","received_events_url":"https://api.github.com/users/bfontaine/received_events","type":"User","site_admin":false},"body":"Use `\"#{bin}/elm\"` instead of `\"elm\"` here.","created_at":"2015-12-18T13:55:50Z","updated_at":"2015-12-18T13:55:50Z","html_url":"https://github.com/Homebrew/homebrew/pull/47109#discussion_r48026440","pull_request_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/47109","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/48026440"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/47109#discussion_r48026440"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/47109"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/47109","id":53965913,"html_url":"https://github.com/Homebrew/homebrew/pull/47109","diff_url":"https://github.com/Homebrew/homebrew/pull/47109.diff","patch_url":"https://github.com/Homebrew/homebrew/pull/47109.patch","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/47109","number":47109,"state":"open","locked":false,"title":"Elm 0.16 (new formula)","user":{"login":"mietek","id":166207,"avatar_url":"https://avatars.githubusercontent.com/u/166207?v=3","gravatar_id":"","url":"https://api.github.com/users/mietek","html_url":"https://github.com/mietek","followers_url":"https://api.github.com/users/mietek/followers","following_url":"https://api.github.com/users/mietek/following{/other_user}","gists_url":"https://api.github.com/users/mietek/gists{/gist_id}","starred_url":"https://api.github.com/users/mietek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mietek/subscriptions","organizations_url":"https://api.github.com/users/mietek/orgs","repos_url":"https://api.github.com/users/mietek/repos","events_url":"https://api.github.com/users/mietek/events{/privacy}","received_events_url":"https://api.github.com/users/mietek/received_events","type":"User","site_admin":false},"body":"Based on the Elm Platform [installation instructions](https://github.com/elm-lang/elm-platform#build-from-source), and the [installation script](https://raw.githubusercontent.com/elm-lang/elm-platform/master/installers/BuildFromSource.hs).","created_at":"2015-12-17T11:39:55Z","updated_at":"2015-12-18T13:55:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a20735c99315cc308f13c75f3da22eac89fe68fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/47109/commits","review_comments_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/47109/comments","review_comment_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/47109/comments","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/a517f8ff5f19cdbf210b82efaab8e0b167c3ee16","head":{"label":"mietek:elm-0.16","ref":"elm-0.16","sha":"a517f8ff5f19cdbf210b82efaab8e0b167c3ee16","user":{"login":"mietek","id":166207,"avatar_url":"https://avatars.githubusercontent.com/u/166207?v=3","gravatar_id":"","url":"https://api.github.com/users/mietek","html_url":"https://github.com/mietek","followers_url":"https://api.github.com/users/mietek/followers","following_url":"https://api.github.com/users/mietek/following{/other_user}","gists_url":"https://api.github.com/users/mietek/gists{/gist_id}","starred_url":"https://api.github.com/users/mietek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mietek/subscriptions","organizations_url":"https://api.github.com/users/mietek/orgs","repos_url":"https://api.github.com/users/mietek/repos","events_url":"https://api.github.com/users/mietek/events{/privacy}","received_events_url":"https://api.github.com/users/mietek/received_events","type":"User","site_admin":false},"repo":{"id":44837892,"name":"homebrew","full_name":"mietek/homebrew","owner":{"login":"mietek","id":166207,"avatar_url":"https://avatars.githubusercontent.com/u/166207?v=3","gravatar_id":"","url":"https://api.github.com/users/mietek","html_url":"https://github.com/mietek","followers_url":"https://api.github.com/users/mietek/followers","following_url":"https://api.github.com/users/mietek/following{/other_user}","gists_url":"https://api.github.com/users/mietek/gists{/gist_id}","starred_url":"https://api.github.com/users/mietek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mietek/subscriptions","organizations_url":"https://api.github.com/users/mietek/orgs","repos_url":"https://api.github.com/users/mietek/repos","events_url":"https://api.github.com/users/mietek/events{/privacy}","received_events_url":"https://api.github.com/users/mietek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mietek/homebrew","description":"My feature fork","fork":true,"url":"https://api.github.com/repos/mietek/homebrew","forks_url":"https://api.github.com/repos/mietek/homebrew/forks","keys_url":"https://api.github.com/repos/mietek/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mietek/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mietek/homebrew/teams","hooks_url":"https://api.github.com/repos/mietek/homebrew/hooks","issue_events_url":"https://api.github.com/repos/mietek/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/mietek/homebrew/events","assignees_url":"https://api.github.com/repos/mietek/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/mietek/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/mietek/homebrew/tags","blobs_url":"https://api.github.com/repos/mietek/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mietek/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mietek/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/mietek/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mietek/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/mietek/homebrew/languages","stargazers_url":"https://api.github.com/repos/mietek/homebrew/stargazers","contributors_url":"https://api.github.com/repos/mietek/homebrew/contributors","subscribers_url":"https://api.github.com/repos/mietek/homebrew/subscribers","subscription_url":"https://api.github.com/repos/mietek/homebrew/subscription","commits_url":"https://api.github.com/repos/mietek/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/mietek/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/mietek/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/mietek/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/mietek/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/mietek/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mietek/homebrew/merges","archive_url":"https://api.github.com/repos/mietek/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mietek/homebrew/downloads","issues_url":"https://api.github.com/repos/mietek/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/mietek/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/mietek/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/mietek/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mietek/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/mietek/homebrew/releases{/id}","created_at":"2015-10-23T20:52:33Z","updated_at":"2015-12-17T11:27:57Z","pushed_at":"2015-12-17T11:44:28Z","git_url":"git://github.com/mietek/homebrew.git","ssh_url":"git@github.com:mietek/homebrew.git","clone_url":"https://github.com/mietek/homebrew.git","svn_url":"https://github.com/mietek/homebrew","homepage":"","size":65992,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"46dec2c45fa2cbe7030fda41cf63c91fc95b39f7","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":206084,"name":"homebrew","full_name":"Homebrew/homebrew","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/homebrew","description":":beer: The missing package manager for OS X.","fork":false,"url":"https://api.github.com/repos/Homebrew/homebrew","forks_url":"https://api.github.com/repos/Homebrew/homebrew/forks","keys_url":"https://api.github.com/repos/Homebrew/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/homebrew/teams","hooks_url":"https://api.github.com/repos/Homebrew/homebrew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/homebrew/events","assignees_url":"https://api.github.com/repos/Homebrew/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/homebrew/tags","blobs_url":"https://api.github.com/repos/Homebrew/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/homebrew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/homebrew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/homebrew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/homebrew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/homebrew/subscription","commits_url":"https://api.github.com/repos/Homebrew/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/homebrew/merges","archive_url":"https://api.github.com/repos/Homebrew/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/homebrew/downloads","issues_url":"https://api.github.com/repos/Homebrew/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/homebrew/releases{/id}","created_at":"2009-05-20T19:38:37Z","updated_at":"2015-12-18T13:49:05Z","pushed_at":"2015-12-18T13:53:35Z","git_url":"git://github.com/Homebrew/homebrew.git","ssh_url":"git@github.com:Homebrew/homebrew.git","clone_url":"https://github.com/Homebrew/homebrew.git","svn_url":"https://github.com/Homebrew/homebrew","homepage":"http://brew.sh","size":1401596,"stargazers_count":27958,"watchers_count":27958,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":13848,"mirror_url":null,"open_issues_count":459,"forks":13848,"open_issues":459,"watchers":27958,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/47109"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/47109"},"issue":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/47109"},"comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/47109/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/47109/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/47109/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/homebrew/statuses/a517f8ff5f19cdbf210b82efaab8e0b167c3ee16"}}}}