{"id":15285857,"url":"https://github.com/appunite/beam_inspect","last_synced_at":"2025-06-12T02:38:20.153Z","repository":{"id":32543366,"uuid":"136661886","full_name":"appunite/beam_inspect","owner":"appunite","description":"Inspect how your elixir module looks like in erlang / core erlang.","archived":false,"fork":false,"pushed_at":"2022-10-01T01:10:03.000Z","size":25,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-26T20:06:06.835Z","etag":null,"topics":["beam","elixir-lang","erlang"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/beam_inspect","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appunite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-08T20:11:52.000Z","updated_at":"2024-04-15T04:48:54.000Z","dependencies_parsed_at":"2022-09-01T10:22:10.694Z","dependency_job_id":null,"html_url":"https://github.com/appunite/beam_inspect","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2Fbeam_inspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2Fbeam_inspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2Fbeam_inspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2Fbeam_inspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appunite","download_url":"https://codeload.github.com/appunite/beam_inspect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190500,"owners_count":21062282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beam","elixir-lang","erlang"],"created_at":"2024-09-30T15:07:56.521Z","updated_at":"2025-04-13T02:41:12.918Z","avatar_url":"https://github.com/appunite.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeamInspect\n\n[![Build Status](https://github.com/appunite/beam_inspect/workflows/Test/badge.svg?branch=master)](https://github.com/appunite/beam_inspect/actions) [![Hex.pm](https://img.shields.io/hexpm/v/beam_inspect.svg?style=flat\u0026colorB=6B4D90)](https://hex.pm/packages/beam_inspect)\n\nInspect how your elixir module looks like in erlang / core erlang.\n\n## Installation\n\nThe package can be installed by adding it to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:beam_inspect, \"~\u003e 0.1.0\", only: [:dev], runtime: false}\n  ]\nend\n```\n\n## Usage\n\n### Example elixir module\n\n```elixir\ndefmodule Foo do\n  def baz do\n    :a == :b\n  end\nend\n```\n\n### Inspect erlang\n\n```elixir\niex(1)\u003e Foo |\u003e BeamInspect.to_erlang() |\u003e IO.puts()\n# -file(\"lib/foo.ex\", 1).\n#\n# -module('Elixir.Foo').\n#\n# -compile(no_auto_import).\n#\n# -export(['__info__'/1, baz/0]).\n#\n# -spec '__info__'(attributes | compile | functions |\n#                  macros | md5 | module | deprecated) -\u003e atom() |\n#                                                         [{atom(), any()} |\n#                                                          {atom(), byte(),\n#                                                           integer()}].\n#\n# '__info__'(module) -\u003e 'Elixir.Foo';\n# '__info__'(functions) -\u003e [{baz, 0}];\n# '__info__'(macros) -\u003e [];\n# '__info__'(attributes) -\u003e\n#     erlang:get_module_info('Elixir.Foo', attributes);\n# '__info__'(compile) -\u003e\n#     erlang:get_module_info('Elixir.Foo', compile);\n# '__info__'(md5) -\u003e\n#     erlang:get_module_info('Elixir.Foo', md5);\n# '__info__'(deprecated) -\u003e [].\n#\n# baz() -\u003e a == b.\n:ok\n```\n\n### Inspect core erlang\n\n```elixir\niex(1)\u003e Foo |\u003e BeamInspect.to_core_erlang(:noann) |\u003e IO.puts()\n# module 'Elixir.Foo' ['__info__'/1, 'baz'/0,\n#                      'module_info'/0, 'module_info'/1]\n#   attributes [% Line 1\n#               'file' =\n#                   % Line 1\n#                   [{\"lib/foo.ex\", 1}],\n#               % Line 1\n#               'compile' =\n#                   % Line 1\n#                   ['no_auto_import'],\n#               % Line 1\n#               'spec' =\n#                   % Line 1\n#                   [{{'__info__', 1},\n#                     [{'type', 1, 'fun',\n#                       [{'type', 1, 'product',\n#                         [{'type', 1, 'union',\n#                           [{'atom', 1, 'attributes'},\n#                            {'atom', 1, 'compile'},\n#                            {'atom', 1, 'functions'},\n#                            {'atom', 1, 'macros'}, {'atom', 1, 'md5'},\n#                            {'atom', 1, 'module'},\n#                            {'atom', 1, 'deprecated'}]}]},\n#                        {'type', 1, 'union',\n#                         [{'type', 1, 'atom', []},\n#                          {'type', 1, 'list',\n#                           [{'type', 1, 'union',\n#                             [{'type', 1, 'tuple',\n#                               [{'type', 1, 'atom', []},\n#                                {'type', 1, 'any', []}]},\n#                              {'type', 1, 'tuple',\n#                               [{'type', 1, 'atom', []},\n#                                {'type', 1, 'byte', []},\n#                                {'type', 1, 'integer', []}]}]}]}]}]}]}]]\n#   '__info__'/1 =\n#       fun (_@c0) -\u003e\n#           case _@c0 of\n#             'module' when 'true' -\u003e 'Elixir.Foo'\n#             'functions' when 'true' -\u003e [{'baz', 0}]\n#             'macros' when 'true' -\u003e []\n#             'attributes' when 'true' -\u003e\n#                 call 'erlang':'get_module_info'('Elixir.Foo',\n#                                                 'attributes')\n#             'compile' when 'true' -\u003e\n#                 call 'erlang':'get_module_info'('Elixir.Foo',\n#                                                 'compile')\n#             'md5' when 'true' -\u003e\n#                 call 'erlang':'get_module_info'('Elixir.Foo',\n#                                                 'md5')\n#             'deprecated' when 'true' -\u003e []\n#             _@c1 when 'true' -\u003e\n#                 primop 'match_fail'({'function_clause',\n#                                      _@c1})\n#           end\n#   'baz'/0 =\n#       % Line 2\n#       fun () -\u003e\n#           % Line 3\n#           'false'\n#   'module_info'/0 =\n#       fun () -\u003e\n#           call 'erlang':'get_module_info'('Elixir.Foo')\n#   'module_info'/1 =\n#       fun (_@c0) -\u003e\n#           call 'erlang':'get_module_info'('Elixir.Foo',\n#                                           _@c0)\n# end\n:ok\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappunite%2Fbeam_inspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappunite%2Fbeam_inspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappunite%2Fbeam_inspect/lists"}