{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/elixir-lang.github.com/issues/572","labels_url":"https://api.github.com/repos/elixir-lang/elixir-lang.github.com/issues/572/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/elixir-lang.github.com/issues/572/comments","events_url":"https://api.github.com/repos/elixir-lang/elixir-lang.github.com/issues/572/events","html_url":"https://github.com/elixir-lang/elixir-lang.github.com/pull/572","id":95841257,"number":572,"title":"add missing is_* macros","user":{"login":"eksperimental","id":9133420,"avatar_url":"https://avatars.githubusercontent.com/u/9133420?v=3","gravatar_id":"","url":"https://api.github.com/users/eksperimental","html_url":"https://github.com/eksperimental","followers_url":"https://api.github.com/users/eksperimental/followers","following_url":"https://api.github.com/users/eksperimental/following{/other_user}","gists_url":"https://api.github.com/users/eksperimental/gists{/gist_id}","starred_url":"https://api.github.com/users/eksperimental/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eksperimental/subscriptions","organizations_url":"https://api.github.com/users/eksperimental/orgs","repos_url":"https://api.github.com/users/eksperimental/repos","events_url":"https://api.github.com/users/eksperimental/events{/privacy}","received_events_url":"https://api.github.com/users/eksperimental/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-07-18T17:09:28Z","updated_at":"2015-07-20T10:43:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elixir-lang/elixir-lang.github.com/pulls/572","html_url":"https://github.com/elixir-lang/elixir-lang.github.com/pull/572","diff_url":"https://github.com/elixir-lang/elixir-lang.github.com/pull/572.diff","patch_url":"https://github.com/elixir-lang/elixir-lang.github.com/pull/572.patch"},"body":"I found this the hard way. I was relying on the list of this page, to realized that we were missing some functions/macros that are allowed in guards.\r\n\r\nI have added the word  \"macros\" now since there is more than just one (is_nil)\r\n\r\n@josevalim @ericmj I have the feeling that we need a helper function in elixir that lists the functions that are allowed in guard.\r\nhow about having: `Kernel.allowed_in_guard?(module, function_name, arity)` and  `Kernel.list_allowed_in_guards/0`\r\n\r\nI think relying on a an external website to know what can be used in guards,\r\nRegardless creating the helper functions, I think we need to create the list that we have in this page, in the elixir documentaion itself."},"comment":{"url":"https://api.github.com/repos/elixir-lang/elixir-lang.github.com/issues/comments/122845860","html_url":"https://github.com/elixir-lang/elixir-lang.github.com/pull/572#issuecomment-122845860","issue_url":"https://api.github.com/repos/elixir-lang/elixir-lang.github.com/issues/572","id":122845860,"user":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T10:43:07Z","updated_at":"2015-07-20T10:43:07Z","body":">  doesn't \"1\" <> \"1\" evaluate to truthy?\r\n\r\nAs with `and`, `or` and `not`, guards are strictly boolean. I believe we even have a note in this section.\r\n\r\n> and Foo.bar(0, 1) doesn't throw an \"argument error\", as just a regular pattern matching would do.\r\n\r\nWe also mention that errors in guard simply make the guard fail (they don't raise)."}}