Copy disabled (too large)
Download .txt
Showing preview only (13,795K chars total). Download the full file to get everything.
Repository: elixir-lang/elixir
Branch: main
Commit: e17069e55933
Files: 770
Total size: 13.0 MB
Directory structure:
gitextract_xqgczhmk/
├── .formatter.exs
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ └── issue.yml
│ ├── dependabot.yml
│ └── workflows/
│ ├── ci.yml
│ ├── codeql.yml
│ ├── license_compliance.yml
│ ├── markdown.yml
│ ├── notify.exs
│ ├── ort/
│ │ └── action.yml
│ ├── posix_compliance.yml
│ ├── release.yml
│ ├── release_notifications.yml
│ └── release_pre_built/
│ └── action.yml
├── .gitignore
├── .markdownlint-cli2.jsonc
├── .ort/
│ ├── config/
│ │ ├── config.yml
│ │ └── evaluator.rules.kts
│ └── package-configurations/
│ ├── eex.yml
│ ├── elixir.yml
│ ├── ex_unit.yml
│ ├── logger.yml
│ └── mix.yml
├── .ort.yml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── LICENSES/
│ ├── Apache-2.0.txt
│ ├── LicenseRef-elixir-trademark-policy.txt
│ └── LicenseRef-scancode-unicode.txt
├── Makefile
├── OPEN_SOURCE_POLICY.md
├── README.md
├── RELEASE.md
├── SECURITY.md
├── VERSION
├── bin/
│ ├── elixir
│ ├── elixir.bat
│ ├── elixirc
│ ├── elixirc.bat
│ ├── iex
│ ├── iex.bat
│ ├── mix
│ ├── mix.bat
│ └── mix.ps1
├── lib/
│ ├── eex/
│ │ ├── lib/
│ │ │ ├── eex/
│ │ │ │ ├── compiler.ex
│ │ │ │ ├── engine.ex
│ │ │ │ └── smart_engine.ex
│ │ │ └── eex.ex
│ │ ├── mix.exs
│ │ └── test/
│ │ ├── eex/
│ │ │ ├── smart_engine_test.exs
│ │ │ └── tokenizer_test.exs
│ │ ├── eex_test.exs
│ │ ├── fixtures/
│ │ │ ├── eex_template.eex
│ │ │ ├── eex_template_with_bindings.eex
│ │ │ └── eex_template_with_syntax_error.eex
│ │ └── test_helper.exs
│ ├── elixir/
│ │ ├── Emakefile
│ │ ├── lib/
│ │ │ ├── access.ex
│ │ │ ├── agent/
│ │ │ │ └── server.ex
│ │ │ ├── agent.ex
│ │ │ ├── application.ex
│ │ │ ├── atom.ex
│ │ │ ├── base.ex
│ │ │ ├── behaviour.ex
│ │ │ ├── bitwise.ex
│ │ │ ├── calendar/
│ │ │ │ ├── date.ex
│ │ │ │ ├── date_range.ex
│ │ │ │ ├── datetime.ex
│ │ │ │ ├── duration.ex
│ │ │ │ ├── iso.ex
│ │ │ │ ├── naive_datetime.ex
│ │ │ │ ├── time.ex
│ │ │ │ └── time_zone_database.ex
│ │ │ ├── calendar.ex
│ │ │ ├── code/
│ │ │ │ ├── formatter.ex
│ │ │ │ ├── fragment.ex
│ │ │ │ ├── identifier.ex
│ │ │ │ ├── normalizer.ex
│ │ │ │ └── typespec.ex
│ │ │ ├── code.ex
│ │ │ ├── collectable.ex
│ │ │ ├── config/
│ │ │ │ ├── provider.ex
│ │ │ │ └── reader.ex
│ │ │ ├── config.ex
│ │ │ ├── dict.ex
│ │ │ ├── dynamic_supervisor.ex
│ │ │ ├── enum.ex
│ │ │ ├── exception.ex
│ │ │ ├── file/
│ │ │ │ ├── stat.ex
│ │ │ │ └── stream.ex
│ │ │ ├── file.ex
│ │ │ ├── float.ex
│ │ │ ├── function.ex
│ │ │ ├── gen_event/
│ │ │ │ └── stream.ex
│ │ │ ├── gen_event.ex
│ │ │ ├── gen_server.ex
│ │ │ ├── hash_dict.ex
│ │ │ ├── hash_set.ex
│ │ │ ├── inspect/
│ │ │ │ ├── algebra.ex
│ │ │ │ └── error.ex
│ │ │ ├── inspect.ex
│ │ │ ├── integer.ex
│ │ │ ├── io/
│ │ │ │ ├── ansi/
│ │ │ │ │ └── docs.ex
│ │ │ │ ├── ansi.ex
│ │ │ │ └── stream.ex
│ │ │ ├── io.ex
│ │ │ ├── json.ex
│ │ │ ├── kernel/
│ │ │ │ ├── cli.ex
│ │ │ │ ├── error_handler.ex
│ │ │ │ ├── lexical_tracker.ex
│ │ │ │ ├── parallel_compiler.ex
│ │ │ │ ├── parallel_require.ex
│ │ │ │ ├── special_forms.ex
│ │ │ │ ├── typespec.ex
│ │ │ │ └── utils.ex
│ │ │ ├── kernel.ex
│ │ │ ├── keyword.ex
│ │ │ ├── list/
│ │ │ │ └── chars.ex
│ │ │ ├── list.ex
│ │ │ ├── macro/
│ │ │ │ └── env.ex
│ │ │ ├── macro.ex
│ │ │ ├── map.ex
│ │ │ ├── map_set.ex
│ │ │ ├── module/
│ │ │ │ ├── behaviour.ex
│ │ │ │ ├── parallel_checker.ex
│ │ │ │ ├── types/
│ │ │ │ │ ├── apply.ex
│ │ │ │ │ ├── descr.ex
│ │ │ │ │ ├── expr.ex
│ │ │ │ │ ├── helpers.ex
│ │ │ │ │ ├── of.ex
│ │ │ │ │ ├── pattern.ex
│ │ │ │ │ └── traverse.ex
│ │ │ │ └── types.ex
│ │ │ ├── module.ex
│ │ │ ├── node.ex
│ │ │ ├── option_parser.ex
│ │ │ ├── partition_supervisor.ex
│ │ │ ├── path.ex
│ │ │ ├── port.ex
│ │ │ ├── process.ex
│ │ │ ├── protocol.ex
│ │ │ ├── range.ex
│ │ │ ├── record/
│ │ │ │ └── extractor.ex
│ │ │ ├── record.ex
│ │ │ ├── regex.ex
│ │ │ ├── registry.ex
│ │ │ ├── set.ex
│ │ │ ├── stream/
│ │ │ │ └── reducers.ex
│ │ │ ├── stream.ex
│ │ │ ├── string/
│ │ │ │ └── chars.ex
│ │ │ ├── string.ex
│ │ │ ├── string_io.ex
│ │ │ ├── supervisor/
│ │ │ │ ├── default.ex
│ │ │ │ └── spec.ex
│ │ │ ├── supervisor.ex
│ │ │ ├── system.ex
│ │ │ ├── task/
│ │ │ │ ├── supervised.ex
│ │ │ │ └── supervisor.ex
│ │ │ ├── task.ex
│ │ │ ├── tuple.ex
│ │ │ ├── uri.ex
│ │ │ └── version.ex
│ │ ├── mix.exs
│ │ ├── pages/
│ │ │ ├── anti-patterns/
│ │ │ │ ├── code-anti-patterns.md
│ │ │ │ ├── design-anti-patterns.md
│ │ │ │ ├── macro-anti-patterns.md
│ │ │ │ ├── process-anti-patterns.md
│ │ │ │ └── what-anti-patterns.md
│ │ │ ├── cheatsheets/
│ │ │ │ ├── enum-cheat.cheatmd
│ │ │ │ └── types-cheat.cheatmd
│ │ │ ├── getting-started/
│ │ │ │ ├── alias-require-and-import.md
│ │ │ │ ├── anonymous-functions.md
│ │ │ │ ├── basic-types.md
│ │ │ │ ├── binaries-strings-and-charlists.md
│ │ │ │ ├── case-cond-and-if.md
│ │ │ │ ├── comprehensions.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── enumerable-and-streams.md
│ │ │ │ ├── erlang-libraries.md
│ │ │ │ ├── introduction.md
│ │ │ │ ├── io-and-the-file-system.md
│ │ │ │ ├── keywords-and-maps.md
│ │ │ │ ├── lists-and-tuples.md
│ │ │ │ ├── module-attributes.md
│ │ │ │ ├── modules-and-functions.md
│ │ │ │ ├── optional-syntax.md
│ │ │ │ ├── pattern-matching.md
│ │ │ │ ├── processes.md
│ │ │ │ ├── protocols.md
│ │ │ │ ├── recursion.md
│ │ │ │ ├── sigils.md
│ │ │ │ ├── structs.md
│ │ │ │ ├── try-catch-and-rescue.md
│ │ │ │ └── writing-documentation.md
│ │ │ ├── meta-programming/
│ │ │ │ ├── domain-specific-languages.md
│ │ │ │ ├── macros.md
│ │ │ │ └── quote-and-unquote.md
│ │ │ ├── mix-and-otp/
│ │ │ │ ├── agents.md
│ │ │ │ ├── config-and-distribution.md
│ │ │ │ ├── docs-tests-and-with.md
│ │ │ │ ├── dynamic-supervisor.md
│ │ │ │ ├── genservers.md
│ │ │ │ ├── introduction-to-mix.md
│ │ │ │ ├── releases.md
│ │ │ │ ├── supervisor-and-application.md
│ │ │ │ └── task-and-gen-tcp.md
│ │ │ └── references/
│ │ │ ├── compatibility-and-deprecations.md
│ │ │ ├── gradual-set-theoretic-types.md
│ │ │ ├── library-guidelines.md
│ │ │ ├── naming-conventions.md
│ │ │ ├── operators.md
│ │ │ ├── patterns-and-guards.md
│ │ │ ├── sbom.md
│ │ │ ├── syntax-reference.md
│ │ │ ├── typespecs.md
│ │ │ └── unicode-syntax.md
│ │ ├── scripts/
│ │ │ ├── cover.exs
│ │ │ ├── cover_record.exs
│ │ │ ├── diff.exs
│ │ │ ├── docs_config.exs
│ │ │ ├── elixir_docs.exs
│ │ │ ├── generate_app.escript
│ │ │ ├── infer.exs
│ │ │ ├── mix_docs.exs
│ │ │ └── windows_installer/
│ │ │ ├── .gitignore
│ │ │ ├── build.sh
│ │ │ ├── installer.nsi
│ │ │ └── update_system_path.erl
│ │ ├── src/
│ │ │ ├── elixir.app.src
│ │ │ ├── elixir.erl
│ │ │ ├── elixir.hrl
│ │ │ ├── elixir_aliases.erl
│ │ │ ├── elixir_bitstring.erl
│ │ │ ├── elixir_bootstrap.erl
│ │ │ ├── elixir_clauses.erl
│ │ │ ├── elixir_code_server.erl
│ │ │ ├── elixir_compiler.erl
│ │ │ ├── elixir_config.erl
│ │ │ ├── elixir_def.erl
│ │ │ ├── elixir_dispatch.erl
│ │ │ ├── elixir_env.erl
│ │ │ ├── elixir_erl.erl
│ │ │ ├── elixir_erl_clauses.erl
│ │ │ ├── elixir_erl_compiler.erl
│ │ │ ├── elixir_erl_for.erl
│ │ │ ├── elixir_erl_pass.erl
│ │ │ ├── elixir_erl_try.erl
│ │ │ ├── elixir_erl_var.erl
│ │ │ ├── elixir_errors.erl
│ │ │ ├── elixir_expand.erl
│ │ │ ├── elixir_fn.erl
│ │ │ ├── elixir_import.erl
│ │ │ ├── elixir_interpolation.erl
│ │ │ ├── elixir_lexical.erl
│ │ │ ├── elixir_map.erl
│ │ │ ├── elixir_module.erl
│ │ │ ├── elixir_overridable.erl
│ │ │ ├── elixir_parser.yrl
│ │ │ ├── elixir_quote.erl
│ │ │ ├── elixir_rewrite.erl
│ │ │ ├── elixir_sup.erl
│ │ │ ├── elixir_tokenizer.erl
│ │ │ ├── elixir_tokenizer.hrl
│ │ │ ├── elixir_utils.erl
│ │ │ └── iex.erl
│ │ ├── test/
│ │ │ ├── elixir/
│ │ │ │ ├── access_test.exs
│ │ │ │ ├── agent_test.exs
│ │ │ │ ├── application_test.exs
│ │ │ │ ├── atom_test.exs
│ │ │ │ ├── base_test.exs
│ │ │ │ ├── bitwise_test.exs
│ │ │ │ ├── calendar/
│ │ │ │ │ ├── date_range_test.exs
│ │ │ │ │ ├── date_test.exs
│ │ │ │ │ ├── datetime_test.exs
│ │ │ │ │ ├── duration_test.exs
│ │ │ │ │ ├── fakes.exs
│ │ │ │ │ ├── holocene.exs
│ │ │ │ │ ├── iso_test.exs
│ │ │ │ │ ├── naive_datetime_test.exs
│ │ │ │ │ └── time_test.exs
│ │ │ │ ├── calendar_test.exs
│ │ │ │ ├── changelog_test.exs
│ │ │ │ ├── code_formatter/
│ │ │ │ │ ├── calls_test.exs
│ │ │ │ │ ├── comments_test.exs
│ │ │ │ │ ├── containers_test.exs
│ │ │ │ │ ├── general_test.exs
│ │ │ │ │ ├── integration_test.exs
│ │ │ │ │ ├── literals_test.exs
│ │ │ │ │ ├── migration_test.exs
│ │ │ │ │ └── operators_test.exs
│ │ │ │ ├── code_fragment_test.exs
│ │ │ │ ├── code_identifier_test.exs
│ │ │ │ ├── code_normalizer/
│ │ │ │ │ ├── formatted_ast_test.exs
│ │ │ │ │ └── quoted_ast_test.exs
│ │ │ │ ├── code_test.exs
│ │ │ │ ├── collectable_test.exs
│ │ │ │ ├── config/
│ │ │ │ │ ├── provider_test.exs
│ │ │ │ │ └── reader_test.exs
│ │ │ │ ├── config_test.exs
│ │ │ │ ├── dynamic_supervisor_test.exs
│ │ │ │ ├── enum_test.exs
│ │ │ │ ├── exception_test.exs
│ │ │ │ ├── file/
│ │ │ │ │ └── stream_test.exs
│ │ │ │ ├── file_test.exs
│ │ │ │ ├── fixtures/
│ │ │ │ │ ├── at_exit.exs
│ │ │ │ │ ├── code_sample.exs
│ │ │ │ │ ├── compile_sample.ex
│ │ │ │ │ ├── configs/
│ │ │ │ │ │ ├── bad_app.exs
│ │ │ │ │ │ ├── bad_import.exs
│ │ │ │ │ │ ├── env.exs
│ │ │ │ │ │ ├── good_config.exs
│ │ │ │ │ │ ├── good_import.exs
│ │ │ │ │ │ ├── good_kw.exs
│ │ │ │ │ │ ├── imports_recursive.exs
│ │ │ │ │ │ ├── kernel.exs
│ │ │ │ │ │ ├── nested.exs
│ │ │ │ │ │ └── recursive.exs
│ │ │ │ │ ├── consolidation/
│ │ │ │ │ │ ├── no_impl.ex
│ │ │ │ │ │ ├── sample.ex
│ │ │ │ │ │ └── with_any.ex
│ │ │ │ │ ├── cp_mode
│ │ │ │ │ ├── cp_r/
│ │ │ │ │ │ ├── a/
│ │ │ │ │ │ │ ├── 1.txt
│ │ │ │ │ │ │ └── a/
│ │ │ │ │ │ │ └── 2.txt
│ │ │ │ │ │ └── b/
│ │ │ │ │ │ └── 3.txt
│ │ │ │ │ ├── dialyzer/
│ │ │ │ │ │ ├── assertions.ex
│ │ │ │ │ │ ├── boolean_check.ex
│ │ │ │ │ │ ├── callback.ex
│ │ │ │ │ │ ├── cond.ex
│ │ │ │ │ │ ├── defmacrop.ex
│ │ │ │ │ │ ├── for_bitstring.ex
│ │ │ │ │ │ ├── for_boolean_check.ex
│ │ │ │ │ │ ├── in_range.ex
│ │ │ │ │ │ ├── is_struct.ex
│ │ │ │ │ │ ├── macrocallback.ex
│ │ │ │ │ │ ├── opaqueness.ex
│ │ │ │ │ │ ├── raise.ex
│ │ │ │ │ │ ├── regressions.ex
│ │ │ │ │ │ ├── remote_call.ex
│ │ │ │ │ │ ├── rewrite.ex
│ │ │ │ │ │ ├── try.ex
│ │ │ │ │ │ ├── with.ex
│ │ │ │ │ │ ├── with_no_return.ex
│ │ │ │ │ │ └── with_throwing_else.ex
│ │ │ │ │ ├── file.txt
│ │ │ │ │ ├── multiline_file.txt
│ │ │ │ │ ├── utf16_be_bom.txt
│ │ │ │ │ ├── utf16_le_bom.txt
│ │ │ │ │ ├── utf8.txt
│ │ │ │ │ └── utf8_bom.txt
│ │ │ │ ├── float_test.exs
│ │ │ │ ├── function_test.exs
│ │ │ │ ├── gen_server_test.exs
│ │ │ │ ├── inspect/
│ │ │ │ │ └── algebra_test.exs
│ │ │ │ ├── inspect_test.exs
│ │ │ │ ├── integer_test.exs
│ │ │ │ ├── io/
│ │ │ │ │ ├── ansi/
│ │ │ │ │ │ └── docs_test.exs
│ │ │ │ │ └── ansi_test.exs
│ │ │ │ ├── io_test.exs
│ │ │ │ ├── json_test.exs
│ │ │ │ ├── kernel/
│ │ │ │ │ ├── alias_test.exs
│ │ │ │ │ ├── binary_test.exs
│ │ │ │ │ ├── charlist_test.exs
│ │ │ │ │ ├── cli_test.exs
│ │ │ │ │ ├── comprehension_test.exs
│ │ │ │ │ ├── defaults_test.exs
│ │ │ │ │ ├── deprecated_test.exs
│ │ │ │ │ ├── diagnostics_test.exs
│ │ │ │ │ ├── dialyzer_test.exs
│ │ │ │ │ ├── docs_test.exs
│ │ │ │ │ ├── errors_test.exs
│ │ │ │ │ ├── expansion_test.exs
│ │ │ │ │ ├── fn_test.exs
│ │ │ │ │ ├── guard_test.exs
│ │ │ │ │ ├── impl_test.exs
│ │ │ │ │ ├── import_test.exs
│ │ │ │ │ ├── lexical_tracker_test.exs
│ │ │ │ │ ├── macros_test.exs
│ │ │ │ │ ├── overridable_test.exs
│ │ │ │ │ ├── parallel_compiler_test.exs
│ │ │ │ │ ├── parser_test.exs
│ │ │ │ │ ├── quote_test.exs
│ │ │ │ │ ├── raise_test.exs
│ │ │ │ │ ├── sigils_test.exs
│ │ │ │ │ ├── special_forms_test.exs
│ │ │ │ │ ├── string_tokenizer_test.exs
│ │ │ │ │ ├── tracers_test.exs
│ │ │ │ │ ├── warning_test.exs
│ │ │ │ │ └── with_test.exs
│ │ │ │ ├── kernel_test.exs
│ │ │ │ ├── keyword_test.exs
│ │ │ │ ├── list/
│ │ │ │ │ └── chars_test.exs
│ │ │ │ ├── list_test.exs
│ │ │ │ ├── macro/
│ │ │ │ │ └── env_test.exs
│ │ │ │ ├── macro_test.exs
│ │ │ │ ├── map_set_test.exs
│ │ │ │ ├── map_test.exs
│ │ │ │ ├── module/
│ │ │ │ │ └── types/
│ │ │ │ │ ├── descr_test.exs
│ │ │ │ │ ├── expr_test.exs
│ │ │ │ │ ├── helpers_test.exs
│ │ │ │ │ ├── infer_test.exs
│ │ │ │ │ ├── integration_test.exs
│ │ │ │ │ ├── map_test.exs
│ │ │ │ │ ├── pattern_test.exs
│ │ │ │ │ └── type_helper.exs
│ │ │ │ ├── module_test.exs
│ │ │ │ ├── option_parser_test.exs
│ │ │ │ ├── partition_supervisor_test.exs
│ │ │ │ ├── path_test.exs
│ │ │ │ ├── port_test.exs
│ │ │ │ ├── process_test.exs
│ │ │ │ ├── protocol/
│ │ │ │ │ └── consolidation_test.exs
│ │ │ │ ├── protocol_test.exs
│ │ │ │ ├── range_test.exs
│ │ │ │ ├── record_test.exs
│ │ │ │ ├── regex_test.exs
│ │ │ │ ├── registry/
│ │ │ │ │ ├── duplicate_test.exs
│ │ │ │ │ └── unique_test.exs
│ │ │ │ ├── registry_test.exs
│ │ │ │ ├── stream_test.exs
│ │ │ │ ├── string/
│ │ │ │ │ └── chars_test.exs
│ │ │ │ ├── string_io_test.exs
│ │ │ │ ├── string_test.exs
│ │ │ │ ├── supervisor_test.exs
│ │ │ │ ├── system_test.exs
│ │ │ │ ├── task/
│ │ │ │ │ └── supervisor_test.exs
│ │ │ │ ├── task_test.exs
│ │ │ │ ├── test_helper.exs
│ │ │ │ ├── tuple_test.exs
│ │ │ │ ├── typespec_test.exs
│ │ │ │ ├── uri_test.exs
│ │ │ │ └── version_test.exs
│ │ │ └── erlang/
│ │ │ ├── atom_test.erl
│ │ │ ├── control_test.erl
│ │ │ ├── function_test.erl
│ │ │ ├── string_test.erl
│ │ │ ├── test_helper.erl
│ │ │ └── tokenizer_test.erl
│ │ └── unicode/
│ │ ├── IdentifierType.txt
│ │ ├── PropList.txt
│ │ ├── PropertyValueAliases.txt
│ │ ├── ScriptExtensions.txt
│ │ ├── Scripts.txt
│ │ ├── SpecialCasing.txt
│ │ ├── UnicodeData.txt
│ │ ├── confusables.txt
│ │ ├── security.ex
│ │ ├── tokenizer.ex
│ │ └── unicode.ex
│ ├── ex_unit/
│ │ ├── examples/
│ │ │ ├── difference.exs
│ │ │ └── one_of_each.exs
│ │ ├── lib/
│ │ │ ├── ex_unit/
│ │ │ │ ├── assertions.ex
│ │ │ │ ├── callbacks.ex
│ │ │ │ ├── capture_io.ex
│ │ │ │ ├── capture_log.ex
│ │ │ │ ├── capture_server.ex
│ │ │ │ ├── case.ex
│ │ │ │ ├── case_template.ex
│ │ │ │ ├── cli_formatter.ex
│ │ │ │ ├── diff.ex
│ │ │ │ ├── doc_test.ex
│ │ │ │ ├── event_manager.ex
│ │ │ │ ├── failures_manifest.ex
│ │ │ │ ├── filters.ex
│ │ │ │ ├── formatter.ex
│ │ │ │ ├── on_exit_handler/
│ │ │ │ │ └── supervisor.ex
│ │ │ │ ├── on_exit_handler.ex
│ │ │ │ ├── runner.ex
│ │ │ │ ├── runner_stats.ex
│ │ │ │ └── server.ex
│ │ │ └── ex_unit.ex
│ │ ├── mix.exs
│ │ └── test/
│ │ ├── ex_unit/
│ │ │ ├── assertions_test.exs
│ │ │ ├── callbacks_test.exs
│ │ │ ├── capture_io_test.exs
│ │ │ ├── capture_log_test.exs
│ │ │ ├── case_template_test.exs
│ │ │ ├── case_test.exs
│ │ │ ├── describe_test.exs
│ │ │ ├── diff_test.exs
│ │ │ ├── doc_test_test.exs
│ │ │ ├── failures_manifest_test.exs
│ │ │ ├── filters_test.exs
│ │ │ ├── formatter_test.exs
│ │ │ ├── register_test.exs
│ │ │ ├── runner_stats_test.exs
│ │ │ └── supervised_test.exs
│ │ ├── ex_unit_test.exs
│ │ ├── fixtures/
│ │ │ ├── failing.md
│ │ │ └── passing.md
│ │ └── test_helper.exs
│ ├── iex/
│ │ ├── lib/
│ │ │ ├── iex/
│ │ │ │ ├── app.ex
│ │ │ │ ├── autocomplete.ex
│ │ │ │ ├── broker.ex
│ │ │ │ ├── config.ex
│ │ │ │ ├── evaluator.ex
│ │ │ │ ├── helpers.ex
│ │ │ │ ├── history.ex
│ │ │ │ ├── info.ex
│ │ │ │ ├── introspection.ex
│ │ │ │ ├── mix_listener.ex
│ │ │ │ ├── pry.ex
│ │ │ │ └── server.ex
│ │ │ └── iex.ex
│ │ ├── mix.exs
│ │ └── test/
│ │ ├── iex/
│ │ │ ├── autocomplete_test.exs
│ │ │ ├── config_test.exs
│ │ │ ├── helpers_test.exs
│ │ │ ├── info_test.exs
│ │ │ ├── interaction_test.exs
│ │ │ ├── pry_test.exs
│ │ │ └── server_test.exs
│ │ └── test_helper.exs
│ ├── logger/
│ │ ├── lib/
│ │ │ ├── logger/
│ │ │ │ ├── app.ex
│ │ │ │ ├── backends/
│ │ │ │ │ ├── config.ex
│ │ │ │ │ ├── console.ex
│ │ │ │ │ ├── handler.ex
│ │ │ │ │ ├── internal.ex
│ │ │ │ │ ├── supervisor.ex
│ │ │ │ │ └── watcher.ex
│ │ │ │ ├── formatter.ex
│ │ │ │ ├── translator.ex
│ │ │ │ └── utils.ex
│ │ │ └── logger.ex
│ │ ├── mix.exs
│ │ └── test/
│ │ ├── logger/
│ │ │ ├── backends/
│ │ │ │ ├── console_test.exs
│ │ │ │ └── handler_test.exs
│ │ │ ├── backends_test.exs
│ │ │ ├── formatter_test.exs
│ │ │ ├── translator_test.exs
│ │ │ └── utils_test.exs
│ │ ├── logger_test.exs
│ │ └── test_helper.exs
│ └── mix/
│ ├── lib/
│ │ ├── mix/
│ │ │ ├── app_loader.ex
│ │ │ ├── cli.ex
│ │ │ ├── compilers/
│ │ │ │ ├── elixir.ex
│ │ │ │ ├── erlang.ex
│ │ │ │ ├── protocol.ex
│ │ │ │ └── test.ex
│ │ │ ├── config.ex
│ │ │ ├── dep/
│ │ │ │ ├── converger.ex
│ │ │ │ ├── elixir_scm.ex
│ │ │ │ ├── fetcher.ex
│ │ │ │ ├── loader.ex
│ │ │ │ ├── lock.ex
│ │ │ │ └── umbrella.ex
│ │ │ ├── dep.ex
│ │ │ ├── exceptions.ex
│ │ │ ├── generator.ex
│ │ │ ├── hex.ex
│ │ │ ├── local/
│ │ │ │ └── installer.ex
│ │ │ ├── local.ex
│ │ │ ├── project.ex
│ │ │ ├── project_stack.ex
│ │ │ ├── pubsub/
│ │ │ │ └── subscriber.ex
│ │ │ ├── pubsub.ex
│ │ │ ├── rebar.ex
│ │ │ ├── release.ex
│ │ │ ├── remote_converger.ex
│ │ │ ├── scm/
│ │ │ │ ├── git.ex
│ │ │ │ └── path.ex
│ │ │ ├── scm.ex
│ │ │ ├── shell/
│ │ │ │ ├── io.ex
│ │ │ │ ├── process.ex
│ │ │ │ └── quiet.ex
│ │ │ ├── shell.ex
│ │ │ ├── state.ex
│ │ │ ├── sync/
│ │ │ │ ├── lock.ex
│ │ │ │ └── pubsub.ex
│ │ │ ├── task.compiler.ex
│ │ │ ├── task.ex
│ │ │ ├── tasks/
│ │ │ │ ├── app.config.ex
│ │ │ │ ├── app.start.ex
│ │ │ │ ├── app.tree.ex
│ │ │ │ ├── archive.build.ex
│ │ │ │ ├── archive.check.ex
│ │ │ │ ├── archive.ex
│ │ │ │ ├── archive.install.ex
│ │ │ │ ├── archive.uninstall.ex
│ │ │ │ ├── clean.ex
│ │ │ │ ├── cmd.ex
│ │ │ │ ├── compile.all.ex
│ │ │ │ ├── compile.app.ex
│ │ │ │ ├── compile.elixir.ex
│ │ │ │ ├── compile.erlang.ex
│ │ │ │ ├── compile.ex
│ │ │ │ ├── compile.leex.ex
│ │ │ │ ├── compile.protocols.ex
│ │ │ │ ├── compile.yecc.ex
│ │ │ │ ├── deps.clean.ex
│ │ │ │ ├── deps.compile.ex
│ │ │ │ ├── deps.ex
│ │ │ │ ├── deps.get.ex
│ │ │ │ ├── deps.loadpaths.ex
│ │ │ │ ├── deps.partition.ex
│ │ │ │ ├── deps.precompile.ex
│ │ │ │ ├── deps.tree.ex
│ │ │ │ ├── deps.unlock.ex
│ │ │ │ ├── deps.update.ex
│ │ │ │ ├── do.ex
│ │ │ │ ├── escript.build.ex
│ │ │ │ ├── escript.ex
│ │ │ │ ├── escript.install.ex
│ │ │ │ ├── escript.uninstall.ex
│ │ │ │ ├── eval.ex
│ │ │ │ ├── format.ex
│ │ │ │ ├── help.ex
│ │ │ │ ├── iex.ex
│ │ │ │ ├── loadconfig.ex
│ │ │ │ ├── loadpaths.ex
│ │ │ │ ├── local.ex
│ │ │ │ ├── local.hex.ex
│ │ │ │ ├── local.rebar.ex
│ │ │ │ ├── new.ex
│ │ │ │ ├── profile.cprof.ex
│ │ │ │ ├── profile.eprof.ex
│ │ │ │ ├── profile.fprof.ex
│ │ │ │ ├── profile.tprof.ex
│ │ │ │ ├── release.ex
│ │ │ │ ├── release.init.ex
│ │ │ │ ├── run.ex
│ │ │ │ ├── test.coverage.ex
│ │ │ │ ├── test.ex
│ │ │ │ ├── will_recompile.ex
│ │ │ │ └── xref.ex
│ │ │ ├── tasks_server.ex
│ │ │ └── utils.ex
│ │ └── mix.ex
│ ├── mix.exs
│ └── test/
│ ├── fixtures/
│ │ ├── .gitignore
│ │ ├── archive/
│ │ │ ├── invalid-archive-0.1.0.ez
│ │ │ ├── lib/
│ │ │ │ └── local.sample.ex
│ │ │ └── priv/
│ │ │ └── .dot_file
│ │ ├── compile_erlang/
│ │ │ ├── include/
│ │ │ │ └── r.hrl
│ │ │ └── src/
│ │ │ ├── b.erl
│ │ │ ├── c.erl
│ │ │ └── z.erl
│ │ ├── compile_leex/
│ │ │ └── src/
│ │ │ └── test_ok.xrl
│ │ ├── compile_listeners/
│ │ │ └── deps/
│ │ │ └── reloader/
│ │ │ ├── lib/
│ │ │ │ └── reloader.ex
│ │ │ └── mix.exs
│ │ ├── compile_yecc/
│ │ │ └── src/
│ │ │ └── test_ok.yrl
│ │ ├── config.exs
│ │ ├── deps_cycle/
│ │ │ ├── app1/
│ │ │ │ └── mix.exs
│ │ │ └── app2/
│ │ │ └── mix.exs
│ │ ├── deps_status/
│ │ │ ├── _build/
│ │ │ │ └── dev/
│ │ │ │ └── lib/
│ │ │ │ ├── invalidapp/
│ │ │ │ │ └── ebin/
│ │ │ │ │ └── invalidapp.app
│ │ │ │ ├── invalidvsn/
│ │ │ │ │ └── ebin/
│ │ │ │ │ └── invalidvsn.app
│ │ │ │ ├── nosemver/
│ │ │ │ │ └── ebin/
│ │ │ │ │ └── nosemver.app
│ │ │ │ └── ok/
│ │ │ │ └── ebin/
│ │ │ │ └── ok.app
│ │ │ ├── custom/
│ │ │ │ ├── bad_deps_repo/
│ │ │ │ │ └── mix.exs
│ │ │ │ ├── deps_repo/
│ │ │ │ │ └── mix.exs
│ │ │ │ ├── noscm_repo/
│ │ │ │ │ └── mix.exs
│ │ │ │ └── raw_repo/
│ │ │ │ ├── lib/
│ │ │ │ │ └── raw_repo.ex
│ │ │ │ └── mix.exs
│ │ │ └── deps/
│ │ │ ├── invalidapp/
│ │ │ │ └── mix.exs
│ │ │ ├── invalidvsn/
│ │ │ │ └── .gitkeep
│ │ │ ├── nosemver/
│ │ │ │ └── .gitkeep
│ │ │ └── ok/
│ │ │ ├── mix.exs
│ │ │ └── priv/
│ │ │ └── sample
│ │ ├── escript_test/
│ │ │ ├── config/
│ │ │ │ └── config.exs
│ │ │ ├── lib/
│ │ │ │ └── escript_test.ex
│ │ │ ├── priv/
│ │ │ │ └── hello/
│ │ │ │ └── world.txt
│ │ │ └── src/
│ │ │ └── escript_test.erl
│ │ ├── no_mixfile/
│ │ │ └── lib/
│ │ │ ├── a.ex
│ │ │ └── b.ex
│ │ ├── rebar3
│ │ ├── rebar_dep/
│ │ │ ├── rebar.config
│ │ │ ├── rebar.config.script
│ │ │ └── src/
│ │ │ ├── rebar_dep.app.src
│ │ │ └── rebar_dep.erl
│ │ ├── rebar_dep_script/
│ │ │ ├── rebar.config
│ │ │ └── rebar.config.script
│ │ ├── rebar_override/
│ │ │ └── rebar.config.script
│ │ ├── release_test/
│ │ │ ├── config/
│ │ │ │ └── config.exs
│ │ │ ├── lib/
│ │ │ │ └── release_test.ex
│ │ │ ├── mix.exs
│ │ │ └── priv/
│ │ │ └── hello
│ │ ├── test_failed/
│ │ │ ├── mix.exs
│ │ │ └── test/
│ │ │ ├── only_failing_test_failed.exs
│ │ │ ├── only_passing_test_failed.exs
│ │ │ ├── passing_and_failing_test_failed.exs
│ │ │ └── test_helper.exs
│ │ ├── test_stale/
│ │ │ ├── lib/
│ │ │ │ ├── a.ex
│ │ │ │ └── b.ex
│ │ │ ├── mix.exs
│ │ │ └── test/
│ │ │ ├── a_test_stale.exs
│ │ │ ├── b_test_stale.exs
│ │ │ └── test_helper.exs
│ │ ├── umbrella_dep/
│ │ │ ├── deps/
│ │ │ │ └── umbrella/
│ │ │ │ ├── apps/
│ │ │ │ │ ├── bar/
│ │ │ │ │ │ ├── lib/
│ │ │ │ │ │ │ └── bar.ex
│ │ │ │ │ │ └── mix.exs
│ │ │ │ │ ├── dont_error_on_files
│ │ │ │ │ ├── dont_error_on_missing_mixfile/
│ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ └── foo/
│ │ │ │ │ ├── lib/
│ │ │ │ │ │ └── foo.ex
│ │ │ │ │ └── mix.exs
│ │ │ │ └── mix.exs
│ │ │ └── mix.exs
│ │ └── umbrella_test/
│ │ ├── apps/
│ │ │ ├── bar/
│ │ │ │ ├── lib/
│ │ │ │ │ └── bar.ex
│ │ │ │ ├── mix.exs
│ │ │ │ └── test/
│ │ │ │ ├── bar_tests.exs
│ │ │ │ └── test_helper.exs
│ │ │ └── foo/
│ │ │ ├── lib/
│ │ │ │ └── foo.ex
│ │ │ ├── mix.exs
│ │ │ └── test/
│ │ │ ├── foo_tests.exs
│ │ │ └── test_helper.exs
│ │ └── mix.exs
│ ├── mix/
│ │ ├── aliases_test.exs
│ │ ├── cli_test.exs
│ │ ├── dep/
│ │ │ ├── converger_test.exs
│ │ │ └── lock_test.exs
│ │ ├── dep_test.exs
│ │ ├── generator_test.exs
│ │ ├── local/
│ │ │ └── installer_test.exs
│ │ ├── local_test.exs
│ │ ├── project_test.exs
│ │ ├── rebar_test.exs
│ │ ├── release_test.exs
│ │ ├── scm/
│ │ │ └── git_test.exs
│ │ ├── scm_test.exs
│ │ ├── shell/
│ │ │ ├── io_test.exs
│ │ │ └── quiet_test.exs
│ │ ├── shell_test.exs
│ │ ├── sync/
│ │ │ ├── lock_test.exs
│ │ │ └── pubsub_test.exs
│ │ ├── task_test.exs
│ │ ├── tasks/
│ │ │ ├── app.config_test.exs
│ │ │ ├── app.start_test.exs
│ │ │ ├── app.tree_test.exs
│ │ │ ├── archive_test.exs
│ │ │ ├── clean_test.exs
│ │ │ ├── cmd_test.exs
│ │ │ ├── compile.app_test.exs
│ │ │ ├── compile.elixir_test.exs
│ │ │ ├── compile.erlang_test.exs
│ │ │ ├── compile.leex_test.exs
│ │ │ ├── compile.yecc_test.exs
│ │ │ ├── compile_test.exs
│ │ │ ├── deps.git_test.exs
│ │ │ ├── deps.path_test.exs
│ │ │ ├── deps.tree_test.exs
│ │ │ ├── deps_test.exs
│ │ │ ├── do_test.exs
│ │ │ ├── escript_test.exs
│ │ │ ├── eval_test.exs
│ │ │ ├── format_test.exs
│ │ │ ├── help_test.exs
│ │ │ ├── iex_test.exs
│ │ │ ├── loadconfig_test.exs
│ │ │ ├── local_test.exs
│ │ │ ├── new_test.exs
│ │ │ ├── profile.cprof_test.exs
│ │ │ ├── profile.eprof_test.exs
│ │ │ ├── profile.fprof_test.exs
│ │ │ ├── profile.tprof_test.exs
│ │ │ ├── release.init_test.exs
│ │ │ ├── release_test.exs
│ │ │ ├── run_test.exs
│ │ │ ├── test_test.exs
│ │ │ ├── will_recompile_test.exs
│ │ │ └── xref_test.exs
│ │ ├── umbrella_test.exs
│ │ └── utils_test.exs
│ ├── mix_test.exs
│ └── test_helper.exs
├── man/
│ ├── common
│ ├── elixir.1.in
│ ├── elixirc.1
│ ├── iex.1.in
│ └── mix.1
└── project.spdx.yml
================================================
FILE CONTENTS
================================================
================================================
FILE: .formatter.exs
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
[
inputs: [
"lib/*/{lib,scripts,unicode,test}/**/*.{ex,exs}",
"lib/*/*.exs",
"lib/ex_unit/examples/*.exs",
".formatter.exs"
],
locals_without_parens: [
# Formatter tests
assert_format: 2,
assert_format: 3,
assert_same: 1,
assert_same: 2,
# Errors tests
assert_eval_raise: 3,
# Float tests
float_assert: 1
]
]
================================================
FILE: .gitattributes
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
lib/elixir/test/elixir/fixtures/*.txt text eol=lf
*.ex diff=elixir
*.exs diff=elixir
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
---
blank_issues_enabled: true
contact_links:
- name: Ask questions, support, and general discussions
url: https://elixirforum.com/
about: Ask questions, provide support, and more on Elixir Forum
- name: Propose new features
url: https://github.com/elixir-lang/elixir/#proposing-new-features
about: Propose new features in our mailing list
================================================
FILE: .github/ISSUE_TEMPLATE/issue.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
---
name: Report an issue
description:
Tell us about something that is not working the way we (probably) intend
body:
- type: markdown
attributes:
value: >
Thank you for contributing to Elixir! :heart:
Please, do not use this form for guidance, questions or support.
Try instead in [Elixir Forum](https://elixirforum.com),
the [IRC Chat](https://web.libera.chat/#elixir),
[Stack Overflow](https://stackoverflow.com/questions/tagged/elixir),
[Slack](https://elixir-slackin.herokuapp.com),
[Discord](https://discord.gg/elixir) or in other online communities.
- type: textarea
id: elixir-and-otp-version
attributes:
label: Elixir and Erlang/OTP versions
description: Paste the output of `elixir --version` here.
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
description: The operating system that this issue is happening on.
validations:
required: true
- type: textarea
id: current-behavior
attributes:
label: Current behavior
description: >
Include code samples, errors, and stacktraces if appropriate.
If reporting a bug, please include the reproducing steps.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A short description on how you expect the code to behave.
validations:
required: true
================================================
FILE: .github/dependabot.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
================================================
FILE: .github/workflows/ci.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
ELIXIR_ASSERT_TIMEOUT: 2000
ELIXIRC_OPTS: "--warnings-as-errors"
LANG: C.UTF-8
permissions:
contents: read
jobs:
test_linux:
name: Ubuntu 24.04, OTP ${{ matrix.otp_version }}${{ matrix.deterministic && ' (deterministic)' || '' }}${{ matrix.coverage && ' (coverage)' || '' }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- otp_version: "29.0-rc1"
- otp_version: "28.1"
deterministic: true
- otp_version: "28.1"
docs: true
coverage: true
- otp_version: "27.3"
- otp_version: "27.0"
- otp_version: master
development: true
- otp_version: maint
development: true
env:
ERLC_OPTS: "warnings_as_errors"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
with:
otp-version: ${{ matrix.otp_version }}
- name: Set ERL_COMPILER_OPTIONS
if: ${{ matrix.deterministic }}
run: echo "ERL_COMPILER_OPTIONS=deterministic" >> $GITHUB_ENV
- name: Compile Elixir
run: |
make compile
echo "$PWD/bin" >> $GITHUB_PATH
- name: Build info
run: bin/elixir --version
- name: Check format
run: make test_formatted && echo "All Elixir source code files are properly formatted."
- name: Erlang test suite
run: make test_erlang
continue-on-error: ${{ matrix.development == true }}
- name: Elixir test suite
run: make test_elixir
continue-on-error: ${{ matrix.development == true }}
env:
COVER: "${{ matrix.coverage }}"
- name: Build docs (ExDoc main)
if: ${{ matrix.docs }}
run: |
cd ..
git clone https://github.com/elixir-lang/ex_doc.git --depth 1
cd ex_doc
../elixir/bin/mix do local.rebar --force + local.hex --force + deps.get + compile
cd ../elixir/
git fetch --tags
DOCS_OPTIONS="--warnings-as-errors" make docs
- name: "Calculate Coverage"
if: ${{ matrix.coverage }}
run: make cover | tee "$GITHUB_STEP_SUMMARY"
- name: "Upload Coverage Artifact"
if: ${{ matrix.coverage }}
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: TestCoverage
path: cover/*
- name: Check reproducible builds
if: ${{ matrix.deterministic }}
run: taskset 1 make check_reproducible
- name: Check git is not required
if: ${{ matrix.deterministic }}
run: |
rm -rf .git
cd lib/elixir
elixirc --ignore-module-conflict -o ebin "lib/**/*.ex"
test_windows:
name: Windows Server 2022, OTP ${{ matrix.otp_version }}
runs-on: windows-2022
strategy:
matrix:
otp_version:
- "29.0-rc1"
- "28.1"
- "27.3"
steps:
- name: Configure Git
run: git config --global core.autocrlf input
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
with:
otp-version: ${{ matrix.otp_version }}
- name: Compile Elixir
run: |
Remove-Item -Recurse -Force '.git'
make compile
- name: Build info
run: bin/elixir --version
- name: Check format
run: make test_formatted && echo "All Elixir source code files are properly formatted."
- name: Erlang test suite
run: make test_erlang
- name: Elixir test suite
run: |
Remove-Item 'c:/Windows/System32/drivers/etc/hosts'
make test_elixir
================================================
FILE: .github/workflows/codeql.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2026 The Elixir Team
name: "CodeQL Advanced"
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "29 8 * * 1"
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: "ubuntu-latest"
permissions:
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
with:
category: "/language:${{matrix.language}}"
zizmor:
name: Zizmor
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run zizmor
uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d # v0.5.0
================================================
FILE: .github/workflows/license_compliance.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
name: License Compliance
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
LANG: C.UTF-8
jobs:
license_compliance:
name: Check License Compliance
runs-on: ubuntu-24.04
steps:
- name: Use HTTPS instead of SSH for Git cloning
id: git-config
shell: bash
run: git config --global url.https://github.com/.insteadOf ssh://git@github.com/
- name: Checkout project
id: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run OSS Review Toolkit
id: ort
uses: ./.github/workflows/ort
with:
upload-reports: true
fail-on-violation: true
report-formats: "WebApp"
version: "${{ github.sha }}"
================================================
FILE: .github/workflows/markdown.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
name: Markdown Content
on:
push:
branches:
- "main"
paths: &paths-filter
- "**/*.md"
- .github/workflows/markdown.yml
- .markdownlint-cli2.jsonc
pull_request:
paths: *paths-filter
workflow_dispatch:
permissions:
contents: read
env:
LANG: C.UTF-8
jobs:
lint:
name: Lint Markdown content
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run markdownlint-cli2
uses: DavidAnson/markdownlint-cli2-action@07035fd053f7be764496c0f8d8f9f41f98305101 # v22.0.0
================================================
FILE: .github/workflows/notify.exs
================================================
# #!/usr/bin/env elixir
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
[tag] = System.argv()
Mix.install([
{:req, "~> 0.2.1"},
{:jason, "~> 1.0"}
])
%{status: 200, body: release} =
Req.get!("https://api.github.com/repos/elixir-lang/elixir/releases/tags/#{tag}")
if release["draft"] do
raise "cannot notify a draft release"
end
## Notify on elixir-lang-ann
names_and_checksums =
for asset <- release["assets"],
name = asset["name"],
name =~ ~r/.sha\d+sum$/,
do: {name, Req.get!(asset["browser_download_url"]).body}
line_items =
for {name, checksum_and_name} <- Enum.sort(names_and_checksums) do
[checksum | _] = String.split(checksum_and_name, " ")
root = Path.rootname(name)
"." <> type = Path.extname(name)
" * #{root} - #{type} - #{checksum}\n"
end
body = "https://github.com/elixir-lang/elixir/releases/tag/#{tag}\n\n#{line_items}"
IO.puts([
"========================================\n",
body,
"\n========================================"
])
mail = %{
# The email must have access to post
"From" => "jose.valim@dashbit.co",
"To" => "elixir-lang-ann@googlegroups.com",
"Subject" => "Elixir #{tag} released",
"HtmlBody" => body,
"MessageStream" => "outbound"
}
unless System.get_env("DRYRUN") do
headers = %{
"X-Postmark-Server-Token" => System.fetch_env!("ELIXIR_LANG_ANN_TOKEN")
}
resp = Req.post!("https://api.postmarkapp.com/email", {:json, mail}, headers: headers)
IO.puts("#{resp.status} elixir-lang-ann\n#{inspect(resp.body)}")
end
## Notify on Elixir Forum
post = %{
"title" => "Elixir #{tag} released",
"raw" => "https://github.com/elixir-lang/elixir/releases/tag/#{tag}\n\n#{release["body"]}",
# Elixir News
"category" => 28
}
unless System.get_env("DRYRUN") do
headers = %{
"api-key" => System.fetch_env!("ELIXIR_FORUM_TOKEN"),
"api-username" => "Elixir"
}
resp = Req.post!("https://elixirforum.com/posts.json", {:json, post}, headers: headers)
IO.puts("#{resp.status} Elixir Forum\n#{inspect(resp.body)}")
end
================================================
FILE: .github/workflows/ort/action.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
name: "Run OSS Review Toolkit"
description: "Runs OSS Review Toolkit & generates SBoMs"
inputs:
report-formats:
description: "ORT Report Formats"
required: true
fail-on-violation:
description: "Whether to fail on violation."
required: false
default: false
upload-reports:
description: "Whether to upload all reports"
required: false
default: false
version:
description: "Elixir Version (Tag / SHA)"
required: true
outputs:
results-path:
description: "See oss-review-toolkit/ort-ci-github-action action"
value: "${{ steps.ort.outputs.results-path }}"
results-sbom-cyclonedx-xml-path:
description: "See oss-review-toolkit/ort-ci-github-action action"
value: "${{ steps.ort.outputs.results-sbom-cyclonedx-xml-path }}"
results-sbom-cyclonedx-json-path:
description: "See oss-review-toolkit/ort-ci-github-action action"
value: "${{ steps.ort.outputs.results-sbom-cyclonedx-json-path }}"
results-sbom-spdx-yml-path:
description: "See oss-review-toolkit/ort-ci-github-action action"
value: "${{ steps.ort.outputs.results-sbom-spdx-yml-path }}"
results-sbom-spdx-json-path:
description: "See oss-review-toolkit/ort-ci-github-action action"
value: "${{ steps.ort.outputs.results-sbom-spdx-json-path }}"
runs:
using: "composite"
steps:
- name: Fetch Default ORT Config
id: fetch-default-ort-config
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: oss-review-toolkit/ort-config
ref: "main"
path: ".ort-config"
persist-credentials: false
- name: Setup ORT Config
id: setup-ort-config
shell: bash
run: |
mkdir -p "/$HOME/.ort/"
# Move Fetched Default Config into Place
mv .ort-config "$HOME/.ort/config"
# Append Global ORT Config
cat .ort/config/config.yml >> "$HOME/.ort/config/config.yml"
# Override Default Evaluator Rules
cp .ort/config/evaluator.rules.kts "$HOME/.ort/config/evaluator.rules.kts"
# Add Package Configurations
mkdir -p "$HOME/.ort/config/package-configurations/SpdxDocumentFile/The Elixir Team"
for FILE in .ort/package-configurations/*.yml; do
COMPONENT="$(basename "$FILE")"
cp "$FILE" "$HOME/.ort/config/package-configurations/SpdxDocumentFile/The Elixir Team/$COMPONENT"
sed -i -E \
"s/(\"SpdxDocumentFile:The Elixir Team:.+:)\"/\1${ELIXIR_VERSION}\"/" \
"$HOME/.ort/config/package-configurations/SpdxDocumentFile/The Elixir Team/$COMPONENT"
done
# Set Version in SPDX & Config
sed -i "s/# elixir-version-insert/versionInfo: '${ELIXIR_VERSION}'/" project.spdx.yml
sed -i -E "s/(\"SpdxDocumentFile:The Elixir Team:.+:)\"/\1${ELIXIR_VERSION}\"/" .ort.yml
sed -i "s|https://github.com/elixir-lang/elixir.git|${ELIXIR_REPO}@${ELIXIR_VERSION}|" project.spdx.yml
env:
ELIXIR_VERSION: "${{ inputs.version }}"
ELIXIR_REPO: "${{ github.server_url }}/${{ github.repository }}.git"
- name: "Cache ScanCode"
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: "~/.cache/scancode-tk"
key: ${{ runner.os }}-scancode
- name: Run OSS Review Toolkit
id: ort
uses: oss-review-toolkit/ort-ci-github-action@1805edcf1f4f55f35ae6e4d2d9795ccfb29b6021 # v1.1.0
with:
image: ghcr.io/oss-review-toolkit/ort-minimal:65.0.0
run: >-
labels,
cache-dependencies,
cache-scan-results,
analyzer,
scanner,
advisor,
evaluator,
reporter,
${{ inputs.upload-reports == 'true' && 'upload-results' || '' }}
fail-on: "${{ inputs.fail-on-violation == 'true' && 'violations,issues' || '' }}"
report-formats: "${{ inputs.report-formats }}"
ort-cli-report-args: >-
-O CycloneDX=output.file.formats=json,xml
-O SpdxDocument=outputFileFormats=JSON,YAML
sw-version: "${{ inputs.version }}"
================================================
FILE: .github/workflows/posix_compliance.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
name: POSIX Compliance
on:
push:
paths: &paths-filter
- .github/workflows/posix_compliance.yml
- bin/elixir
- bin/elixirc
- bin/iex
pull_request:
paths: *paths-filter
workflow_dispatch:
permissions:
contents: read
env:
LANG: C.UTF-8
jobs:
check_posix_compliance:
name: Check POSIX compliance
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install ShellCheck
run: |
sudo apt update
sudo apt install -y shellcheck
- name: Run ShellCheck on bin/ dir
run: |
shellcheck -e SC2039,2086 bin/elixir && \
echo "bin/elixir is POSIX compliant"
shellcheck bin/elixirc && \
echo "bin/elixirc is POSIX compliant"
shellcheck bin/iex && \
echo "bin/iex is POSIX compliant"
================================================
FILE: .github/workflows/release.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
name: Releases
on:
push:
branches:
- main
- v*.*
tags:
- v*
workflow_dispatch:
env:
ELIXIR_OPTS: "--warnings-as-errors"
LANG: C.UTF-8
permissions:
contents: read
jobs:
create_draft_release:
name: Create draft release
runs-on: ubuntu-24.04
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Create draft release
if: github.ref_type != 'branch'
run: |
gh release create \
--repo "$GITHUB_REPOSITORY" \
--title "$GITHUB_REF_NAME" \
--notes '' \
--draft \
"$GITHUB_REF_NAME"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# zizmor: ignore[artipacked]
if: github.ref_type == 'branch'
- name: Update ${{ github.ref_name }}-latest
if: github.ref_type == 'branch'
run: |
ref_name="${GITHUB_REF_NAME}-latest"
if ! gh release view "$ref_name"; then
gh release create \
--latest=false \
--title "$ref_name" \
--notes "Automated release for latest ${GITHUB_REF_NAME}." \
"$ref_name"
fi
git tag "$ref_name" --force
git push origin "$ref_name" --force
build:
name: Ubuntu 24.04, OTP ${{ matrix.otp_version }}${{ matrix.build_docs && ' (build docs)' || '' }}
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
include:
- otp: 27
otp_version: "27.0"
- otp: 28
otp_version: "28.0"
build_docs: build_docs
- otp: 29
otp_version: "29.0-rc1"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "Build Release"
uses: ./.github/workflows/release_pre_built
with:
otp_version: ${{ matrix.otp_version }}
otp: ${{ matrix.otp }}
build_docs: ${{ matrix.build_docs }}
- name: Create Docs Hashes
if: matrix.build_docs
run: |
shasum -a 1 Docs.zip > Docs.zip.sha1sum
shasum -a 256 Docs.zip > Docs.zip.sha256sum
- name: "Upload Linux release artifacts"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: build-linux-elixir-otp-${{ matrix.otp }}
path: elixir-otp-${{ matrix.otp }}.zip
- name: "Upload Windows release artifacts"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: build-windows-elixir-otp-${{ matrix.otp }}
path: elixir-otp-${{ matrix.otp }}.exe
- name: "Upload doc artifacts"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: matrix.build_docs
with:
name: Docs
path: Docs.zip*
sign:
name: Sign files, ${{ matrix.flavor == 'windows' && 'Windows' || matrix.flavor == 'linux' && 'Linux' || matrix.flavor }}, OTP ${{ matrix.otp }}
needs: [build]
environment: release
strategy:
fail-fast: true
matrix:
otp: [27, 28, 29]
flavor: [windows, linux]
env:
RELEASE_FILE: elixir-otp-${{ matrix.otp }}.${{ matrix.flavor == 'linux' && 'zip' || 'exe' }}
runs-on: ${{ matrix.flavor == 'linux' && 'ubuntu-24.04' || 'windows-2022' }}
permissions:
contents: write
id-token: write
steps:
- name: "Download build"
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: build-${{ matrix.flavor }}-elixir-otp-${{ matrix.otp }}
- name: Log in to Azure
if: ${{ matrix.flavor == 'windows' && vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: "Sign files with Trusted Signing"
uses: azure/trusted-signing-action@87c2e83e6868da99d3380aa309851b32ed9a8346 # v1.1.0
if: ${{ matrix.flavor == 'windows' && vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
with:
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
certificate-profile-name: ${{ vars.AZURE_CERTIFICATE_PROFILE_NAME }}
files-folder: ${{ github.workspace }}
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Create Release Hashes
if: matrix.flavor == 'windows'
shell: pwsh
run: |
$sha1 = Get-FileHash "$env:RELEASE_FILE" -Algorithm SHA1
$sha1.Hash.ToLower() + " " + $env:RELEASE_FILE | Out-File "$env:RELEASE_FILE.sha1sum"
$sha256 = Get-FileHash "$env:RELEASE_FILE" -Algorithm SHA256
$sha256.Hash.ToLower() + " " + $env:RELEASE_FILE | Out-File "$env:RELEASE_FILE.sha256sum"
- name: Create Release Hashes
if: matrix.flavor == 'linux'
shell: bash
run: |
shasum -a 1 "$RELEASE_FILE" > "${RELEASE_FILE}.sha1sum"
shasum -a 256 "$RELEASE_FILE" > "${RELEASE_FILE}.sha256sum"
- name: "Upload Linux release artifacts"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: sign-${{ matrix.flavor }}-elixir-otp-${{ matrix.otp }}
path: ${{ env.RELEASE_FILE }}*
sbom:
name: Generate SBoM
needs: [build, sign]
runs-on: ubuntu-24.04
permissions:
contents: write
id-token: write
attestations: write
steps:
- name: Use HTTPS instead of SSH for Git cloning
id: git-config
shell: bash
run: git config --global url.https://github.com/.insteadOf ssh://git@github.com/
- name: Checkout project
id: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "Download Build Artifacts"
id: download-build-artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
pattern: "{sign-*-elixir-otp-*,Docs}"
merge-multiple: true
path: /tmp/build-artifacts/
- name: "Run OSS Review Toolkit"
id: ort
uses: ./.github/workflows/ort
with:
report-formats: "CycloneDx,SpdxDocument"
version: "${{ github.ref_type == 'tag' && github.ref_name || github.sha }}"
- name: Attest Distribution Assets with SBoM
id: attest-sbom
uses: actions/attest-sbom@07e74fc4e78d1aad915e867f9a094073a9f71527 # v4.0.0
with:
subject-path: |
/tmp/build-artifacts/{elixir-otp-*.*,Docs.zip}
${{ steps.ort.outputs.results-sbom-cyclonedx-xml-path }}
${{ steps.ort.outputs.results-sbom-cyclonedx-json-path }}
${{ steps.ort.outputs.results-sbom-spdx-yml-path }}
${{ steps.ort.outputs.results-sbom-spdx-json-path }}
sbom-path: "${{ steps.ort.outputs.results-sbom-spdx-json-path }}"
- name: "Copy SBoM provenance"
id: sbom-provenance
shell: bash
run: |
mkdir attestations
for FILE in /tmp/build-artifacts/{elixir-otp-*.*,Docs.zip}; do
cp "$ATTESTATION" "attestations/$(basename "$FILE").sigstore"
done
cp "$ATTESTATION" "attestations/$(basename "$SBOM_CYCLONEDX_XML").sigstore"
cp "$ATTESTATION" "attestations/$(basename "$SBOM_CYCLONEDX_JSON").sigstore"
cp "$ATTESTATION" "attestations/$(basename "$SBOM_SPDX_YML").sigstore"
cp "$ATTESTATION" "attestations/$(basename "$SBOM_SPDX_JSON").sigstore"
env:
ATTESTATION: "${{ steps.attest-sbom.outputs.bundle-path }}"
SBOM_CYCLONEDX_XML: "${{ steps.ort.outputs.results-sbom-cyclonedx-xml-path }}"
SBOM_CYCLONEDX_JSON: "${{ steps.ort.outputs.results-sbom-cyclonedx-json-path }}"
SBOM_SPDX_YML: "${{ steps.ort.outputs.results-sbom-spdx-yml-path }}"
SBOM_SPDX_JSON: "${{ steps.ort.outputs.results-sbom-spdx-json-path }}"
- name: "Assemble Release SBoM Artifacts"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: "SBoM"
path: |
${{ steps.ort.outputs.results-sbom-cyclonedx-xml-path }}
${{ steps.ort.outputs.results-sbom-cyclonedx-json-path }}
${{ steps.ort.outputs.results-sbom-spdx-yml-path }}
${{ steps.ort.outputs.results-sbom-spdx-json-path }}
- name: "Assemble Distribution Attestations"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: "Attestations"
path: "attestations/*.sigstore"
upload-release:
name: Upload release
needs: [create_draft_release, build, sign, sbom]
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
pattern: "{sign-*-elixir-otp-*,Docs,SBoM,Attestations}"
merge-multiple: true
- name: Upload Pre-build
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "$GITHUB_REF_TYPE" == "branch" ]; then
tag="${GITHUB_REF_NAME}-latest"
else
tag="$GITHUB_REF_NAME"
fi
gh release upload \
--repo "$GITHUB_REPOSITORY" \
--clobber \
"$tag" \
elixir-otp-*.zip \
elixir-otp-*.zip.sha{1,256}sum \
elixir-otp-*.zip.sigstore \
elixir-otp-*.exe \
elixir-otp-*.exe.sha{1,256}sum \
elixir-otp-*.exe.sigstore \
Docs.zip \
Docs.zip.sha{1,256}sum \
Docs.zip.sigstore \
bom.*
upload-builds-hex-pm:
name: Upload builds to hex.pm
runs-on: ubuntu-24.04
needs: [build, sign]
concurrency: builds-hex-pm
environment: release
env:
AWS_ACCESS_KEY_ID: ${{ secrets.HEX_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.HEX_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ vars.HEX_AWS_REGION }}
AWS_S3_BUCKET: ${{ vars.HEX_AWS_S3_BUCKET }}
steps:
- name: "Check if variables are set up"
if: "${{ ! vars.HEX_AWS_REGION }}"
run: |
echo "Required variables for uploading to hex.pm are not set up, skipping..."
exit 1
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
pattern: "{sign-*-elixir-otp-*,Docs}"
merge-multiple: true
- name: Init purge keys file
run: |
touch purge_keys.txt
- name: Upload Precompiled to S3
run: |
oldest_otp=$(find . -type f -name 'elixir-otp-*.zip' | sed -r 's/^.*elixir-otp-([[:digit:]]+)\.zip$/\1/' | sort -n | head -n 1)
for zip in $(find . -type f -name 'elixir-otp-*.zip' | sed 's/^\.\///'); do
dest=${zip/elixir/${GITHUB_REF_NAME}}
surrogate_key=${dest/.zip$/}
aws s3 cp "${zip}" "s3://${AWS_S3_BUCKET}/builds/elixir/${dest}" \
--cache-control "public,max-age=3600" \
--metadata "{\"surrogate-key\":\"builds builds/elixir builds/elixir/${surrogate_key}\",\"surrogate-control\":\"public,max-age=604800\"}"
echo "builds/elixir/${surrogate_key}" >> purge_keys.txt
if [ "$zip" == "elixir-otp-${oldest_otp}.zip" ]; then
aws s3 cp "${zip}" "s3://${AWS_S3_BUCKET}/builds/elixir/${GITHUB_REF_NAME}.zip" \
--cache-control "public,max-age=3600" \
--metadata "{\"surrogate-key\":\"builds builds/elixir builds/elixir/${GITHUB_REF_NAME}\",\"surrogate-control\":\"public,max-age=604800\"}"
echo builds/elixir/${GITHUB_REF_NAME} >> purge_keys.txt
fi
done
- name: Upload Docs to S3
run: |
version=$(echo "$GITHUB_REF_NAME" | sed -e 's/^v//g')
unzip Docs.zip
for f in doc/*; do
if [ -d "$f" ]; then
app=$(echo "$f" | sed s/"doc\/"//)
tarball="${app}-${version}.tar.gz"
surrogate_key="docs/${app}-${version}"
tar -czf "${tarball}" -C "doc/${app}" .
aws s3 cp "${tarball}" "s3://${AWS_S3_BUCKET}/docs/${tarball}" \
--cache-control "public,max-age=3600" \
--metadata "{\"surrogate-key\":\"${surrogate_key}\",\"surrogate-control\":\"public,max-age=604800\"}"
echo "${surrogate_key}" >> ../purge_keys.txt
fi
done
- name: Update builds txt
run: |
date="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
ref_name="$GITHUB_REF_NAME"
oldest_otp=$(find . -name 'elixir-otp-*.zip.sha256sum' | sed -r 's/^.*elixir-otp-([[:digit:]]+)\.zip\.sha256sum$/\1/' | sort -n | head -n 1)
aws s3 cp "s3://${AWS_S3_BUCKET}/builds/elixir/builds.txt" builds.txt || true
touch builds.txt
for sha256_file in $(find . -name 'elixir-otp-*.zip.sha256sum' | sed 's/^\.\///'); do
otp_version=$(echo "${sha256_file}" | sed -r 's/^elixir-otp-([[:digit:]]+)\.zip\.sha256sum/otp-\1/')
build_sha256=$(cut -d ' ' -f 1 "${sha256_file}")
sed -i "/^${ref_name}-${otp_version} /d" builds.txt
echo -e "${ref_name}-${otp_version} ${{ github.sha }} ${date} ${build_sha256} \n$(cat builds.txt)" > builds.txt
if [ "${otp_version}" == "otp-${oldest_otp}" ]; then
sed -i "/^${ref_name} /d" builds.txt
echo -e "${ref_name} ${{ github.sha }} ${date} ${build_sha256} \n$(cat builds.txt)" > builds.txt
fi
done
sort -u -k1,1 -o builds.txt builds.txt
aws s3 cp builds.txt "s3://${AWS_S3_BUCKET}/builds/elixir/builds.txt" \
--cache-control "public,max-age=3600" \
--metadata '{"surrogate-key":"builds builds/elixir builds/elixir/txt","surrogate-control":"public,max-age=604800"}'
echo 'builds/elixir/txt' >> purge_keys.txt
- name: Flush cache
if: github.repository == 'elixir-lang/elixir'
run: |
function purge_key() {
curl \
-X POST \
-H "Fastly-Key: ${FASTLY_KEY}" \
-H "Accept: application/json" \
-H "Content-Length: 0" \
"https://api.fastly.com/service/$1/purge/$2"
}
function purge() {
purge_key ${FASTLY_REPO_SERVICE_ID} $1
purge_key ${FASTLY_BUILDS_SERVICE_ID} $1
sleep 2
purge_key ${FASTLY_REPO_SERVICE_ID} $1
purge_key ${FASTLY_BUILDS_SERVICE_ID} $1
sleep 2
purge_key ${FASTLY_REPO_SERVICE_ID} $1
purge_key ${FASTLY_BUILDS_SERVICE_ID} $1
}
for key in $(cat purge_keys.txt); do
purge "${key}"
done
env:
FASTLY_REPO_SERVICE_ID: ${{ secrets.HEX_FASTLY_REPO_SERVICE_ID }}
FASTLY_BUILDS_SERVICE_ID: ${{ secrets.HEX_FASTLY_BUILDS_SERVICE_ID }}
FASTLY_KEY: ${{ secrets.HEX_FASTLY_KEY }}
================================================
FILE: .github/workflows/release_notifications.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
name: Release Notifications
on:
release:
types:
- published
permissions:
contents: read
jobs:
notify:
runs-on: ubuntu-latest
name: Notify
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
with:
otp-version: "27.3"
elixir-version: "1.18.3"
- name: Run Elixir script
env:
ELIXIR_FORUM_TOKEN: ${{ secrets.ELIXIR_FORUM_TOKEN }}
ELIXIR_LANG_ANN_TOKEN: ${{ secrets.ELIXIR_LANG_ANN_TOKEN }}
run: |
elixir .github/workflows/notify.exs "$GITHUB_REF_NAME"
================================================
FILE: .github/workflows/release_pre_built/action.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
name: Release Pre-build
description: "Builds Elixir release, ExDoc and generates docs"
inputs:
otp:
description: "The major OTP version"
otp_version:
description: "The exact OTP version (major.minor[.patch])"
build_docs:
description: "Whether docs have to be built"
runs:
using: "composite"
steps:
- uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1.18.2
with:
otp-version: ${{ inputs.otp_version }}
version-type: strict
- name: Build Elixir Release
shell: bash
run: | # zizmor: ignore[github-env]
make Precompiled.zip
mv Precompiled.zip "elixir-otp-${INPUT_OTP}.zip"
echo "$PWD/bin" >> $GITHUB_PATH
env:
INPUT_OTP: ${{ inputs.otp }}
- name: Install NSIS
shell: bash
run: |
sudo apt update
sudo apt install -y nsis
- name: Build Elixir Windows Installer
shell: bash
run: |
export OTP_VERSION="$INPUT_OTP_VERSION"
export ELIXIR_ZIP="$PWD/elixir-otp-${INPUT_OTP}.zip"
(cd lib/elixir/scripts/windows_installer && ./build.sh)
mv "lib/elixir/scripts/windows_installer/tmp/elixir-otp-${INPUT_OTP}.exe" .
env:
INPUT_OTP: ${{ inputs.otp }}
INPUT_OTP_VERSION: ${{ inputs.otp_version }}
- name: Get ExDoc ref
if: ${{ inputs.build_docs }}
shell: bash
run: | # zizmor: ignore[github-env]
if [ "$GITHUB_REF_NAME" = "main" ]; then
ref=main
else
ref=v$(curl -s https://hex.pm/api/packages/ex_doc | jq --raw-output '.latest_stable_version')
fi
echo "EX_DOC_REF=$ref" >> $GITHUB_ENV
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if: ${{ inputs.build_docs }}
with:
repository: elixir-lang/ex_doc
ref: ${{ env.EX_DOC_REF }}
path: ex_doc
persist-credentials: false
- name: Build ex_doc
if: ${{ inputs.build_docs }}
shell: bash
run: |
mv ex_doc ../ex_doc
cd ../ex_doc
../elixir/bin/mix do local.rebar --force + local.hex --force + deps.get + compile
cd ../elixir
- name: Build Docs
if: ${{ inputs.build_docs }}
shell: bash
run: |
git fetch --tags
make Docs.zip
================================================
FILE: .gitignore
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
/doc/
/lib/*/ebin/
/lib/*/_build/
/lib/*/tmp/
/lib/elixir/src/*_parser.erl
/lib/elixir/test/ebin/
/man/elixir.1
/man/iex.1
/Docs.zip
/Precompiled.zip
/.eunit
.elixir.plt
erl_crash.dump
/cover/
.tool-versions
================================================
FILE: .markdownlint-cli2.jsonc
================================================
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2021 The Elixir Team
{
"globs": [
"**/*.md"
],
"ignores": [
".git/**"
],
"gitignore": true,
"config": {
// Consecutive header levels (h1 -> h2 -> h3).
"MD001": false,
// Header style. We use #s.
"MD003": {
"style": "atx"
},
// Style of unordered lists..
"MD007": {
"indent": 2,
"start_indented": true
},
// Line length. Who cares.
"MD013": false,
// This warns if you have "console" or "shell" code blocks with a dollar sign $ that
// don't show output. We use those a lot, so this is fine for us.
"MD014": false,
// Multiple headings with the same content.
"MD024": {
// Duplication is allowed for headings with different parents.
"siblings_only": true
},
// Trailing punctuation in heading.
// Some headers finish with ! because it refers to a function name. Therefore we remove ! from
// the default values.
"MD026": {
"punctuation": ".,;:。,;:!"
},
// Allow empty line between block quotes. Used by contiguous admonition blocks.
"MD028": false,
// Allowed HTML inline elements.
"MD033": {
"allowed_elements": [
"h1",
"a",
"br",
"img",
"picture",
"source",
"noscript",
"p",
"script"
]
},
// This warns if you have spaces in code blocks. Sometimes, that's fine.
"MD038": false,
// Code block style. We don't care if it's fenced or indented.
"MD046": false,
// Our tables are too large to align.
"MD060": false
}
}
================================================
FILE: .ort/config/config.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
ort:
enableRepositoryPackageCurations: true
enableRepositoryPackageConfigurations: true
scanner:
skipConcluded: false
includeFilesWithoutFindings: true
analyzer:
allowDynamicVersions: true
enabledPackageManagers: [SpdxDocumentFile]
reporter:
reporters:
SpdxDocument:
options:
creationInfoOrganization: The Elixir Team
documentName: "Elixir Source SPDX Document"
================================================
FILE: .ort/config/evaluator.rules.kts
================================================
/*
* Copyright (C) 2019 The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>)
* Copyright (c) 2021 The Elixir Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
// Docs: https://oss-review-toolkit.org/ort/docs/configuration/evaluator-rules
val whitelistedLicenses = listOf(
// License for Elixir & Imported Erlang Projects
"Apache-2.0",
// License for the Elixir Logo
"LicenseRef-elixir-trademark-policy",
"LicenseRef-scancode-elixir-trademark-policy",
// License for included Unicode Files
"LicenseRef-scancode-unicode",
// DCO for committers
"LicenseRef-scancode-dco-1.1"
).map { SpdxSingleLicenseExpression.parse(it) }.toSet()
fun PackageRule.howToFixDefault() = """
* Check if this license violation is intended
* Adjust evaluation rules in `.ort/config/evaluator.rules.kts`
""".trimIndent()
fun PackageRule.LicenseRule.isHandled() =
object : RuleMatcher {
override val description = "isHandled($license)"
override fun matches() = license in whitelistedLicenses
}
fun RuleSet.unhandledLicenseRule() = packageRule("UNHANDLED_LICENSE") {
// Do not trigger this rule on packages that have been excluded in the .ort.yml.
require {
-isExcluded()
}
// Define a rule that is executed for each license of the package.
licenseRule("UNHANDLED_LICENSE", LicenseView.CONCLUDED_OR_DECLARED_AND_DETECTED) {
require {
-isExcluded()
-isHandled()
}
// Throw an error message including guidance how to fix the issue.
error(
"The license $license is currently not covered by policy rules. " +
"The license was ${licenseSource.name.lowercase()} in package " +
"${pkg.metadata.id.toCoordinates()}.",
howToFixDefault()
)
}
}
fun RuleSet.unmappedDeclaredLicenseRule() = packageRule("UNMAPPED_DECLARED_LICENSE") {
require {
-isExcluded()
}
resolvedLicenseInfo.licenseInfo.declaredLicenseInfo.processed.unmapped.forEach { unmappedLicense ->
warning(
"The declared license '$unmappedLicense' could not be mapped to a valid license or parsed as an SPDX " +
"expression. The license was found in package ${pkg.metadata.id.toCoordinates()}.",
howToFixDefault()
)
}
}
val ruleSet = ruleSet(ortResult, licenseInfoResolver, resolutionProvider) {
unhandledLicenseRule()
unmappedDeclaredLicenseRule()
}
ruleViolations += ruleSet.violations
================================================
FILE: .ort/package-configurations/eex.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
id: "SpdxDocumentFile:The Elixir Team:eex:"
path_excludes:
- pattern: "lib/eex/test/**/*"
reason: "TEST_OF"
comment: "Tests"
license_finding_curations:
# Test Fixtures
- path: "lib/eex/test/fixtures/**/*"
reason: "NOT_DETECTED"
comment: "Apply default license to test fixtures"
detected_license: "NONE"
concluded_license: "Apache-2.0"
================================================
FILE: .ort/package-configurations/elixir.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
id: "SpdxDocumentFile:The Elixir Team:elixir:"
path_excludes:
- pattern: "lib/elixir/pages/**/*"
reason: "DOCUMENTATION_OF"
comment: "Documentation"
- pattern: "lib/elixir/scripts/**/*"
reason: "BUILD_TOOL_OF"
comment: "Build Tool"
- pattern: "lib/elixir/test/**/*"
reason: "TEST_OF"
comment: "Tests"
license_finding_curations:
# Logos
- path: "lib/elixir/pages/images/logo.png"
reason: "NOT_DETECTED"
comment: "Apply Trademark Policy to Elixir Logo"
detected_license: "NONE"
concluded_license: "LicenseRef-elixir-trademark-policy"
- path: "lib/elixir/scripts/windows_installer/assets/Elixir.ico"
reason: "NOT_DETECTED"
comment: "Apply Trademark Policy to Elixir Logo"
detected_license: "NONE"
concluded_license: "LicenseRef-elixir-trademark-policy"
# Documentation Images
- path: "lib/elixir/pages/images/**/*.png"
reason: "NOT_DETECTED"
comment: "Apply default license to all images"
detected_license: "NONE"
concluded_license: "Apache-2.0"
# Test Fixtures
- path: "lib/elixir/test/elixir/fixtures/**/*"
reason: "NOT_DETECTED"
comment: "Apply default license to test fixtures"
detected_license: "NONE"
concluded_license: "Apache-2.0"
# Unicode
- path: "lib/elixir/unicode/*.txt"
reason: "NOT_DETECTED"
comment: "Apply default license to unicode files"
detected_license: "NONE"
concluded_license: "LicenseRef-scancode-unicode"
# Wrongly Identified
- path: "lib/elixir/pages/references/library-guidelines.md"
reason: "INCORRECT"
comment: |
The guide mentions multiple licenses for users to choose from.
It however is not licensed itself by the mentioned licenses.
concluded_license: "Apache-2.0"
- path: "lib/elixir/scripts/windows_installer/.gitignore"
reason: "INCORRECT"
comment: "Ignored by ScanCode"
detected_license: "NONE"
concluded_license: "Apache-2.0"
================================================
FILE: .ort/package-configurations/ex_unit.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
id: "SpdxDocumentFile:The Elixir Team:exunit:"
path_excludes:
- pattern: "lib/ex_unit/examples/**/*"
reason: "EXAMPLE_OF"
comment: "Example"
- pattern: "lib/ex_unit/test/**/*"
reason: "TEST_OF"
comment: "Tests"
license_finding_curations:
# Test Fixtures
- path: "lib/ex_unit/test/fixtures/**/*"
reason: "NOT_DETECTED"
comment: "Apply default license to test fixtures"
detected_license: "NONE"
concluded_license: "Apache-2.0"
================================================
FILE: .ort/package-configurations/logger.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
id: "SpdxDocumentFile:The Elixir Team:logger:"
path_excludes:
- pattern: "lib/logger/test/**/*"
reason: "TEST_OF"
comment: "Tests"
================================================
FILE: .ort/package-configurations/mix.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
id: "SpdxDocumentFile:The Elixir Team:mix:"
path_excludes:
- pattern: "lib/mix/test/**/*"
reason: "TEST_OF"
comment: "Tests"
license_finding_curations:
# Test Fixtures
- path: "lib/mix/test/fixtures/**/*"
reason: "NOT_DETECTED"
comment: "Apply default license to test fixtures"
detected_license: "NONE"
concluded_license: "Apache-2.0"
================================================
FILE: .ort.yml
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
excludes:
paths:
- pattern: "man/*"
reason: "DOCUMENTATION_OF"
comment: "Documentation"
- pattern: ".github/**/*"
reason: "BUILD_TOOL_OF"
comment: "Documentation"
- pattern: ".ort/**/*"
reason: "BUILD_TOOL_OF"
comment: "Documentation"
# Unfortunately we'll have to repeat all package level excludes here
# Make sure to keep them in sync with the package configuration in
# .ort/package-configurations
- pattern: "lib/*/pages/**/*"
reason: "DOCUMENTATION_OF"
comment: "Documentation"
- pattern: "lib/*/test/**/*"
reason: "TEST_OF"
comment: "Tests"
- pattern: "lib/*/scripts/**/*"
reason: "BUILD_TOOL_OF"
comment: "Build Tool"
- pattern: "lib/*/examples/**/*"
reason: "EXAMPLE_OF"
comment: "Example"
curations:
license_findings:
# Version File
- path: "VERSION"
reason: "NOT_DETECTED"
comment: "Apply Trademark Policy to VERSION file"
detected_license: "NONE"
concluded_license: "Apache-2.0"
# Wrongly Identified
- path: ".gitignore"
reason: "INCORRECT"
comment: "Ignored by ScanCode"
detected_license: "NONE"
concluded_license: "Apache-2.0"
- path: ".gitattributes"
reason: "INCORRECT"
comment: "Ignored by ScanCode"
detected_license: "NONE"
concluded_license: "Apache-2.0"
- path: "CONTRIBUTING.md"
reason: "INCORRECT"
comment: "Wrongly identified TSL license"
detected_license: "Apache-2.0 OR NOASSERTION OR LicenseRef-scancode-tsl-2020"
concluded_license: "Apache-2.0"
- path: "OPEN_SOURCE_POLICY.md"
reason: "INCORRECT"
comment: "Wrongly identified NOASSERTION"
detected_license: "NOASSERTION"
concluded_license: "Apache-2.0"
# Unfortunately we'll have to repeat all package level license curations here
# Make sure to keep them in sync with the package configuration in
# .ort/package-configurations
# Test Fixtures
- path: "lib/*/test/fixtures/**/*"
reason: "NOT_DETECTED"
comment: "Apply default license to test fixtures"
detected_license: "NONE"
concluded_license: "Apache-2.0"
# Logos
- path: "lib/elixir/pages/images/logo.png"
reason: "NOT_DETECTED"
comment: "Apply Trademark Policy to Elixir Logo"
detected_license: "NONE"
concluded_license: "LicenseRef-elixir-trademark-policy"
- path: "lib/elixir/scripts/windows_installer/assets/Elixir.ico"
reason: "NOT_DETECTED"
comment: "Apply Trademark Policy to Elixir Logo"
detected_license: "NONE"
concluded_license: "LicenseRef-elixir-trademark-policy"
# Documentation Images
- path: "lib/elixir/pages/images/**/*.png"
reason: "NOT_DETECTED"
comment: "Apply default license to all images"
detected_license: "NONE"
concluded_license: "Apache-2.0"
# Test Fixtures
- path: "lib/elixir/test/elixir/fixtures/**/*"
reason: "NOT_DETECTED"
comment: "Apply default license to test fixtures"
detected_license: "NONE"
concluded_license: "Apache-2.0"
# Unicode
- path: "lib/elixir/unicode/*.txt"
reason: "NOT_DETECTED"
comment: "Apply default license to unicode files"
detected_license: "NONE"
concluded_license: "LicenseRef-scancode-unicode"
# Wrongly Identified
- path: "lib/elixir/pages/references/library-guidelines.md"
reason: "INCORRECT"
comment: |
The guide mentions multiple licenses for users to choose from.
It however is not licensed itself by the mentioned licenses.
concluded_license: "Apache-2.0"
- path: "lib/elixir/scripts/windows_installer/.gitignore"
reason: "INCORRECT"
comment: "Ignored by ScanCode"
detected_license: "NONE"
concluded_license: "Apache-2.0"
================================================
FILE: CHANGELOG.md
================================================
<!--
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2021 The Elixir Team
SPDX-FileCopyrightText: 2012 Plataformatec
-->
# Changelog for Elixir v1.20
## Type system improvements
This release includes type inference of all constructs.
### Type inference of function definitions
Elixir now performs inference of whole functions. The best way to show the new capabilities are with examples. Take the following code:
```elixir
def add_foo_and_bar(data) do
data.foo + data.bar
end
```
Elixir now infers that the function expects a `map` as first argument, and the map must have the keys `.foo` and `.bar` whose values are either `integer()` or `float()`. The return type will be either `integer()` or `float()`.
Here is another example:
```elixir
def sum_to_string(a, b) do
Integer.to_string(a + b)
end
```
Even though the `+` operator works with both integers and floats, Elixir infers that `a` and `b` must be both integers, as the result of `+` is given to a function that expects an integer. The inferred type information is then used during type checking to find possible typing errors.
### Type inference of guards
This release also performs inference of guards! Let's see some examples:
```elixir
def example(x, y) when is_list(x) and is_integer(y)
```
The code above correctly infers `x` is a list and `y` is an integer.
```elixir
def example({:ok, x} = y) when is_binary(x) or is_integer(x)
```
The one above infers x is a binary or an integer, and `y` is a two element tuple with `:ok` as first element and a binary or integer as second.
```elixir
def example(x) when is_map_key(x, :foo)
```
The code above infers `x` is a map which has the `:foo` key, represented as `%{..., foo: dynamic()}`. Remember the leading `...` indicates the map may have other keys.
```elixir
def example(x) when not is_map_key(x, :foo)
```
And the code above infers `x` does not have the `:foo` key (hence `x.foo` will raise a typing violation), which has the type: `%{..., foo: not_set()}`.
You can also have expressions that assert on the size of data structures:
```elixir
def example(x) when tuple_size(x) < 3
```
Elixir will correctly track the tuple has at most two elements, and therefore accessing `elem(x, 3)` will emit a typing violation. In other words, Elixir can look at complex guards, infer types, and use this information to find bugs in our code, without a need to introduce type signatures (yet).
### Typing across clauses
Elixir now infers the type of a given clause based on previous clauses. Let's see an example:
```elixir
case System.get_env("SOME_VAR") do
nil -> :not_found
value -> {:ok, String.upcase(value)}
end
```
`System.get_env("SOME_VAR")` returns either `nil` or a `binary()`. Because the first clause matches on `nil`, the type system now knows `value` can no longer be `nil`, and therefore it must only be a `binary()`, which allows the second clause to also type check without violations.
This type inference across clauses also helps the type system find redundant clauses and dead code in existing codebases.
### Complete typing of maps keys
Maps were one of the first data-structures we implemented within the Elixir type system however, up to this point, they only supported atom keys. If they had additional keys, those keys were simply marked as `dynamic()`.
As of Elixir v1.20, we can track all possible domains as map keys. For example, the map:
```elixir
%{123 => "hello", 456.0 => :ok}
```
will have the type:
```elixir
%{integer() => binary(), float() => :ok}
```
It is also possible to mix domain keys, as above, with atom keys, yielding the following:
```elixir
%{integer() => integer(), root: integer()}
```
This system is an implementation of [Typing Records, Maps, and Structs, by Giuseppe Castagna (2023)](https://www.irif.fr/~gc/papers/icfp23.pdf).
### Typing of map operations
We have typed the majority of the functions in the `Map` module, allowing the type system to track how keys are added, updated, and removed across all possible key types.
For example, imagine we are calling the following `Map` functions with a variable `map`, which we don't know the exact shape of, and an atom key:
```elixir
Map.put(map, :key, 123)
#=> returns type %{..., key: integer()}
Map.delete(map, :key)
#=> returns type %{..., key: not_set()}
```
As you can see, we track when keys are set and also when they are removed.
Some operations, like `Map.replace/3`, only replace the key if it exists, and that is also propagated by the type system:
```elixir
Map.replace(map, :key, 123)
#=> returns type %{..., key: if_set(integer())}
```
In other words, if the key exists, it would have been replaced by an integer value. Furthermore, whenever calling a function in the `Map` module and the given key is statically proven to never exist in the map, an error is emitted.
By combining full type inference with bang operations like `Map.fetch!/2`, `Map.pop!/2`, `Map.replace!/3`, and `Map.update!/3`, Elixir is able to propagate information about the desired keys. Take this module:
```elixir
defmodule User do
def name(map), do: Map.fetch!(map, :name)
end
defmodule CallsUser do
def calls_name do
User.name(%{})
end
end
```
The code above has a type violation, which is now caught by the type system:
```text
warning: incompatible types given to User.name/1:
User.name(%{})
given types:
%{name: not_set()}
but expected one of:
dynamic(%{..., name: term()})
type warning found at:
│
16 │ User.name(%{})
│ ~
│
└─ lib/calls_user.ex:7:5: CallsUser.calls_name/0
```
### Acknowledgements
The type system was made possible thanks to a partnership between [CNRS](https://www.cnrs.fr/) and [Remote](https://remote.com/). The development work is currently sponsored by [Fresha](https://www.fresha.com/) and [Tidewave](https://tidewave.ai/).
## v1.20.0-rc.3 (2026-03-09)
### 1. Enhancements
#### IEx
* [IEx] Optimize autocompleting modules
### 2. Bug fixes
#### Elixir
* [Enum] Fix `Enum.slice/2` for ranges with step > 1 sliced by step > 1
* [File] Preserve directory permissions in `File.cp_r/3`
* [File] Fix `File.cp_r/3` infinite loop with symlink cycles
* [File] Fix `File.cp_r/3` infinite loop when copying into subdirectory of source
* [File] Warn when defining `@type record()`, fixes CI on Erlang/OTP 29
* [File] Fix `File.Stream` `Enumerable.count` for files without trailing newline
* [Float] Fix `Float.parse/1` inconsistent error handling for non-scientific notation overflow
* [Kernel] Process fields even when structs are unknown (regression)
* [Kernel] Improve performance on several corner cases in the type system (regression)
* [Kernel] Fix regression when using `Kernel.in/2` in defguard (regression)
## v1.20.0-rc.2 (2026-03-04)
### 1. Enhancements
#### Elixir
* [Code] Add `module_definition: :interpreted` option to `Code` which allows module definitions to be evaluated instead of compiled. In some applications/architectures, this can lead to drastic improvements to compilation times. Note this does not affect the generated `.beam` file, which will have the same performance/behaviour as before
* [Code] Make module purging opt-in and move temporary module deletion to the background to speed up compilation times
* [Integer] Add `Integer.popcount/1`
* [Kernel] Move struct validation in patterns and updates to type checker, this means adding and remove struct fields will cause fewer files to be recompiled
* [Kernel] Add type inference across clauses. For example, if one clause says `x when is_integer(x)`, then the next clause may no longer be an integer
* [Kernel] Detect and warn on redundant clauses
* [List] Add `List.first!/1` and `List.last!/1`
* Add Software Bill of Materials guide to the Documentation
#### Mix
* [mix compile] Add `module_definition: :interpreted` option to `Code` which allows module definitions to be evaluated instead of compiled. In some applications/architectures, this can lead to drastic improvements to compilation times. Note this does not affect the generated `.beam` file, which will have the same performance/behaviour as before
* [mix deps] Parallelize dep lock status checks during `deps.loadpaths`, improving boot times in projects with many git dependencies
### 2. Potential breaking changes
#### Elixir
* `map.foo()` (accessing a map field with parens) and `mod.foo` (invoking a function without parens) will now raise instead of emitting runtime warnings, aligning themselves with the type system behaviour
### 3. Bug fixes
#### IEx
* [IEx] Ensure warnings emitted during IEx parsing are properly displayed/printed
* [IEx] Ensure pry works across remote nodes
#### Mix
* [mix compile.erlang] Topsort Erlang modules before compilation for proper dependency resolution
## v1.20.0-rc.1 (2026-01-13)
### 1. Bug fixes
#### Elixir
* [Kernel] Do not crash on map types with struct keys when performing type operations (regression)
* [Kernel] Mark the outcome of bitstring types as dynamic (regression)
* [Kernel] `<<expr::bitstring>>` will have type `binary` instead of `bitstring` if `expr` is a binary (regression)
* [Kernel] Do not crash on conditional variables when calling a function on a module which is represented by a variable (regression)
## v1.20.0-rc.0 (2026-01-09)
### 1. Enhancements
#### Elixir
* [Calendar] Optimize `date_from_iso_days` by using the Neri-Schneider algorithm
* [Enum] Add `Enum.min_max` sorter
* [Integer] Add `Integer.ceil_div/2`
* [IO] Add `IO.iodata_empty?/1`
* [File] Skip device, named pipes, etc in `File.cp_r/3` instead of erroring with reason `:eio`
* [Kernel] Print intermediate results of `dbg` for pipes
* [Kernel] Warn on unused requires
* [Regex] Add `Regex.import/1` to import regexes defined with `/E`
#### ExUnit
* [ExUnit.CaptureLog] Add `:formatter` option for custom log formatting
#### Mix
* [mix deps] Support filtering `mix deps` output
* [mix compile] Enforce `:elixirc_paths` to be a list of strings to avoid paths from being discarded (the only documented type was lists of strings)
* [mix test] Add `mix test --dry-run`
### 2. Potential breaking changes
#### Elixir
* `require SomeModule` no longer expands to the given module at compile-time, but it still returns the module at runtime. Note that while Elixir does not guarantee macros will expand to certain constructs, but since this can break code relying on the previous behaviour, such as `require(SomeMod).some_macro()`, we are adding this note to the CHANGELOG
### 3. Hard deprecations
#### Elixir
* [File] `File.stream!(path, modes, lines_or_bytes)` is deprecated in favor of `File.stream!(path, lines_or_bytes, modes)`
* [Kernel] Matching on the size inside a bit pattern now requires the pin operator for consistency, such as `<<x::size(^existing_var)>>`
* [Kernel.ParallelCompiler] `Kernel.ParallelCompiler.async/1` is deprecated in favor of `Kernel.ParallelCompiler.pmap/2`, which is more performant and addresses known limitations
#### Logger
* [Logger] `Logger.*_backend` functions are deprecated in favor of handlers. If you really want to keep on using backends, see the `:logger_backends` package
* [Logger] `Logger.enable/1` and `Logger.disable/1` have been deprecated in favor of `Logger.put_process_level/2` and `Logger.delete_process_level/1`
## v1.19
The CHANGELOG for v1.19 releases can be found [in the v1.19 branch](https://github.com/elixir-lang/elixir/blob/v1.19/CHANGELOG.md).
================================================
FILE: CODE_OF_CONDUCT.md
================================================
<!--
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2021 The Elixir Team
SPDX-FileCopyrightText: 2012 Plataformatec
-->
# Code of Conduct
Contact: <elixir-lang-conduct@googlegroups.com>
## Why have a Code of Conduct?
As contributors and maintainers of this project, we are committed to providing a friendly, safe and welcoming environment for all, regardless of age, disability, gender, nationality, race, religion, sexuality, or similar personal characteristic.
The goal of the Code of Conduct is to specify a baseline standard of behavior so that people with different social values and communication styles can talk about Elixir effectively, productively, and respectfully, even in face of disagreements. The Code of Conduct also provides a mechanism for resolving conflicts in the community when they arise.
## Our Values
These are the values Elixir developers should aspire to:
* Be friendly and welcoming
* Be kind
* Remember that people have varying communication styles and that not everyone is using their native language. (Meaning and tone can be lost in translation.)
* Interpret the arguments of others in good faith, do not seek to disagree.
* When we do disagree, try to understand why.
* Be thoughtful
* Productive communication requires effort. Think about how your words will be interpreted.
* Remember that sometimes it is best to refrain entirely from commenting.
* Be respectful
* In particular, respect differences of opinion. It is important that we resolve disagreements and differing views constructively.
* Be constructive
* Avoid derailing: stay on topic; if you want to talk about something else, start a new conversation.
* Avoid unconstructive criticism: don't merely decry the current state of affairs; offer — or at least solicit — suggestions as to how things may be improved.
* Avoid harsh words and stern tone: we are all aligned towards the well-being of the community and the progress of the ecosystem. Harsh words exclude, demotivate, and lead to unnecessary conflict.
* Avoid snarking (pithy, unproductive, sniping comments).
* Avoid microaggressions (brief and commonplace verbal, behavioral and environmental indignities that communicate hostile, derogatory or negative slights and insults towards a project, person or group).
* Be responsible
* What you say and do matters. Take responsibility for your words and actions, including their consequences, whether intended or otherwise.
The following actions are explicitly forbidden:
* Insulting, demeaning, hateful, or threatening remarks.
* Discrimination based on age, disability, gender, nationality, race, religion, sexuality, or similar personal characteristic.
* Bullying or systematic harassment.
* Unwelcome sexual advances.
* Incitement to any of these.
## Where does the Code of Conduct apply?
If you participate in or contribute to the Elixir ecosystem in any way, you are encouraged to follow the Code of Conduct while doing so.
Explicit enforcement of the Code of Conduct applies to the official mediums operated by the Elixir project:
* The [official GitHub projects][1] and code reviews.
* The official elixir-lang mailing lists.
* The **[#elixir][2]** IRC channel on [Libera.Chat][3].
Other Elixir activities (such as conferences, meetups, and unofficial forums) are encouraged to adopt this Code of Conduct. Such groups must provide their own contact information.
Project maintainers may block, remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by emailing: <elixir-lang-conduct@googlegroups.com>. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. **All reports will be kept confidential**.
**The goal of the Code of Conduct is to resolve conflicts in the most harmonious way possible**. We hope that in most cases issues may be resolved through polite discussion and mutual agreement. Bannings and other forceful measures are to be employed only as a last resort. **Do not** post about the issue publicly or try to rally sentiment against a particular individual or group.
## Acknowledgements
This document was based on the Code of Conduct from the Go project (dated Sep/2021) and the Contributor Covenant (v1.4).
[1]: https://github.com/elixir-lang/
[2]: https://web.libera.chat/#elixir
[3]: https://libera.chat/
================================================
FILE: CONTRIBUTING.md
================================================
<!--
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2021 The Elixir Team
SPDX-FileCopyrightText: 2012 Plataformatec
-->
# Contributing to Elixir
We invite contributions to Elixir. To contribute, there are a few
things you need to know about the code. First, Elixir code is divided
by each application inside the `lib` folder:
* `elixir` - Elixir's kernel and standard library
* `eex` - EEx is the template engine that allows you to embed Elixir
* `ex_unit` - ExUnit is a simple test framework that ships with Elixir
* `iex` - IEx stands for Interactive Elixir: Elixir's interactive shell
* `logger` - Logger is the built-in logger
* `mix` - Mix is Elixir's build tool
You can run all tests in the root directory with `make test`. You can
also run tests for a specific framework with `make test_#{APPLICATION}`, for example,
`make test_ex_unit`. If you just changed something in Elixir's standard
library, you can run only that portion through `make test_stdlib`.
If you are only changing one file, you can choose to compile and run tests
for that specific file for faster development cycles. For example, if you
are changing the String module, you can compile it and run its tests as:
```sh
bin/elixirc lib/elixir/lib/string.ex -o lib/elixir/ebin
bin/elixir lib/elixir/test/elixir/string_test.exs
```
Some test files need their `test_helper.exs` to be explicitly required
before, such as:
```sh
bin/elixir -r lib/logger/test/test_helper.exs lib/logger/test/logger_test.exs
```
You can also use the `LINE` env var to run a single test:
```sh
LINE=123 bin/elixir lib/elixir/test/elixir/string_test.exs
````
To recompile all (including Erlang modules):
```sh
make compile
```
After your changes are done, please remember to run `make format` to guarantee
all files are properly formatted, then run the full suite with
`make test`.
If your contribution fails during the bootstrapping of the language,
you can rebuild the language from scratch with:
```sh
make clean_elixir compile
```
Similarly, if you can not get Elixir to compile or the tests to pass after
updating an existing checkout, run `make clean compile`. You can check
[the official build status](https://github.com/elixir-lang/elixir/actions/workflows/ci.yml).
More tasks can be found by reading the [Makefile](Makefile).
We encourage contributors to write tests that capture both existing and newly
introduced behavior, especially for bug fixes and major changes:
* **Bug Fixes:** If you are fixing a bug, please try to include a test that
*fails* before your change and *passes* afterward. This makes it easier to
confirm that the fix addresses the underlying issue and helps prevent
regressions in the future.
* **New Features or Major Changes:** If you are adding a new feature or making
major changes to existing functionality, please add tests that cover the
major parts of that functionality. Aim to have the best code coverage possible.
With tests running and passing, you are ready to contribute to Elixir and
[send a pull request](https://help.github.com/articles/using-pull-requests/).
We have saved some excellent pull requests we have received in the past in
case you are looking for some examples:
* [Implement Enum.member? - Pull request](https://github.com/elixir-lang/elixir/pull/992)
* [Add String.valid? - Pull request](https://github.com/elixir-lang/elixir/pull/1058)
* [Implement capture_io for ExUnit - Pull request](https://github.com/elixir-lang/elixir/pull/1059)
## Reviewing changes
Once a pull request is sent, the Elixir team will review your changes.
We outline our process below to clarify the roles of everyone involved.
All pull requests must be approved by two committers before being merged into
the repository. If changes are necessary, the team will leave appropriate
comments requesting changes to the code. Unfortunately, we cannot guarantee a
pull request will be merged, even when modifications are requested, as the Elixir
team will re-evaluate the contribution as it changes.
Committers may also push style changes directly to your branch. If you would
rather manage all changes yourself, you can disable the "Allow edits from maintainers"
feature when submitting your pull request.
The Elixir team may optionally assign someone to review a pull request.
If someone is assigned, they must explicitly approve the code before
another team member can merge it.
When the review finishes, your pull request will be squashed and merged
into the repository. If you have carefully organized your commits and
believe they should be merged without squashing, please mention it in
a comment.
## Licensing and Compliance Requirements
Please review our [Open Source Policy](OPEN_SOURCE_POLICY.md) for complete
guidelines on licensing and compliance. Below is a summary of the key points
affecting **all external contributors**:
* Accepted Licenses: Any code contributed must be licensed under the
`Apache-2.0` license.
* SPDX License Headers: With the exception of approved test fixture files,
all new or modified files in a pull request must include correct SPDX
headers. If you are creating a new file under the `Apache-2.0` license, for
instance, please use:
```elixir
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
```
* No Executable Binaries: Contributions must **not** include any executable
binary files. If you require an exception (for example, certain test artifacts),
please see the policy on how to request approval and document exceptions.
* Preserving Copyright and License Info: If you copy code from elsewhere,
ensure that **all original copyright and license notices remain intact**. If
they are missing or incomplete, you must add them.
* Failure to Comply: Pull requests that do not meet these licensing and
compliance standards will be rejected or require modifications before merging.
* Developer Certificate of Origin: All contributions are subject to the
Developer Certificate of Origin.
```text
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the
best of my knowledge, is covered under an appropriate open
source license and I have the right under that license to
submit that work with modifications, whether created in whole
or in part by me, under the same open source license (unless
I am permitted to submit under a different license), as
Indicated in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including
all personal information I submit with it, including my
sign-off) is maintained indefinitely and may be redistributed
consistent with this project or the open source license(s)
involved.
```
See <https://developercertificate.org/> for a copy of the Developer Certificate
of Origin license.
## Building documentation
Building the documentation requires that [ExDoc](https://github.com/elixir-lang/ex_doc)
is installed and built alongside Elixir.
After cloning and compiling Elixir, run:
```sh
elixir_dir=$(pwd)
cd .. && git clone https://github.com/elixir-lang/ex_doc.git
cd ex_doc && "${elixir_dir}/bin/elixir" "${elixir_dir}/bin/mix" do deps.get + compile
# Now we will go back to Elixir's root directory,
cd "${elixir_dir}"
# and generate HTML and EPUB documents:
make docs
```
This will produce documentation sets for `elixir`, `eex`, `ex_unit`, `iex`, `logger`,
and `mix` under the `doc` directory. If you are planning to contribute documentation,
[please check our best practices for writing documentation](https://hexdocs.pm/elixir/writing-documentation.html).
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
================================================
FILE: LICENSES/Apache-2.0.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: LICENSES/LicenseRef-elixir-trademark-policy.txt
================================================
ELIXIR TEAM TRADEMARKS POLICY
This document outlines the policy for allowed usage of the “Elixir” word and the
Elixir logo by other parties.
“Elixir” and the Elixir logo are registered trademarks of the Elixir Team. The
Elixir Team believes in a decentralized approach to growing the community and
the ecosystem, independent of the Elixir project and the Elixir Team.
Anyone can use the Elixir trademarks if that use of the trademark is nominative.
The trademarks must not be used to disparage the project and its community, nor
be used in any way to imply ownership, endorsement, or association with the
Elixir project and the Elixir Team.
You must not visually combine the Elixir logo with any other images, or change
the logo in any way other than ways required by printing restrictions. If you
want to create your own visual identity in relation to Elixir, you might use the
shape of an unrelated “water drop” as part of your design, as seen in many
community projects and initiatives. You must not combine or modify the Elixir
logo.
The Elixir logo is available in our repository in both vertical and horizontal
versions.
Nominative use
The “nominative use” (or “nominative fair use”) is a legal doctrine that
authorizes everyone (even commercial companies) to use or refer to the trademark
of another if:
The product or service in question must be one not readily identifiable without
use of the trademark.
Only so much of the mark or marks may be used as is reasonably necessary to
identify the product or service.
The organization using the mark must do nothing that would, in conjunction with
the mark, suggest sponsorship or endorsement by the trademark holder.
Our trademarks must be used to refer to the Elixir programming language.
Examples of permitted use
All examples listed next must strictly adhere to the terms outlined in the
previous sections:
Usage of the Elixir logo to say a technology is “powered by Elixir” under
nominative use. Linking back to the Elixir website, if possible, is appreciated.
Usage of the Elixir logo to display it as a supported technology in a service or
platform. For instance, you may say “we support Elixir” and use the Elixir logo,
but you may not refer to yourself as “the Elixir platform” nor imply any form of
endorsement or association with Elixir.
Usage of the Elixir logo in non-commercial community meetups, in presentations,
and in courses when referring to the language and its ecosystem under nominative
use.
Usage of the Elixir logo in non-commercial swag (stickers, t-shirts, mugs, etc)
to promote the Elixir programming language. The Elixir marks must be the only
marks featured in the product. You need permission to make swag that include
Elixir and other third party marks in them.
Inclusion of the Elixir logo in non-commercial icon sets. Use of the Elixir
icons must still adhere to Elixir’s trademark policies.
Usage of the “Elixir” word in book titles, meetups, conferences, and podcasts.
You must not use the word to imply uniqueness or endorsement from the Elixir
team. “The Elixir book” and “The Elixir podcast” are not permitted.
“Elixir in Action”, “Thinking Elixir”, and “Kraków Elixir User Group” are valid
examples already in use today.
Usage of the “Elixir” word in the names of freely distributed software and
hardware products is allowed when referring to use with or suitability for the
Elixir programming language, such as wxElixir, Elixirsense, etc. If the product
includes the Elixir programming language itself, then you must also respect its
license.
Examples of not permitted use
Here is a non-exhaustive list of non permitted uses of the marks:
Usage of the Elixir logo in book covers, conferences, and podcasts.
Usage of the Elixir logo as the mark of third party projects, even in combination
with other marks.
Naming any company or product after Elixir, such as “The Elixir Hosting”,
“The Elixir Consultants”, etc.
Examples that require permission
Here are some examples that may be granted permission upon request:
Selling merchandise (stickers, t-shirts, mugs, etc).
You can request permission by emailing trademarks@elixir-lang.org.
Important note
Nothing in this page shall be interpreted to allow any third party to claim any
association with the Elixir project and the Elixir Team, or to imply any
approval or support by the Elixir project and the Elixir Team for any third
party products, services, or events.
================================================
FILE: LICENSES/LicenseRef-scancode-unicode.txt
================================================
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
Unicode Data Files include all data files under the directories
http://www.unicode.org/Public/, http://www.unicode.org/reports/, and
http://www.unicode.org/cldr/data/ . Unicode Software includes any source
code published in the Unicode Standard or under the directories
http://www.unicode.org/Public/, http://www.unicode.org/reports/, and
http://www.unicode.org/cldr/data/.
NOTICE TO USER: Carefully read the following legal agreement. BY
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA
FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY
ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS
AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE
OR USE THE DATA FILES OR SOFTWARE.
COPYRIGHT AND PERMISSION NOTICE
Copyright © Unicode, Inc. All rights reserved. Distributed under
the Terms of Use in http://www.unicode.org/copyright.html.
Permission is hereby granted, free of charge, to any person obtaining a
copy of the Unicode data files and any associated documentation (the
"Data Files") or Unicode software and any associated documentation (the
"Software") to deal in the Data Files or Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, and/or sell copies of the Data Files or Software,
and to permit persons to whom the Data Files or Software are furnished
to do so, provided that
(a) the above copyright notice(s) and this permission notice appear with
all copies of the Data Files or Software,
(b) both the above copyright notice(s) and this permission notice appear
in associated documentation, and
(c) there is clear notice in each modified Data File or in the Software
as well as in the documentation associated with the Data File(s) or
Software that the data or software has been modified.
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in these Data Files or Software without prior written
authorization of the copyright holder.
Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be
registered in some jurisdictions. All other trademarks and registered
trademarks mentioned herein are the property of their respective owners.
================================================
FILE: Makefile
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
PREFIX ?= /usr/local
TEST_FILES ?= "*_test.exs"
SHARE_PREFIX ?= $(PREFIX)/share
MAN_PREFIX ?= $(SHARE_PREFIX)/man
CANONICAL := main/
ELIXIRC := bin/elixirc --ignore-module-conflict $(ELIXIRC_OPTS)
ELIXIRC_MIN_SIG := $(ELIXIRC) -e 'Code.put_compiler_option :infer_signatures, []'
ERLC := erlc -I lib/elixir/include
ERL_MAKE := erl -make
ERL := erl -I lib/elixir/include -noshell -pa lib/elixir/ebin
GENERATE_APP := $(CURDIR)/lib/elixir/scripts/generate_app.escript
VERSION := $(strip $(shell cat VERSION))
Q := @
LIBDIR := lib
BINDIR := bin
INSTALL = install
INSTALL_DIR = $(INSTALL) -m755 -d
INSTALL_DATA = $(INSTALL) -m644
INSTALL_PROGRAM = $(INSTALL) -m755
GIT_REVISION = $(strip $(shell git rev-parse HEAD 2> /dev/null ))
GIT_TAG = $(strip $(shell head="$(call GIT_REVISION)"; git tag --points-at $$head 2> /dev/null | grep -v latest | tail -1))
SOURCE_DATE_EPOCH_PATH = lib/elixir/tmp/ebin_reproducible
SOURCE_DATE_EPOCH_FILE = $(SOURCE_DATE_EPOCH_PATH)/SOURCE_DATE_EPOCH
.PHONY: cover install install_man build_plt clean_plt dialyze test check_reproducible clean clean_elixir clean_man format docs Docs.zip Precompiled.zip zips
.NOTPARALLEL:
#==> Functions
define CHECK_ERLANG_RELEASE
erl -noshell -eval '{V,_} = string:to_integer(erlang:system_info(otp_release)), io:fwrite("~s", [is_integer(V) and (V >= 27)])' -s erlang halt | grep -q '^true'; \
if [ $$? != 0 ]; then \
echo "At least Erlang/OTP 27.0 is required to build Elixir"; \
exit 1; \
fi
endef
define APP_TEMPLATE
$(1): lib/$(1)/ebin/Elixir.$(2).beam lib/$(1)/ebin/$(1).app
lib/$(1)/ebin/$(1).app: lib/$(1)/mix.exs
$(Q) cd lib/$(1) && ../../bin/elixir -e 'Mix.start(:permanent, [])' -r mix.exs -e 'Mix.Task.run("compile.app", ~w[--compile-path ebin])'
lib/$(1)/ebin/Elixir.$(2).beam: $(wildcard lib/$(1)/lib/*.ex) $(wildcard lib/$(1)/lib/*/*.ex) $(wildcard lib/$(1)/lib/*/*/*.ex)
@ echo "==> $(1) (compile)"
@ rm -rf lib/$(1)/ebin
$(Q) cd lib/$(1) && ../../$$(ELIXIRC) "lib/**/*.ex" -o ebin
test_$(1): test_formatted $(1)
@ echo "==> $(1) (ex_unit)"
$(Q) cd lib/$(1) && ../../bin/elixir -r "test/test_helper.exs" -pr "test/**/$(TEST_FILES)";
cover/ex_unit_$(1).coverdata:
$(Q) COVER="1" $(MAKE) test_$(1)
cover/combined.coverdata: cover/ex_unit_$(1).coverdata
endef
define WRITE_SOURCE_DATE_EPOCH
$(shell mkdir -p $(SOURCE_DATE_EPOCH_PATH) && bin/elixir -e \
'IO.puts System.build_info()[:date] \
|> DateTime.from_iso8601() \
|> elem(1) \
|> DateTime.to_unix()' > $(SOURCE_DATE_EPOCH_FILE))
endef
define READ_SOURCE_DATE_EPOCH
$(strip $(shell cat $(SOURCE_DATE_EPOCH_FILE)))
endef
#==> Compilation tasks
APP := lib/elixir/ebin/elixir.app
EEX := lib/eex/ebin/Elixir.EEx.beam
ELIXIR := lib/elixir/ebin/elixir.beam
PARSER := lib/elixir/src/elixir_parser.erl
KERNEL := lib/elixir/ebin/Elixir.Kernel.beam
UNICODE := lib/elixir/ebin/Elixir.String.Unicode.beam
default: compile
compile: erlang elixir
erlang: $(ELIXIR)
$(ELIXIR): $(PARSER) lib/elixir/src/*
$(Q) if [ ! -f $(APP) ]; then $(call CHECK_ERLANG_RELEASE); fi
$(Q) cd lib/elixir && mkdir -p ebin && $(ERL_MAKE)
$(Q) $(GENERATE_APP) $(VERSION)
$(PARSER): lib/elixir/src/elixir_parser.yrl
$(Q) erlc -o $@ +'{verbose,true}' +'{report,true}' $<
# Since Mix depends on EEx and EEx depends on Mix,
# we first compile EEx without the .app file,
# then Mix, and then compile EEx fully
elixir: stdlib $(EEX) mix ex_unit logger eex iex
stdlib: $(KERNEL) $(UNICODE) $(APP)
$(KERNEL): lib/elixir/src/* lib/elixir/lib/*.ex lib/elixir/lib/*/*.ex lib/elixir/lib/*/*/*.ex VERSION
$(Q) if [ ! -f $(KERNEL) ]; then \
echo "==> bootstrap (compile)"; \
$(ERL) -s elixir_compiler bootstrap -s erlang halt; \
"$(MAKE)" unicode; \
fi
@ echo "==> elixir (compile)";
$(Q) cd lib/elixir && ../../$(ELIXIRC_MIN_SIG) "lib/**/*.ex" -o ebin;
$(Q) $(GENERATE_APP) $(VERSION)
$(Q) bin/elixir lib/elixir/scripts/infer.exs;
$(APP): lib/elixir/src/elixir.app.src $(GENERATE_APP)
$(Q) $(GENERATE_APP) $(VERSION)
unicode: $(UNICODE)
$(UNICODE): lib/elixir/unicode/*
@ echo "==> unicode (compile)";
$(Q) $(ELIXIRC_MIN_SIG) lib/elixir/unicode/unicode.ex -o lib/elixir/ebin;
$(Q) $(ELIXIRC_MIN_SIG) lib/elixir/unicode/tokenizer.ex -o lib/elixir/ebin;
$(Q) $(ELIXIRC_MIN_SIG) lib/elixir/unicode/security.ex -o lib/elixir/ebin;
$(eval $(call APP_TEMPLATE,ex_unit,ExUnit))
$(eval $(call APP_TEMPLATE,logger,Logger))
$(eval $(call APP_TEMPLATE,eex,EEx))
$(eval $(call APP_TEMPLATE,mix,Mix))
$(eval $(call APP_TEMPLATE,iex,IEx))
install: compile
@ echo "==> elixir (install)"
$(Q) for dir in lib/*; do \
rm -rf $(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/$$dir/ebin; \
$(INSTALL_DIR) "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/$$dir/ebin"; \
$(INSTALL_DATA) $$dir/ebin/* "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/$$dir/ebin"; \
done
$(Q) $(INSTALL_DIR) "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/bin"
$(Q) $(INSTALL_PROGRAM) $(filter-out %.ps1, $(filter-out %.bat, $(wildcard bin/*))) "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/bin"
$(Q) $(INSTALL_DIR) "$(DESTDIR)$(PREFIX)/$(BINDIR)"
$(Q) for file in "$(DESTDIR)$(PREFIX)"/$(LIBDIR)/elixir/bin/*; do \
ln -sf "../$(LIBDIR)/elixir/bin/$${file##*/}" "$(DESTDIR)$(PREFIX)/$(BINDIR)/"; \
done
"$(MAKE)" install_man
check_reproducible: compile
$(Q) echo "==> Checking for reproducible builds..."
$(Q) rm -rf lib/*/tmp/ebin_reproducible/
$(call WRITE_SOURCE_DATE_EPOCH)
$(Q) mkdir -p lib/elixir/tmp/ebin_reproducible/ \
lib/eex/tmp/ebin_reproducible/ \
lib/ex_unit/tmp/ebin_reproducible/ \
lib/iex/tmp/ebin_reproducible/ \
lib/logger/tmp/ebin_reproducible/ \
lib/mix/tmp/ebin_reproducible/
$(Q) mv lib/elixir/ebin/* lib/elixir/tmp/ebin_reproducible/
$(Q) mv lib/eex/ebin/* lib/eex/tmp/ebin_reproducible/
$(Q) mv lib/ex_unit/ebin/* lib/ex_unit/tmp/ebin_reproducible/
$(Q) mv lib/iex/ebin/* lib/iex/tmp/ebin_reproducible/
$(Q) mv lib/logger/ebin/* lib/logger/tmp/ebin_reproducible/
$(Q) mv lib/mix/ebin/* lib/mix/tmp/ebin_reproducible/
$(Q) rm -rf lib/*/ebin
SOURCE_DATE_EPOCH=$(call READ_SOURCE_DATE_EPOCH) "$(MAKE)" compile
$(Q) echo "Diffing..."
$(Q) bin/elixir lib/elixir/scripts/diff.exs lib/elixir/ebin/ lib/elixir/tmp/ebin_reproducible/
$(Q) bin/elixir lib/elixir/scripts/diff.exs lib/eex/ebin/ lib/eex/tmp/ebin_reproducible/
$(Q) bin/elixir lib/elixir/scripts/diff.exs lib/ex_unit/ebin/ lib/ex_unit/tmp/ebin_reproducible/
$(Q) bin/elixir lib/elixir/scripts/diff.exs lib/iex/ebin/ lib/iex/tmp/ebin_reproducible/
$(Q) bin/elixir lib/elixir/scripts/diff.exs lib/logger/ebin/ lib/logger/tmp/ebin_reproducible/
$(Q) bin/elixir lib/elixir/scripts/diff.exs lib/mix/ebin/ lib/mix/tmp/ebin_reproducible/
$(Q) echo "Builds are reproducible"
clean: clean_man
rm -rf ebin
rm -rf lib/*/ebin
rm -rf $(PARSER)
rm -rf lib/*/_build/
rm -rf lib/*/tmp/
rm -rf lib/elixir/test/ebin/
rm -rf lib/mix/test/fixtures/deps_on_git_repo/
rm -rf lib/mix/test/fixtures/git_rebar/
rm -rf lib/mix/test/fixtures/git_repo/
rm -rf lib/mix/test/fixtures/git_sparse_repo/
rm -rf lib/mix/test/fixtures/archive/ebin/
rm -f erl_crash.dump
rm -rf cover
clean_elixir:
$(Q) rm -f lib/*/ebin/Elixir.*.beam
#==> Documentation tasks
SOURCE_REF = $(shell tag="$(call GIT_TAG)" revision="$(call GIT_REVISION)"; echo "$${tag:-$$revision}")
DOCS_COMPILE = CANONICAL=$(CANONICAL) bin/elixir ../ex_doc/bin/ex_doc "$(1)" "$(VERSION)" "lib/$(2)/ebin" --main "$(3)" --source-url "https://github.com/elixir-lang/elixir" --source-ref "$(call SOURCE_REF)" --logo lib/elixir/pages/images/logo.png --output doc/$(2) --canonical "https://hexdocs.pm/$(2)/$(CANONICAL)" --homepage-url "https://elixir-lang.org/docs.html" $(DOCS_OPTIONS) $(4)
DOCS_CONFIG = bin/elixir lib/elixir/scripts/docs_config.exs "$(1)"
docs: compile ../ex_doc/bin/ex_doc docs_elixir docs_eex docs_mix docs_iex docs_ex_unit docs_logger
docs_elixir: compile ../ex_doc/bin/ex_doc
@ echo "==> ex_doc (elixir)"
$(Q) rm -rf doc/elixir
$(call DOCS_COMPILE,Elixir,elixir,Kernel,--config "lib/elixir/scripts/elixir_docs.exs")
$(call DOCS_CONFIG,elixir)
docs_eex: compile ../ex_doc/bin/ex_doc
@ echo "==> ex_doc (eex)"
$(Q) rm -rf doc/eex
$(call DOCS_COMPILE,EEx,eex,EEx,--config "lib/elixir/scripts/mix_docs.exs")
$(call DOCS_CONFIG,eex)
docs_mix: compile ../ex_doc/bin/ex_doc
@ echo "==> ex_doc (mix)"
$(Q) rm -rf doc/mix
$(call DOCS_COMPILE,Mix,mix,Mix,--config "lib/elixir/scripts/mix_docs.exs")
$(call DOCS_CONFIG,mix)
docs_iex: compile ../ex_doc/bin/ex_doc
@ echo "==> ex_doc (iex)"
$(Q) rm -rf doc/iex
$(call DOCS_COMPILE,IEx,iex,IEx,--config "lib/elixir/scripts/mix_docs.exs")
$(call DOCS_CONFIG,iex)
docs_ex_unit: compile ../ex_doc/bin/ex_doc
@ echo "==> ex_doc (ex_unit)"
$(Q) rm -rf doc/ex_unit
$(call DOCS_COMPILE,ExUnit,ex_unit,ExUnit,--config "lib/elixir/scripts/mix_docs.exs")
$(call DOCS_CONFIG,ex_unit)
docs_logger: compile ../ex_doc/bin/ex_doc
@ echo "==> ex_doc (logger)"
$(Q) rm -rf doc/logger
$(call DOCS_COMPILE,Logger,logger,Logger,--config "lib/elixir/scripts/mix_docs.exs")
$(call DOCS_CONFIG,logger)
../ex_doc/bin/ex_doc:
@ echo "ex_doc is not found in ../ex_doc as expected. See CONTRIBUTING.md for more information."
@ false
#==> Zip tasks
Docs.zip: docs
rm -f Docs.zip
zip -9 -r Docs.zip CHANGELOG.md doc LICENSE README.md
@ echo "Docs file created $(CURDIR)/Docs.zip"
Precompiled.zip: build_man compile
rm -f Precompiled.zip
zip -9 -r Precompiled.zip bin CHANGELOG.md lib/*/ebin lib/*/lib LICENSE Makefile man README.md VERSION
@ echo "Precompiled file created $(CURDIR)/Precompiled.zip"
#==> Test tasks
test: test_formatted test_erlang test_elixir
test_windows: test test_taskkill
test_taskkill:
taskkill //IM erl.exe //F //T //FI "MEMUSAGE gt 0"
taskkill //IM epmd.exe //F //T //FI "MEMUSAGE gt 0"
TEST_ERL = lib/elixir/test/erlang
TEST_EBIN = lib/elixir/test/ebin
TEST_ERLS = $(addprefix $(TEST_EBIN)/, $(addsuffix .beam, $(basename $(notdir $(wildcard $(TEST_ERL)/*.erl)))))
define FORMAT
$(Q) if [ "$(OS)" = "Windows_NT" ]; then \
cmd //C call ./bin/mix.bat format $(1); \
else \
bin/elixir bin/mix format $(1); \
fi
endef
format: compile
$(call FORMAT)
test_formatted: compile
$(call FORMAT,--check-formatted)
test_erlang: compile $(TEST_ERLS)
@ echo "==> elixir (eunit)"
$(Q) $(ERL) -pa $(TEST_EBIN) -s test_helper test;
@ echo ""
$(TEST_EBIN)/%.beam: $(TEST_ERL)/%.erl
$(Q) mkdir -p $(TEST_EBIN)
$(Q) $(ERLC) -o $(TEST_EBIN) $<
test_elixir: test_stdlib test_ex_unit test_logger test_eex test_iex test_mix
test_stdlib: compile
@ echo "==> elixir (ex_unit)"
$(Q) exec epmd & exit
$(Q) if [ "$(OS)" = "Windows_NT" ]; then \
cd lib/elixir && cmd //C call ../../bin/elixir.bat --sname primary -r "test/elixir/test_helper.exs" -pr "test/elixir/**/$(TEST_FILES)"; \
else \
cd lib/elixir && ../../bin/elixir --sname primary -r "test/elixir/test_helper.exs" -pr "test/elixir/**/$(TEST_FILES)"; \
fi
cover/ex_unit_elixir.coverdata:
$(Q) COVER="1" $(MAKE) test_stdlib
cover/combined.coverdata: cover/ex_unit_elixir.coverdata
cover/combined.coverdata:
bin/elixir ./lib/elixir/scripts/cover.exs
cover: cover/combined.coverdata
#==> Dialyzer tasks
DIALYZER_OPTS = --no_check_plt --fullpath -Werror_handling -Wunmatched_returns -Wunderspecs
PLT = .elixir.plt
$(PLT):
@ echo "==> Building PLT with Elixir's dependencies..."
$(Q) dialyzer --output_plt $(PLT) --build_plt --apps erts kernel stdlib compiler syntax_tools parsetools tools ssl inets crypto runtime_tools ftp tftp mnesia public_key asn1 sasl
clean_plt:
$(Q) rm -f $(PLT)
build_plt: clean_plt $(PLT)
dialyze: compile $(PLT)
@ echo "==> Dialyzing Elixir..."
$(Q) dialyzer -pa lib/elixir/ebin --plt $(PLT) $(DIALYZER_OPTS) lib/*/ebin
#==> Man page tasks
build_man: man/iex.1 man/elixir.1
define BUILD_MANPAGES
man/$(APP).1:
$(Q) cp man/$(APP).1.in man/$(APP).1
$(Q) sed -i.bak "/{COMMON}/r man/common" man/$(APP).1
$(Q) sed -i.bak "/{COMMON}/d" man/$(APP).1
$(Q) rm -f man/$(APP).1.bak
endef
$(foreach APP, elixir iex, $(eval $(BUILD_MANPAGES)))
clean_man:
rm -f man/elixir.1
rm -f man/elixir.1.bak
rm -f man/iex.1
rm -f man/iex.1.bak
install_man: build_man
$(Q) mkdir -p $(DESTDIR)$(MAN_PREFIX)/man1
$(Q) $(INSTALL_DATA) man/elixir.1 $(DESTDIR)$(MAN_PREFIX)/man1
$(Q) $(INSTALL_DATA) man/elixirc.1 $(DESTDIR)$(MAN_PREFIX)/man1
$(Q) $(INSTALL_DATA) man/iex.1 $(DESTDIR)$(MAN_PREFIX)/man1
$(Q) $(INSTALL_DATA) man/mix.1 $(DESTDIR)$(MAN_PREFIX)/man1
"$(MAKE)" clean_man
================================================
FILE: OPEN_SOURCE_POLICY.md
================================================
<!--
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2021 The Elixir Team
-->
# Open Source Policy
## 1. Introduction
This Open Source Policy outlines the licensing, contribution, and compliance
requirements for all code released under the Elixir project. By adhering to
these guidelines, we ensure that our community, maintainers, and contributors
uphold both legal and ethical standards while fostering a collaborative,
transparent environment.
This policy exists to support and protect the Elixir community. It aims to
balance openness, collaboration, and respect for all contributors’ rights,
ensuring that Elixir remains a trusted and innovative open source project.
## 2. Scope
This policy applies to the Elixir Programming language, located at
<https://github.com/elixir-lang/elixir>. It covers every file, and contribution
made, including documentation and any associated assets.
## 3. Licensing
All code released by the Elixir team is licensed under the
[Apache-2.0](./LICENSES/Apache-2.0.txt) license. Additionally, the following
licenses are recognized as permissible in this project:
- The Unicode license, as documented at
[LicenseRef-scancode-unicode](./LICENSES/LicenseRef-scancode-unicode.txt)
- The Elixir Trademark Policy, as documented at
[LicenseRef-elixir-trademark-policy](./LICENSES/LicenseRef-elixir-trademark-policy.txt)
These licenses are considered acceptable for any files or code that form part of
an Elixir repository. If a contribution requires a different license, it must
either be rejected or prompt an update to this policy.
## 4. Contributing to the Elixir repository
Any code contributed to the Elixir repository must fall under one of the accepted
licenses (Apache-2.0, Unicode, or Elixir Trademark). Contributions under any
other license will be rejected unless this policy is formally revised to include
that license. All files except those specifically exempted (e.g., certain test
fixture files) must contain SPDX license and copyright headers
(`SPDX-License-Identifier` and `SPDX-FileCopyrightText`). If a file qualifies
for an exception, this must be configured in the ORT (Open Source Review Toolkit)
configuration and undergo review.
Contributions must not introduce executable binary files into the codebase.
## 5. Preservation of Copyright and License Information
Any third-party code incorporated into the Elixir repository must retain original
copyright and license headers. If no such headers exist in the source, they must
be added. This practice ensures that original authors receive proper credit and
that the licensing lineage is preserved.
## 6. Objectives
The Elixir project aims to promote a culture of responsible open source usage.
Specifically, our objectives include:
### 6.1 Clearly Define and Communicate Licensing & Compliance Policies
We will identify and document all third-party dependencies, ensure that license
information is communicated clearly, and maintain a project-wide license policy
or compliance handbook.
### 6.2 Implement Clear Processes for Reviewing Contributions
We will provide well-defined contribution guidelines. We implement the
Developer Certificate of Origin (DCO) for additional clarity regarding
contributor rights and obligations.
### 6.3 Track and Audit Third-Party Code Usage
All projects will implement a Software Bill of Materials (SBoM) strategy and
regularly verify license compliance for direct and transitive dependencies.
### 6.4 Monitor and Continuously Improve Open Source Compliance
We will conduct periodic internal audits, integrate compliance checks into
continuous integration (CI/CD) pipelines, and regularly review and refine these
objectives to align with best practices.
## 7. Roles and Responsibilities
### 7.1 Core Team Member
Core Team Members are responsible for being familiar with this policy and
ensuring it is consistently enforced. They must demonstrate sufficient
competencies to understand the policy requirements and must reject or request
changes to any pull requests that violate these standards.
### 7.2 Contributor
Contributors are expected to follow this policy when submitting code. If a
contributor submits a pull request that does not comply with the policy
(e.g., introduces a disallowed license), Core Team Members have the authority to
reject it or request changes. No special competencies are required for
contributors beyond awareness and adherence to the policy.
### 7.3 EEF CISO
The CISO designated by the Erlang Ecosystem Foundation (EEF) provides oversight
on queries and guidance regarding open source compliance or legal matters for
Elixir. The CISO is responsible for checking ongoing compliance with the policy,
escalating potential violations to the Core Team, and involving legal counsel if
necessary. This role does not require legal expertise but does involve
initiating legal or community discussions when needed.
## 8. Implications of Failing to Follow the Program Requirements
If a violation of this policy is identified, the Elixir Core Team will undertake
the following actions:
## 8.1 Review the Codebase for Additional Violations
We will investigate the codebase thoroughly to detect any similar instances of
non-compliance.
## 8.2 Review and Update the Process or Policy
In collaboration with the EEF CISO, the Elixir Core Team will assess the policy
and our internal workflows, making any necessary clarifications or amendments to
reduce the likelihood of recurrence.
## 8.3 Notify and Train Core Team Members
We will ensure that all active Core Team Members are informed about any policy
changes and understand how to apply them in everyday development.
## 8.4 Remove or Replace the Offending Code
If required, we will remove or replace the non-compliant code.
## 9. Contact
The project maintains a private mailing list at
[policy@elixir-lang.org](mailto:policy@elixir-lang.org) for handling licensing
and policy-related queries. Email is the preferred communication channel, and
the EEF CISO will be included on this list to provide assistance and ensure
timely responses. While solutions may take longer to implement, the project
commits to acknowledging all queries within five business days.
## 10. External Contributions of Core Team Members
When Core Team Members contribute to repositories outside Elixir, they do so in
a personal capacity or via their employer. They will not act as official
representatives of the Elixir team in those external contexts.
## 11. Policy Review and Amendments
This policy will be revisited annually to address new concerns, accommodate
changes in community standards, or adjust to emerging legal or technical
requirements. Proposed amendments must be reviewed by the Core Team and, if
necessary, by the EEF CISO. Any significant changes will be communicated to
contributors and made publicly available.
*Effective Date: 2025-02-20*
*Last Reviewed: 2025-11-20*
================================================
FILE: README.md
================================================
<!--
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2021 The Elixir Team
SPDX-FileCopyrightText: 2012 Plataformatec
-->
<h1>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/elixir-lang/elixir-lang.github.com/raw/main/images/logo/logo-dark.png">
<img alt="Elixir logo" src="https://github.com/elixir-lang/elixir-lang.github.com/raw/main/images/logo/logo.png" width="200">
</picture>
</h1>
[](https://github.com/elixir-lang/elixir/actions/workflows/ci.yml?query=branch%3Amain)
[](https://www.bestpractices.dev/projects/10187)
Elixir is a dynamic, functional language designed for building scalable
and maintainable applications.
For more about Elixir, installation and documentation,
[check Elixir's website](https://elixir-lang.org/).
## Policies
New releases are announced in the [announcement mailing list][8].
You can subscribe by sending an email to <elixir-lang-ann+subscribe@googlegroups.com>
and replying to the confirmation email.
All security releases [will be tagged with `[security]`][10]. For more
information, please read our [Security Policy][9].
All interactions in our official communication channels follow our
[Code of Conduct][1].
All contributions are required to conform to our [Open Source Policy][11].
## Bug reports
For reporting bugs, [visit our issue tracker][2] and follow the steps
for reporting a new issue. **Please disclose security vulnerabilities
privately [in our Security page](https://github.com/elixir-lang/elixir/security)**.
All currently open bugs related to Elixir are listed in the issues tracker.
The Elixir team uses the issues tracker to focus on *actionable items*,
including planned enhancements in the short and medium term. We also do
our best to label entries for clarity and to ease collaboration.
Our *actionable item policy* has some important consequences, such as:
* Proposing new features as well as requests for support, help, and
guidance must be done in their own spaces, detailed next.
* Issues we have identified to be outside of Elixir's scope,
such as an upstream bug, will be closed (and requested to be moved
elsewhere if appropriate).
* We actively close unrelated and non-actionable issues to keep the
issues tracker tidy. If you believe we got something wrong, drop a
comment and we can always reopen the issue.
By keeping the overall issues tracker tidy and organized, the community
can easily peek at what is coming in new releases and also get involved
by commenting on existing issues and submitting pull requests. Please
remember to keep the tone positive and be kind! For more information,
see the [Code of Conduct][1].
## Discussions, support, and help
For general discussions, support, and help, please use the community
spaces [listed on the sidebar of the Elixir website](https://elixir-lang.org/),
such as forums, chat platforms, etc, where the wider community will be available
to help you.
## Proposing new features
We encourage you to first propose new features in the community spaces
listed above. These discussions help refine ideas and gather feedback before
submission. Our website also includes [a general outline of the language
history and its current development focus](https://elixir-lang.org/development.html).
Once you are ready, you can submit your proposal to the [Elixir Core
mailing list][3], either through the web interface or by subscribing to
it at <elixir-lang-core+subscribe@googlegroups.com>. Remember to include
a clear problem description, compare the proposed solution to existing
alternatives in the Elixir ecosystem (and in other languages if possible),
and consider the potential impact your changes will have on the codebase and
community.
Once a proposal is accepted, it will be added to [the issue tracker][2].
Features and bug fixes that have already been merged and will be included
in the next release are then "closed" and added to the [changelog][7]
before release.
## Compiling from source
For the many different ways to install Elixir,
[see our installation instructions on the website](https://elixir-lang.org/install.html).
However, if you want to contribute to Elixir, you will need to compile from source.
First, [install Erlang](https://elixir-lang.org/install.html#installing-erlang).
After that, clone this repository to your machine, compile and test it:
```sh
git clone https://github.com/elixir-lang/elixir.git
cd elixir
make
```
> Note: if you are running on Windows,
[this article includes important notes for compiling Elixir from source
on Windows](https://github.com/elixir-lang/elixir/wiki/Windows).
In case you want to use this Elixir version as your system version,
you need to add the `bin` directory to [your PATH environment variable](https://elixir-lang.org/install.html#setting-path-environment-variable).
When updating the repository, you may want to run `make clean` before
recompiling. For deterministic builds, you should set the environment
variable `ERL_COMPILER_OPTIONS=deterministic`.
## Contributing
Contributions to Elixir are always welcome! Before you get started, please check
out our [CONTRIBUTING.md](CONTRIBUTING.md) file. There you will find detailed
guidelines on how to set up your environment, run the test suite, format your
code, and submit pull requests. We also include information on our review
process, licensing requirements, and helpful tips to ensure a smooth
contribution experience.
## Development links
* [Elixir Documentation][6]
* [Elixir Core Mailing list (development)][3]
* [Announcement mailing list][8]
* [Code of Conduct][1]
* [Issue tracker][2]
* [Changelog][7]
* [Security Policy][9]
* **[#elixir][4]** on [Libera.Chat][5] IRC
[1]: CODE_OF_CONDUCT.md
[2]: https://github.com/elixir-lang/elixir/issues
[3]: https://groups.google.com/group/elixir-lang-core
[4]: https://web.libera.chat/#elixir
[5]: https://libera.chat
[6]: https://elixir-lang.org/docs.html
[7]: CHANGELOG.md
[8]: https://groups.google.com/group/elixir-lang-ann
[9]: SECURITY.md
[10]: https://groups.google.com/forum/#!searchin/elixir-lang-ann/%5Bsecurity%5D%7Csort:date
[11]: OPEN_SOURCE_POLICY.md
## License
"Elixir" and the Elixir logo are registered trademarks of The Elixir Team.
Elixir source code is released under Apache License 2.0.
Check [LICENSE](LICENSE) file for more information.
================================================
FILE: RELEASE.md
================================================
<!--
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2021 The Elixir Team
SPDX-FileCopyrightText: 2012 Plataformatec
-->
# Release process
## Shipping a new version
1. Update version in /VERSION, bin/elixir, and bin/elixir.bat
2. Ensure /CHANGELOG.md is updated, versioned and add the current date
3. Update "Compatibility and Deprecations" if a new OTP version is supported
4. Commit changes above with title "Release vVERSION" and push it
5. Once GitHub actions completes, generate a new tag, and push it
6. Wait until GitHub Actions publish artifacts to the draft release
7. Copy the relevant bits from /CHANGELOG.md to the GitHub release and publish it (link to the announcement if there is one)
8. Update `_data/elixir-versions.yml` (except for RCs) in `elixir-lang/elixir-lang.github.com`
## Creating a new vMAJOR.MINOR branch (usually before first rc)
### In the new branch
1. Comment out `CANONICAL := main/` in /Makefile
2. Update tables in /SECURITY.md and "Compatibility and Deprecations"
3. Commit "Branch out vMAJOR.MINOR"
### Back in main
1. Bump /VERSION file, bin/elixir, and bin/elixir.bat
2. Start new /CHANGELOG.md
3. Update tables in /SECURITY.md and in "Compatibility and Deprecations"
4. Commit "Start vMAJOR.MINOR+1"
## Changing supported Erlang/OTP versions
1. Update the table in Compatibility and Deprecations
2. Update `otp_release` checks in `/Makefile` and `/lib/elixir/src/elixir.erl`
3. Update relevant CI workflows in `/.github/workflows/*.yml` - for release workflows, outdated/recently added Erlang/OTP versions must run conditionally
4. Remove `otp_release` version checks that are no longer needed
================================================
FILE: SECURITY.md
================================================
<!--
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2021 The Elixir Team
SPDX-FileCopyrightText: 2012 Plataformatec
-->
# Security Policy
## Supported versions
Elixir applies bug fixes only to the latest minor branch. Security patches are available for the last 5 minor branches:
Elixir version | Support
:------------- | :-----------------------------
1.20 | Development
1.19 | Bug fixes and security patches
1.18 | Security patches only
1.17 | Security patches only
1.16 | Security patches only
1.15 | Security patches only
## Announcements
New releases are announced in the read-only [announcements mailing list](https://groups.google.com/group/elixir-lang-ann). You can subscribe by sending an email to <elixir-lang-ann+subscribe@googlegroups.com> and replying to the confirmation email. Security notifications [will be tagged with `[security]`](https://groups.google.com/forum/#!searchin/elixir-lang-ann/%5Bsecurity%5D%7Csort:date).
You may also see [all releases](https://github.com/elixir-lang/elixir/releases) and [consult all disclosed vulnerabilities](https://github.com/elixir-lang/elixir/security) on GitHub.
## Reporting a vulnerability
[Please disclose security vulnerabilities privately via GitHub](https://github.com/elixir-lang/elixir/security).
================================================
FILE: VERSION
================================================
1.20.0-rc.3
================================================
FILE: bin/elixir
================================================
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
set -e
ELIXIR_VERSION=1.20.0-rc.3
if [ $# -eq 0 ] || { [ $# -eq 1 ] && { [ "$1" = "--help" ] || [ "$1" = "-h" ]; }; }; then
cat <<USAGE >&2
Usage: $(basename "$0") [options] [.exs file] [data]
## General options
-e "COMMAND" Evaluates the given command (*)
-h, --help Prints this message (standalone)
-r "FILE" Requires the given files/patterns (*)
-S SCRIPT Finds and executes the given script in \$PATH
-pr "FILE" Requires the given files/patterns in parallel (*)
-pa "PATH" Prepends the given path to Erlang code path (*)
-pz "PATH" Appends the given path to Erlang code path (*)
-v, --version Prints Erlang/OTP and Elixir versions (standalone)
--color, --no-color Enables or disables ANSI coloring
--erl "SWITCHES" Switches to be passed down to Erlang (*)
--eval "COMMAND" Evaluates the given command, same as -e (*)
--logger-otp-reports BOOL Enables or disables OTP reporting
--logger-sasl-reports BOOL Enables or disables SASL reporting
--no-halt Does not halt the Erlang VM after execution
--short-version Prints Elixir version (standalone)
Options given after the .exs file or -- are passed down to the executed code.
Options can be passed to the Erlang runtime using \$ELIXIR_ERL_OPTIONS or --erl.
## Distribution options
The following options are related to node distribution.
--cookie COOKIE Sets a cookie for this distributed node
--hidden Makes a hidden node
--name NAME Makes and assigns a name to the distributed node
--rpc-eval NODE "COMMAND" Evaluates the given command on the given remote node (*)
--sname NAME Makes and assigns a short name to the distributed node
--name and --sname may be set to undefined so one is automatically generated.
## Release options
The following options are generally used under releases.
--boot "FILE" Uses the given FILE.boot to start the system
--boot-var VAR "VALUE" Makes \$VAR available as VALUE to FILE.boot (*)
--erl-config "FILE" Loads configuration in FILE.config written in Erlang (*)
--pipe-to "PIPEDIR" "LOGDIR" Starts the Erlang VM as a named PIPEDIR and LOGDIR
--vm-args "FILE" Passes the contents in file as arguments to the VM
--pipe-to starts Elixir detached from console (Unix-like only).
It will attempt to create PIPEDIR and LOGDIR if they don't exist.
See run_erl to learn more. To reattach, run: to_erl PIPEDIR.
** Options marked with (*) can be given more than once.
** Standalone options can't be combined with other options.
USAGE
exit 1
fi
readlink_f () {
cd "$(dirname "$1")" > /dev/null
filename="$(basename "$1")"
if [ -h "$filename" ]; then
readlink_f "$(readlink "$filename")"
else
echo "$(pwd -P)/$filename"
fi
}
if [ $# -eq 1 ] && [ "$1" = "--short-version" ]; then
echo "$ELIXIR_VERSION"
exit 0
fi
# Stores static Erlang arguments and --erl (which is passed as is)
ERL=""
# Stores erl arguments preserving spaces/quotes (mimics an array)
erl_set () {
eval "E${E}=\$1"
E=$((E + 1))
}
# Checks if a string starts with prefix. Usage: starts_with "$STRING" "$PREFIX"
starts_with () {
case $1 in
"$2"*) true;;
*) false;;
esac
}
ERL_EXEC="erl"
MODE="cli"
I=1
E=0
LENGTH=$#
set -- "$@" -extra
while [ $I -le $LENGTH ]; do
# S counts to be shifted, C counts to be copied
S=0
C=0
case "$1" in
+elixirc)
C=1
;;
+iex)
C=1
MODE="iex"
;;
-v|--no-halt|--color|--no-color)
C=1
;;
-e|-r|-pr|-pa|-pz|--eval|--remsh|--dot-iex|--dbg)
C=2
;;
--rpc-eval)
C=3
;;
--hidden)
S=1
ERL="$ERL -hidden"
;;
--logger-otp-reports)
S=2
if [ "$2" = 'true' ] || [ "$2" = 'false' ]; then
ERL="$ERL -logger handle_otp_reports $2"
fi
;;
--logger-sasl-reports)
S=2
if [ "$2" = 'true' ] || [ "$2" = 'false' ]; then
ERL="$ERL -logger handle_sasl_reports $2"
fi
;;
--erl)
S=2
ERL="$ERL $2"
;;
--cookie)
S=2
erl_set "-setcookie"
erl_set "$2"
;;
--sname|--name)
S=2
erl_set "$(echo "$1" | cut -c 2-)"
erl_set "$2"
;;
--erl-config)
S=2
erl_set "-config"
erl_set "$2"
;;
--vm-args)
S=2
erl_set "-args_file"
erl_set "$2"
;;
--boot)
S=2
erl_set "-boot"
erl_set "$2"
;;
--boot-var)
S=3
erl_set "-boot_var"
erl_set "$2"
erl_set "$3"
;;
--pipe-to)
S=3
RUN_ERL_PIPE="$2"
RUN_ERL_LOG="$3"
if [ "$(starts_with "$RUN_ERL_PIPE" "-")" ]; then
echo "--pipe-to : PIPEDIR cannot be a switch" >&2 && exit 1
elif [ "$(starts_with "$RUN_ERL_LOG" "-")" ]; then
echo "--pipe-to : LOGDIR cannot be a switch" >&2 && exit 1
fi
;;
*)
while [ $I -le $LENGTH ]; do
I=$((I + 1))
set -- "$@" "$1"
shift
done
break
;;
esac
while [ $I -le $LENGTH ] && [ $C -gt 0 ]; do
C=$((C - 1))
I=$((I + 1))
set -- "$@" "$1"
shift
done
I=$((I + S))
shift $S
done
I=$((E - 1))
while [ $I -ge 0 ]; do
eval "VAL=\$E$I"
set -- "$VAL" "$@"
I=$((I - 1))
done
SELF=$(readlink_f "$0")
SCRIPT_PATH=$(dirname "$SELF")
if [ "$OSTYPE" = "cygwin" ]; then SCRIPT_PATH=$(cygpath -m "$SCRIPT_PATH"); fi
if [ "$MODE" != "iex" ]; then ERL="-s elixir start_cli $ERL"; fi
# One MAY change ERTS_BIN= but you MUST NOT change
# ERTS_BIN=$ERTS_BIN as it is handled by Elixir releases.
ERTS_BIN=
ERTS_BIN="$ERTS_BIN"
set -- "$ERTS_BIN$ERL_EXEC" -noshell -elixir_root "$SCRIPT_PATH"/../lib -pa "$SCRIPT_PATH"/../lib/elixir/ebin $ELIXIR_ERL_OPTIONS $ERL "$@"
if [ -n "$RUN_ERL_PIPE" ]; then
ESCAPED=""
for PART in "$@"; do
ESCAPED="$ESCAPED $(printf '%s' "$PART" | sed 's@[^a-zA-Z0-9_/-]@\\&@g')"
done
mkdir -p "$RUN_ERL_PIPE"
mkdir -p "$RUN_ERL_LOG"
ERL_EXEC="run_erl"
set -- "$ERTS_BIN$ERL_EXEC" -daemon "$RUN_ERL_PIPE/" "$RUN_ERL_LOG/" "$ESCAPED"
fi
if [ -n "$ELIXIR_CLI_DRY_RUN" ]; then
echo "$@"
else
exec "$@"
fi
================================================
FILE: bin/elixir.bat
================================================
@echo off
:: SPDX-License-Identifier: Apache-2.0
:: SPDX-FileCopyrightText: 2021 The Elixir Team
:: SPDX-FileCopyrightText: 2012 Plataformatec
set ELIXIR_VERSION=1.20.0-rc.3
if ""%1""=="""" if ""%2""=="""" goto documentation
if /I ""%1""==""--help"" if ""%2""=="""" goto documentation
if /I ""%1""==""-h"" if ""%2""=="""" goto documentation
if /I ""%1""==""/h"" if ""%2""=="""" goto documentation
if ""%1""==""/?"" if ""%2""=="""" goto documentation
if /I ""%1""==""--short-version"" if ""%2""=="""" goto shortversion
goto parseopts
:documentation
echo Usage: %~nx0 [options] [.exs file] [data]
echo.
echo ## General options
echo.
echo -e "COMMAND" Evaluates the given command (*)
echo -h, --help Prints this message (standalone)
echo -r "FILE" Requires the given files/patterns (*)
echo -S SCRIPT Finds and executes the given script in $PATH
echo -pr "FILE" Requires the given files/patterns in parallel (*)
echo -pa "PATH" Prepends the given path to Erlang code path (*)
echo -pz "PATH" Appends the given path to Erlang code path (*)
echo -v, --version Prints Erlang/OTP and Elixir versions (standalone)
echo.
echo --color, --no-color Enables or disables ANSI coloring
echo --erl "SWITCHES" Switches to be passed down to Erlang (*)
echo --eval "COMMAND" Evaluates the given command, same as -e (*)
echo --logger-otp-reports BOOL Enables or disables OTP reporting
echo --logger-sasl-reports BOOL Enables or disables SASL reporting
echo --no-halt Does not halt the Erlang VM after execution
echo --short-version Prints Elixir version (standalone)
echo.
echo Options given after the .exs file or -- are passed down to the executed code.
echo Options can be passed to the Erlang runtime using $ELIXIR_ERL_OPTIONS or --erl.
echo.
echo ## Distribution options
echo.
echo The following options are related to node distribution.
echo.
echo --cookie COOKIE Sets a cookie for this distributed node
echo --hidden Makes a hidden node
echo --name NAME Makes and assigns a name to the distributed node
echo --rpc-eval NODE "COMMAND" Evaluates the given command on the given remote node (*)
echo --sname NAME Makes and assigns a short name to the distributed node
echo.
echo --name and --sname may be set to undefined so one is automatically generated.
echo.
echo ## Release options
echo.
echo The following options are generally used under releases.
echo.
echo --boot "FILE" Uses the given FILE.boot to start the system
echo --boot-var VAR "VALUE" Makes $VAR available as VALUE to FILE.boot (*)
echo --erl-config "FILE" Loads configuration in FILE.config written in Erlang (*)
echo --vm-args "FILE" Passes the contents in file as arguments to the VM
echo.
echo --pipe-to is not supported on Windows. If set, Elixir won't boot.
echo.
echo ** Options marked with (*) can be given more than once.
echo ** Standalone options can't be combined with other options.
goto end
:shortversion
echo %ELIXIR_VERSION%
goto end
:parseopts
setlocal enabledelayedexpansion
rem Parameters for Erlang
set parsErlang=
rem Optional parameters before the "-extra" parameter
set beforeExtra=
rem Option which determines whether the loop is over
set endLoop=0
rem Designates the path to the current script
set SCRIPT_PATH=%~dp0
rem Designates the path to the ERTS system
set ERTS_BIN=
set ERTS_BIN=!ERTS_BIN!
rem Recursive loop called for each parameter that parses the cmd line parameters
:startloop
set "par=%~1"
if "!par!"=="" (
rem skip if no parameter
goto run
)
shift
set par="!par:"=\"!"
rem ******* EXECUTION OPTIONS **********************
if !par!=="+iex" (set useIEx=1 && goto startloop)
if !par!=="+elixirc" (goto startloop)
rem ******* ELIXIR PARAMETERS **********************
if ""==!par:-e=! (shift && goto startloop)
if ""==!par:--eval=! (shift && goto startloop)
if ""==!par:--rpc-eval=! (shift && shift && goto startloop)
if ""==!par:-r=! (shift && goto startloop)
if ""==!par:-pr=! (shift && goto startloop)
if ""==!par:-pa=! (shift && goto startloop)
if ""==!par:-pz=! (shift && goto startloop)
if ""==!par:-v=! (goto startloop)
if ""==!par:--version=! (goto startloop)
if ""==!par:--no-halt=! (goto startloop)
if ""==!par:--color=! (goto startloop)
if ""==!par:--no-color=! (goto startloop)
if ""==!par:--remsh=! (shift && goto startloop)
if ""==!par:--dot-iex=! (shift && goto startloop)
if ""==!par:--dbg=! (shift && goto startloop)
rem ******* ERLANG PARAMETERS **********************
if ""==!par:--boot=! (set "parsErlang=!parsErlang! -boot "%~1"" && shift && goto startloop)
if ""==!par:--boot-var=! (set "parsErlang=!parsErlang! -boot_var "%~1" "%~2"" && shift && shift && goto startloop)
if ""==!par:--cookie=! (set "parsErlang=!parsErlang! -setcookie "%~1"" && shift && goto startloop)
if ""==!par:--hidden=! (set "parsErlang=!parsErlang! -hidden" && goto startloop)
if ""==!par:--erl-config=! (set "parsErlang=!parsErlang! -config "%~1"" && shift && goto startloop)
if ""==!par:--logger-otp-reports=! (set "parsErlang=!parsErlang! -logger handle_otp_reports %1" && shift && goto startloop)
if ""==!par:--logger-sasl-reports=! (set "parsErlang=!parsErlang! -logger handle_sasl_reports %1" && shift && goto startloop)
if ""==!par:--name=! (set "parsErlang=!parsErlang! -name "%~1"" && shift && goto startloop)
if ""==!par:--sname=! (set "parsErlang=!parsErlang! -sname "%~1"" && shift && goto startloop)
if ""==!par:--vm-args=! (set "parsErlang=!parsErlang! -args_file "%~1"" && shift && goto startloop)
if ""==!par:--erl=! (set "beforeExtra=!beforeExtra! %~1" && shift && goto startloop)
if ""==!par:--pipe-to=! (echo --pipe-to : Option is not supported on Windows && goto end)
:run
setlocal disabledelayedexpansion
if not defined useIEx (
set beforeExtra=-s elixir start_cli %beforeExtra%
)
set beforeExtra=-noshell -elixir_root "%SCRIPT_PATH%..\lib" -pa "%SCRIPT_PATH%..\lib\elixir\ebin" %beforeExtra%
if defined ELIXIR_CLI_DRY_RUN (
echo "%ERTS_BIN%erl.exe" %ELIXIR_ERL_OPTIONS% %parsErlang% %beforeExtra% -extra %*
) else (
"%ERTS_BIN%erl.exe" %ELIXIR_ERL_OPTIONS% %parsErlang% %beforeExtra% -extra %*
)
exit /B %ERRORLEVEL%
:end
endlocal
================================================
FILE: bin/elixirc
================================================
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
set -e
if [ $# -eq 0 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
cat <<USAGE >&2
Usage: $(basename "$0") [elixir switches] [compiler switches] [.ex files]
-h, --help Prints this message and exits
-o The directory to output compiled files
-v, --version Prints Elixir version and exits (standalone)
--ignore-module-conflict Does not emit warnings if a module was previously defined
--no-debug-info Does not attach debug info to compiled modules
--no-docs Does not attach documentation to compiled modules
--profile time Profile the time to compile modules
--verbose Prints compilation status
--warnings-as-errors Treats warnings as errors and return non-zero exit status
Options given after -- are passed down to the executed code.
Options can be passed to the Erlang runtime using \$ELIXIR_ERL_OPTIONS.
Options can be passed to the Erlang compiler using \$ERL_COMPILER_OPTIONS.
USAGE
exit 1
fi
readlink_f () {
cd "$(dirname "$1")" > /dev/null
filename="$(basename "$1")"
if [ -h "$filename" ]; then
readlink_f "$(readlink "$filename")"
else
echo "$(pwd -P)/$filename"
fi
}
SELF=$(readlink_f "$0")
SCRIPT_PATH=$(dirname "$SELF")
exec "$SCRIPT_PATH"/elixir +elixirc "$@"
================================================
FILE: bin/elixirc.bat
================================================
@echo off
:: SPDX-License-Identifier: Apache-2.0
:: SPDX-FileCopyrightText: 2021 The Elixir Team
:: SPDX-FileCopyrightText: 2012 Plataformatec
setlocal
set argc=0
for %%A in (%*) do (
if /I "%%A"=="--help" goto documentation
if /I "%%A"=="-h" goto documentation
if /I "%%A"=="/h" goto documentation
if "%%A"=="/?" goto documentation
set /A argc+=1
)
if %argc%==0 goto documentation
goto run
:documentation
echo Usage: %~nx0 [elixir switches] [compiler switches] [.ex files]
echo.
echo -h, --help Prints this message and exits
echo -o The directory to output compiled files
echo -v, --version Prints Elixir version and exits (standalone)
echo.
echo --ignore-module-conflict Does not emit warnings if a module was previously defined
echo --no-debug-info Does not attach debug info to compiled modules
echo --no-docs Does not attach documentation to compiled modules
echo --profile time Profile the time to compile modules
echo --verbose Prints compilation status
echo --warnings-as-errors Treats warnings as errors and returns non-zero exit status
echo.
echo ** Options given after -- are passed down to the executed code
echo ** Options can be passed to the Erlang runtime using ELIXIR_ERL_OPTIONS
echo ** Options can be passed to the Erlang compiler using ERL_COMPILER_OPTIONS
goto end
:run
call "%~dp0\elixir.bat" +elixirc %*
:end
endlocal
================================================
FILE: bin/iex
================================================
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
set -e
if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
cat <<USAGE >&2
Usage: $(basename "$0") [options] [.exs file] [data]
The following options are exclusive to IEx:
--dbg pry Sets the backend for Kernel.dbg/2 to IEx.pry/0
--dot-iex "FILE" Evaluates FILE, line by line, to set up IEx' environment.
Defaults to evaluating .iex.exs or ~/.iex.exs, if any exists.
If FILE is empty, then no file will be loaded.
--remsh NAME Connects to a node using a remote shell.
It accepts all other options listed by "elixir --help".
USAGE
exit 1
fi
readlink_f () {
cd "$(dirname "$1")" > /dev/null
filename="$(basename "$1")"
if [ -h "$filename" ]; then
readlink_f "$(readlink "$filename")"
else
echo "$(pwd -P)/$filename"
fi
}
SELF=$(readlink_f "$0")
SCRIPT_PATH=$(dirname "$SELF")
exec "$SCRIPT_PATH"/elixir --no-halt --erl "-user elixir" +iex "$@"
================================================
FILE: bin/iex.bat
================================================
@echo off
:: SPDX-License-Identifier: Apache-2.0
:: SPDX-FileCopyrightText: 2021 The Elixir Team
:: SPDX-FileCopyrightText: 2012 Plataformatec
setlocal
if /I ""%1""==""--help"" goto documentation
if /I ""%1""==""-h"" goto documentation
if /I ""%1""==""/h"" goto documentation
if ""%1""==""/?"" goto documentation
goto run
:documentation
echo Usage: %~nx0 [options] [.exs file] [data]
echo.
echo The following options are exclusive to IEx:
echo.
echo --dbg pry Sets the backend for Kernel.dbg/2 to IEx.pry/0
echo --dot-iex "FILE" Evaluates FILE, line by line, to set up IEx' environment.
echo Defaults to evaluating .iex.exs or ~/.iex.exs, if any exists.
echo If FILE is empty, then no file will be loaded.
echo --remsh NAME Connects to a node using a remote shell
echo.
echo It accepts all other options listed by "elixir --help".
goto end
:run
call "%~dp0\elixir.bat" --no-halt --erl "-user elixir" +iex %*
:end
endlocal
================================================
FILE: bin/mix
================================================
#!/usr/bin/env elixir
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
Mix.CLI.main()
================================================
FILE: bin/mix.bat
================================================
@echo off
:: SPDX-License-Identifier: Apache-2.0
:: SPDX-FileCopyrightText: 2021 The Elixir Team
:: SPDX-FileCopyrightText: 2012 Plataformatec
call "%~dp0\elixir.bat" "%~dp0\mix" %*
================================================
FILE: bin/mix.ps1
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
# Store path to mix.bat as a FileInfo object
$mixBatPath = (Get-ChildItem (((Get-ChildItem $MyInvocation.MyCommand.Path).Directory.FullName) + '\mix.bat'))
$newArgs = @()
for ($i = 0; $i -lt $args.length; $i++)
{
if ($args[$i] -is [array])
{
# Commas created the array so we need to reintroduce those commas
for ($j = 0; $j -lt $args[$i].length - 1; $j++)
{
$newArgs += ($args[$i][$j] + ',')
}
$newArgs += $args[$i][-1]
}
else
{
$newArgs += $args[$i]
}
}
# Corrected arguments are ready to pass to batch file
& $mixBatPath $newArgs
================================================
FILE: lib/eex/lib/eex/compiler.ex
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
defmodule EEx.Compiler do
@moduledoc false
# When changing this setting, don't forget to update the docs for EEx
@default_engine EEx.SmartEngine
@h_spaces [?\s, ?\t]
@all_spaces [?\s, ?\t, ?\n, ?\r]
@doc """
Tokenize EEx contents.
"""
def tokenize(contents, opts) when is_binary(contents) do
tokenize(String.to_charlist(contents), contents, opts)
end
def tokenize(contents, opts) when is_list(contents) do
tokenize(contents, List.to_string(contents), opts)
end
def tokenize(contents, source, opts) when is_list(contents) do
file = opts[:file] || "nofile"
line = opts[:line] || 1
trim = opts[:trim] || false
indentation = opts[:indentation] || 0
column = indentation + (opts[:column] || 1)
state = %{trim: trim, indentation: indentation, file: file, source: source}
{contents, line, column} =
(trim && trim_init(contents, line, column, state)) || {contents, line, column}
tokenize(contents, line, column, state, [{line, column}], [])
end
defp tokenize(~c"<%%" ++ t, line, column, state, buffer, acc) do
tokenize(t, line, column + 3, state, [?%, ?< | buffer], acc)
end
defp tokenize(~c"<%!--" ++ t, line, column, state, buffer, acc) do
case comment(t, line, column + 5, state, []) do
{:error, message} ->
meta = %{line: line, column: column}
{:error, message <> code_snippet(state.source, state.indentation, meta), meta}
{:ok, new_line, new_column, rest, comments} ->
token = {:comment, Enum.reverse(comments), %{line: line, column: column}}
trim_and_tokenize(rest, new_line, new_column, state, buffer, acc, &[token | &1])
end
end
# TODO: Remove me on Elixir v2.0
defp tokenize(~c"<%#" ++ t, line, column, state, buffer, acc) do
IO.warn("<%# is deprecated, use <%!-- or add a space between <% and # instead",
line: line,
column: column,
file: state.file
)
case expr(t, line, column + 3, state, []) do
{:error, message} ->
{:error, message, %{line: line, column: column}}
{:ok, _, new_line, new_column, rest} ->
trim_and_tokenize(rest, new_line, new_column, state, buffer, acc, & &1)
end
end
defp tokenize(~c"<%" ++ t, line, column, state, buffer, acc) do
{marker, t} = retrieve_marker(t)
marker_length = length(marker)
case expr(t, line, column + 2 + marker_length, state, []) do
{:error, message} ->
meta = %{line: line, column: column}
{:error, message <> code_snippet(state.source, state.indentation, meta), meta}
{:ok, expr, new_line, new_column, rest} ->
{key, expr} =
case :elixir_tokenizer.tokenize(expr, 1, file: "eex", check_terminators: false) do
{:ok, _line, _column, _warnings, rev_tokens, []} ->
# We ignore warnings because the code will be tokenized
# again later with the right line+column info
token_key(rev_tokens, expr)
{:error, _, _, _, _} ->
{:expr, expr}
end
marker =
if key in [:middle_expr, :end_expr] and marker != ~c"" do
message =
"unexpected beginning of EEx tag \"<%#{marker}\" on \"<%#{marker}#{expr}%>\", " <>
"please remove \"#{marker}\""
IO.warn(message, file: state.file, line: line, column: column)
~c""
else
marker
end
token = {key, marker, expr, %{line: line, column: column}}
trim_and_tokenize(rest, new_line, new_column, state, buffer, acc, &[token | &1])
end
end
defp tokenize([?\n | t], line, _column, state, buffer, acc) do
tokenize(t, line + 1, state.indentation + 1, state, [?\n | buffer], acc)
end
defp tokenize([h | t], line, column, state, buffer, acc) do
tokenize(t, line, column + 1, state, [h | buffer], acc)
end
defp tokenize([], line, column, _state, buffer, acc) do
eof = {:eof, %{line: line, column: column}}
{:ok, Enum.reverse([eof | tokenize_text(buffer, acc)])}
end
defp trim_and_tokenize(rest, line, column, state, buffer, acc, fun) do
{rest, line, column, buffer} = trim_if_needed(rest, line, column, state, buffer)
acc = tokenize_text(buffer, acc)
tokenize(rest, line, column, state, [{line, column}], fun.(acc))
end
# Retrieve marker for <%
defp retrieve_marker([marker | t]) when marker in [?=, ?/, ?|] do
{[marker], t}
end
defp retrieve_marker(t) do
{~c"", t}
end
# Tokenize a multi-line comment until we find --%>
defp comment([?-, ?-, ?%, ?> | t], line, column, _state, buffer) do
{:ok, line, column + 4, t, buffer}
end
defp comment([?\n | t], line, _column, state, buffer) do
comment(t, line + 1, state.indentation + 1, state, [?\n | buffer])
end
defp comment([head | t], line, column, state, buffer) do
comment(t, line, column + 1, state, [head | buffer])
end
defp comment([], _line, _column, _state, _buffer) do
{:error, "expected closing '--%>' for EEx expression"}
end
# Tokenize an expression until we find %>
defp expr([?%, ?> | t], line, column, _state, buffer) do
{:ok, Enum.reverse(buffer), line, column + 2, t}
end
defp expr([?\n | t], line, _column, state, buffer) do
expr(t, line + 1, state.indentation + 1, state, [?\n | buffer])
end
defp expr([h | t], line, column, state, buffer) do
expr(t, line, column + 1, state, [h | buffer])
end
defp expr([], _line, _column, _state, _buffer) do
{:error, "expected closing '%>' for EEx expression"}
end
# Receives tokens and check if it is a start, middle or an end token.
defp token_key(rev_tokens, expr) do
case {Enum.reverse(rev_tokens), drop_eol(rev_tokens)} do
{[{:end, _} | _], [{:do, _} | _]} ->
{:middle_expr, expr}
{_, [{:do, _} | _]} ->
{:start_expr, maybe_append_space(expr)}
{_, [{:block_identifier, _, _} | _]} ->
{:middle_expr, maybe_append_space(expr)}
{[{:end, _} | _], [{:stab_op, _, _} | _]} ->
{:middle_expr, expr}
{_, [{:stab_op, _, _} | reverse_tokens]} ->
fn_index = Enum.find_index(reverse_tokens, &match?({:fn, _}, &1)) || :infinity
end_index = Enum.find_index(reverse_tokens, &match?({:end, _}, &1)) || :infinity
if end_index > fn_index do
{:start_expr, expr}
else
{:middle_expr, expr}
end
{tokens, _} ->
case Enum.drop_while(tokens, &closing_bracket?/1) do
[{:end, _} | _] -> {:end_expr, expr}
_ -> {:expr, expr}
end
end
end
defp drop_eol([{:eol, _} | rest]), do: drop_eol(rest)
defp drop_eol(rest), do: rest
defp maybe_append_space([?\s]), do: [?\s]
defp maybe_append_space([h]), do: [h, ?\s]
defp maybe_append_space([h | t]), do: [h | maybe_append_space(t)]
defp closing_bracket?({closing, _}) when closing in ~w"( [ {"a, do: true
defp closing_bracket?(_), do: false
# Tokenize the buffered text by appending
# it to the given accumulator.
defp tokenize_text([{_line, _column}], acc) do
acc
end
defp tokenize_text(buffer, acc) do
[{line, column} | buffer] = Enum.reverse(buffer)
[{:text, buffer, %{line: line, column: column}} | acc]
end
## Trim
defp trim_if_needed(rest, line, column, state, buffer) do
if state.trim do
buffer = trim_left(buffer, 0)
{rest, line, column} = trim_right(rest, line, column, 0, state)
{rest, line, column, buffer}
else
{rest, line, column, buffer}
end
end
defp trim_init([h | t], line, column, state) when h in @h_spaces,
do: trim_init(t, line, column + 1, state)
defp trim_init([?\r, ?\n | t], line, _column, state),
do: trim_init(t, line + 1, state.indentation + 1, state)
defp trim_init([?\n | t], line, _column, state),
do: trim_init(t, line + 1, state.indentation + 1, state)
defp trim_init([?<, ?% | _] = rest, line, column, _state),
do: {rest, line, column}
defp trim_init(_, _, _, _), do: false
defp trim_left(buffer, count) do
case trim_whitespace(buffer, 0) do
{[?\n, ?\r | rest], _} -> trim_left(rest, count + 1)
{[?\n | rest], _} -> trim_left(rest, count + 1)
_ when count > 0 -> [?\n | buffer]
_ -> buffer
end
end
defp trim_right(rest, line, column, last_column, state) do
case trim_whitespace(rest, column) do
{[?\r, ?\n | rest], column} ->
trim_right(rest, line + 1, state.indentation + 1, column + 1, state)
{[?\n | rest], column} ->
trim_right(rest, line + 1, state.indentation + 1, column, state)
{[], column} ->
{[], line, column}
_ when last_column > 0 ->
{[?\n | rest], line - 1, last_column}
_ ->
{rest, line, column}
end
end
defp trim_whitespace([h | t], column) when h in @h_spaces, do: trim_whitespace(t, column + 1)
defp trim_whitespace(list, column), do: {list, column}
@doc """
This is the compilation entry point. It glues the tokenizer
and the engine together by handling the tokens and invoking
the engine every time a full expression or text is received.
"""
@spec compile([EEx.token()], String.t(), keyword) :: Macro.t()
def compile(tokens, source, opts) do
file = opts[:file] || "nofile"
line = opts[:line] || 1
indentation = opts[:indentation] || 0
parser_options = opts[:parser_options] || Code.get_compiler_option(:parser_options)
engine = opts[:engine] || @default_engine
state = %{
engine: engine,
file: file,
source: source,
line: line,
quoted: [],
parser_options: [indentation: indentation] ++ parser_options,
indentation: indentation
}
init = state.engine.init(opts)
if function_exported?(state.engine, :handle_text, 2) and
not function_exported?(state.engine, :handle_text, 3) do
IO.warn(
"#{inspect(state.engine)}.handle_text/2 is deprecated, implement handle_text/3 instead"
)
end
generate_buffer(tokens, init, [], state)
end
# Ignore tokens related to comment.
defp generate_buffer([{:comment, _chars, _meta} | rest], buffer, scope, state) do
generate_buffer(rest, buffer, scope, state)
end
# Generates the buffers by handling each expression from the tokenizer.
# It returns Macro.t/0 or it raises.
defp generate_buffer([{:text, chars, meta} | rest], buffer, scope, state) do
buffer =
if function_exported?(state.engine, :handle_text, 3) do
meta = [line: meta.line, column: meta.column]
state.engine.handle_text(buffer, meta, IO.chardata_to_string(chars))
else
# TODO: Remove this on Elixir v2.0. The deprecation is on init.
state.engine.handle_text(buffer, IO.chardata_to_string(chars))
end
generate_buffer(rest, buffer, scope, state)
end
defp generate_buffer([{:expr, mark, chars, meta} | rest], buffer, scope, state) do
options =
[file: state.file, line: meta.line, column: column(meta.column, mark)] ++
state.parser_options
expr = Code.string_to_quoted!(chars, options)
buffer = state.engine.handle_expr(buffer, IO.chardata_to_string(mark), expr)
generate_buffer(rest, buffer, scope, state)
end
defp generate_buffer(
[{:start_expr, mark, chars, meta} | rest],
buffer,
scope,
state
) do
{rest, line, contents} = look_ahead_middle(rest, meta.line, chars) || {rest, meta.line, chars}
start_line = meta.line
start_column = column(meta.column, mark)
{contents, rest} =
generate_buffer(
rest,
state.engine.handle_begin(buffer),
[{contents, start_line, start_column} | scope],
%{state | quoted: [], line: line}
)
if mark == ~c"" and not match?({:=, _, [_, _]}, contents) do
message =
"the contents of this expression won't be output unless the EEx block starts with \"<%=\""
IO.warn(message, file: state.file, line: meta.line, column: meta.column)
end
buffer = state.engine.handle_expr(buffer, IO.chardata_to_string(mark), contents)
generate_buffer(rest, buffer, scope, state)
end
defp generate_buffer(
[{:middle_expr, ~c"", chars, meta} | rest],
buffer,
[{current, current_line, current_column} | scope],
state
) do
{wrapped, state} = wrap_expr(current, meta.line, buffer, chars, state)
state = %{state | line: meta.line}
generate_buffer(
rest,
state.engine.handle_begin(buffer),
[{wrapped, current_line, current_column} | scope],
state
)
end
defp generate_buffer([{:middle_expr, _, chars, meta} | _tokens], _buffer, [], state) do
message = "unexpected middle of expression <%#{chars}%>"
syntax_error!(message, meta, state)
end
defp generate_buffer(
[{:end_expr, ~c"", chars, meta} | rest],
buffer,
[{current, line, column} | _],
state
) do
{wrapped, state} = wrap_expr(current, meta.line, buffer, chars, state)
options = [file: state.file, line: line, column: column] ++ state.parser_options
tuples = Code.string_to_quoted!(wrapped, options)
buffer = insert_quoted(tuples, state.quoted)
{buffer, rest}
end
defp generate_buffer([{:end_expr, _, chars, meta} | _], _buffer, [], state) do
message = "unexpected end of expression <%#{chars}%>"
syntax_error!(message, meta, state)
end
defp generate_buffer([{:eof, _meta}], buffer, [], state) do
state.engine.handle_body(buffer)
end
defp generate_buffer([{:eof, _meta}], _buffer, [{content, line, column} | _scope], state) do
message = "expected a closing '<% end %>' for block expression in EEx"
expr_meta = non_whitespace_meta(content, line, column, state)
syntax_error!(message, expr_meta, state)
end
defp non_whitespace_meta([space | rest], line, column, state) when space in @h_spaces,
do: non_whitespace_meta(rest, line, column + 1, state)
defp non_whitespace_meta([?\n | rest], line, _column, state),
do: non_whitespace_meta(rest, line + 1, state.indentation + 1, state)
defp non_whitespace_meta(_, line, column, _),
do: %{line: line, column: column}
# Creates a placeholder and wrap it inside the expression block
defp wrap_expr(current, line, buffer, chars, state) do
new_lines = List.duplicate(?\n, line - state.line)
key = length(state.quoted)
placeholder = ~c"__EEX__(" ++ Integer.to_charlist(key) ++ ~c");"
count = current ++ placeholder ++ new_lines ++ chars
new_state = %{state | quoted: [{key, state.engine.handle_end(buffer)} | state.quoted]}
{count, new_state}
end
# Look middle expressions that immediately follow a start_expr
defp look_ahead_middle([{:comment, _comment, _meta} | rest], start, contents),
do: look_ahead_middle(rest, start, contents)
defp look_ahead_middle([{:text, text, _meta} | rest], start, contents) do
if only_spaces?(text) do
look_ahead_middle(rest, start, contents ++ text)
else
nil
end
end
defp look_ahead_middle([{:middle_expr, _, chars, meta} | rest], _start, contents) do
{rest, meta.line, contents ++ chars}
end
defp look_ahead_middle(_tokens, _start, _contents) do
nil
end
defp only_spaces?(chars) do
Enum.all?(chars, &(&1 in @all_spaces))
end
# Changes placeholder to real expression
defp insert_quoted({:__EEX__, _, [key]}, quoted) do
{^key, value} = List.keyfind(quoted, key, 0)
value
end
defp insert_quoted({left, line, right}, quoted) do
{insert_quoted(left, quoted), line, insert_quoted(right, quoted)}
end
defp insert_quoted({left, right}, quoted) do
{insert_quoted(left, quoted), insert_quoted(right, quoted)}
end
defp insert_quoted(list, quoted) when is_list(list) do
Enum.map(list, &insert_quoted(&1, quoted))
end
defp insert_quoted(other, _quoted) do
other
end
defp column(column, mark) do
# length(~c"<%") == 2
column + 2 + length(mark)
end
defp syntax_error!(message, meta, state) do
raise EEx.SyntaxError,
message: message,
snippet: code_snippet(state.source, state.indentation, meta),
file: state.file,
line: meta.line,
column: meta.column
end
defp code_snippet(source, indentation, meta) do
line_start = max(meta.line - 3, 1)
line_end = meta.line
digits = line_end |> Integer.to_string() |> byte_size()
number_padding = String.duplicate(" ", digits)
indentation = String.duplicate(" ", indentation)
source
|> String.split(["\r\n", "\n"])
|> Enum.slice((line_start - 1)..(line_end - 1))
|> Enum.map_reduce(line_start, fn
expr, line_number when line_number == line_end ->
arrow = String.duplicate(" ", meta.column - 1) <> "^"
{"#{line_number} | #{indentation}#{expr}\n #{number_padding}| #{arrow}", line_number + 1}
expr, line_number ->
line_number_padding = String.pad_leading("#{line_number}", digits)
{"#{line_number_padding} | #{indentation}#{expr}", line_number + 1}
end)
|> case do
{[], _} -> ""
{snippet, _} -> Enum.join(["\n #{number_padding}|" | snippet], "\n")
end
end
end
================================================
FILE: lib/eex/lib/eex/engine.ex
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
defmodule EEx.Engine do
@moduledoc ~S"""
Basic EEx engine that ships with Elixir.
An engine needs to implement all callbacks below.
This module also ships with a default engine implementation
you can delegate to. See `EEx.SmartEngine` as an example.
"""
@type state :: term
@doc """
Called at the beginning of every template.
It receives the options during compilation, including the
ones managed by EEx, such as `:line` and `:file`, as well
as custom engine options.
It must return the initial state.
"""
@callback init(opts :: keyword) :: state
@doc """
Called at the end of every template.
It must return Elixir's quoted expressions for the template.
"""
@callback handle_body(state) :: Macro.t()
@doc """
Called for the text/static parts of a template.
It must return the updated state.
"""
@callback handle_text(state, [line: pos_integer, column: pos_integer], text :: String.t()) ::
state
@doc """
Called for the dynamic/code parts of a template.
The marker is what follows exactly after `<%`. For example,
`<% foo %>` has an empty marker, but `<%= foo %>` has `"="`
as marker. The allowed markers so far are:
* `""`
* `"="`
* `"/"`
* `"|"`
Markers `"/"` and `"|"` are only for use in custom EEx engines
and are not implemented by default. Using them without an
appropriate implementation raises `EEx.SyntaxError`.
It must return the updated state.
"""
@callback handle_expr(state, marker :: String.t(), expr :: Macro.t()) :: state
@doc """
Invoked at the beginning of every nesting.
It must return a new state that is used only inside the nesting.
Once the nesting terminates, the current `state` is resumed.
"""
@callback handle_begin(state) :: state
@doc """
Invokes at the end of a nesting.
It must return Elixir's quoted expressions for the nesting.
"""
@callback handle_end(state) :: Macro.t()
@doc false
@deprecated "Use explicit delegation to EEx.Engine instead"
defmacro __using__(_) do
quote do
@behaviour EEx.Engine
def init(opts) do
EEx.Engine.init(opts)
end
def handle_body(state) do
EEx.Engine.handle_body(state)
end
def handle_begin(state) do
EEx.Engine.handle_begin(state)
end
def handle_end(state) do
EEx.Engine.handle_end(state)
end
def handle_text(state, text) do
EEx.Engine.handle_text(state, [], text)
end
def handle_expr(state, marker, expr) do
EEx.Engine.handle_expr(state, marker, expr)
end
defoverridable EEx.Engine
end
end
@doc """
Handles assigns in quoted expressions.
A warning will be printed on missing assigns.
Future versions will raise.
This can be added to any custom engine by invoking
`handle_assign/1` with `Macro.prewalk/2`:
def handle_expr(state, token, expr) do
expr = Macro.prewalk(expr, &EEx.Engine.handle_assign/1)
super(state, token, expr)
end
"""
@spec handle_assign(Macro.t()) :: Macro.t()
def handle_assign({:@, meta, [{name, _, atom}]}) when is_atom(name) and is_atom(atom) do
line = meta[:line] || 0
quote(line: line, do: EEx.Engine.fetch_assign!(var!(assigns), unquote(name)))
end
def handle_assign(arg) do
arg
end
@doc false
# TODO: Raise on v2.0
@spec fetch_assign!(Access.t(), Access.key()) :: term | nil
def fetch_assign!(assigns, key) do
case Access.fetch(assigns, key) do
{:ok, val} ->
val
:error ->
keys = Enum.map(assigns, &elem(&1, 0))
IO.warn(
"assign @#{key} not available in EEx template. " <>
"Please ensure all assigns are given as options. " <>
"Available assigns: #{inspect(keys)}"
)
nil
end
end
@doc "Default implementation for `c:init/1`."
def init(_opts) do
%{
binary: [],
dynamic: [],
vars_count: 0
}
end
@doc "Default implementation for `c:handle_begin/1`."
def handle_begin(state) do
check_state!(state)
%{state | binary: [], dynamic: []}
end
@doc "Default implementation for `c:handle_end/1`."
def handle_end(quoted) do
handle_body(quoted)
end
@doc "Default implementation for `c:handle_body/1`."
def handle_body(state) do
check_state!(state)
%{binary: binary, dynamic: dynamic} = state
binary = {:<<>>, [], Enum.reverse(binary)}
dynamic = [binary | dynamic]
{:__block__, [], Enum.reverse(dynamic)}
end
@doc "Default implementation for `c:handle_text/3`."
def handle_text(state, _meta, text) do
check_state!(state)
%{binary: binary} = state
%{state | binary: [text | binary]}
end
@doc "Default implementation for `c:handle_expr/3`."
def handle_expr(state, "=", ast) do
check_state!(state)
%{binary: binary, dynamic: dynamic, vars_count: vars_count} = state
var = Macro.var(:"arg#{vars_count}", __MODULE__)
ast =
quote do
unquote(var) = String.Chars.to_string(unquote(ast))
end
segment =
quote do
unquote(var) :: binary
end
%{state | dynamic: [ast | dynamic], binary: [segment | binary], vars_count: vars_count + 1}
end
def handle_expr(state, "", ast) do
%{dynamic: dynamic} = state
%{state | dynamic: [ast | dynamic]}
end
def handle_expr(_state, marker, _ast) when marker in ["/", "|"] do
raise EEx.SyntaxError,
"unsupported EEx syntax <%#{marker} %> (the syntax is valid but not supported by the current EEx engine)"
end
defp check_state!(%{binary: _, dynamic: _, vars_count: _}), do: :ok
defp check_state!(state) do
raise "unexpected EEx.Engine state: #{inspect(state)}. " <>
"This typically means a bug or an outdated EEx.Engine or tool"
end
end
================================================
FILE: lib/eex/lib/eex/smart_engine.ex
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
defmodule EEx.SmartEngine do
@moduledoc """
The default engine used by EEx.
It includes assigns (like `@foo`) and possibly other
conveniences in the future.
## Examples
iex> EEx.eval_string("<%= @foo %>", assigns: [foo: 1])
"1"
In the example above, we can access the value `foo` under
the binding `assigns` using `@foo`. This is useful because
a template, after being compiled, can receive different
assigns and would not require recompilation for each
variable set.
Assigns can also be used when compiled to a function:
# sample.eex
<%= @a + @b %>
# sample.ex
defmodule Sample do
require EEx
EEx.function_from_file(:def, :sample, "sample.eex", [:assigns])
end
# iex
Sample.sample(a: 1, b: 2)
#=> "3"
"""
@behaviour EEx.Engine
@impl true
defdelegate init(opts), to: EEx.Engine
@impl true
defdelegate handle_body(state), to: EEx.Engine
@impl true
defdelegate handle_begin(state), to: EEx.Engine
@impl true
defdelegate handle_end(state), to: EEx.Engine
@impl true
defdelegate handle_text(state, meta, text), to: EEx.Engine
@impl true
def handle_expr(state, marker, expr) do
expr = Macro.prewalk(expr, &EEx.Engine.handle_assign/1)
EEx.Engine.handle_expr(state, marker, expr)
end
end
================================================
FILE: lib/eex/lib/eex.ex
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
defmodule EEx.SyntaxError do
defexception [:file, :line, :column, :snippet, message: "syntax error"]
@impl true
def message(exception) do
%{file: file, line: line, column: column, message: message, snippet: snippet} = exception
Exception.format_file_line_column(file && Path.relative_to_cwd(file), line, column, " ") <>
message <> (snippet || "")
end
end
defmodule EEx do
@moduledoc ~S"""
EEx stands for Embedded Elixir.
Embedded Elixir allows you to embed Elixir code inside a string
in a robust way.
iex> EEx.eval_string("foo <%= bar %>", bar: "baz")
"foo baz"
This module provides three main APIs for you to use:
1. Evaluate a string (`eval_string/3`) or a file (`eval_file/3`)
directly. This is the simplest API to use but also the
slowest, since the code is evaluated at runtime and not precompiled.
2. Define a function from a string (`function_from_string/5`)
or a file (`function_from_file/5`). This allows you to embed
the template as a function inside a module which will then
be compiled. This is the preferred API if you have access
to the template at compilation time.
3. Compile a string (`compile_string/2`) or a file (`compile_file/2`)
into Elixir syntax tree. This is the API used by both functions
above and is available to you if you want to provide your own
ways of handling the compiled template.
The APIs above support several options, documented below. You may
also pass an engine which customizes how the EEx code is compiled.
## Options
All functions in this module, unless otherwise noted, accept EEx-related
options. They are:
* `:file` - the file to be used in the template. Defaults to the given
file the template is read from or to `"nofile"` when compiling from a string.
* `:line` - the line to be used as the template start. Defaults to `1`.
* `:indentation` - (since v1.11.0) an integer added to the column after every
new line. Defaults to `0`.
* `:engine` - the EEx engine to be used for compilation. Defaults to `EEx.SmartEngine`.
* `:trim` - if `true`, trims whitespace left and right of quotation as
long as at least one newline is present. All subsequent newlines and
spaces are removed but one newline is retained. Defaults to `false`.
* `:parser_options` - (since: 1.13.0) allow customizing the parsed code
that is generated. See `Code.string_to_quoted/2` for available options.
Note that the options `:file`, `:line` and `:column` are ignored if
passed in. Defaults to `Code.get_compiler_option(:parser_options)`
(which defaults to `[]` if not set).
## Tags
EEx supports multiple tags, declared below:
<% Elixir expression: executes code but discards output %>
<%= Elixir expression: executes code and prints result %>
<%% EEx quotation: returns the contents inside the tag as is %>
<%!-- Comments: they are discarded from source --%>
EEx supports additional tags, that may be used by some engines,
but they do not have a meaning by default:
<%| ... %>
<%/ ... %>
## Engine
EEx has the concept of engines which allows you to modify or
transform the code extracted from the given string or file.
By default, `EEx` uses the `EEx.SmartEngine` that provides some
conveniences on top of the simple `EEx.Engine`.
### `EEx.SmartEngine`
The smart engine uses EEx default rules and adds the `@` construct
for reading template assigns:
iex> EEx.eval_string("<%= @foo %>", assigns: [foo: 1])
"1"
In other words, `<%= @foo %>` translates to:
<%= {:ok, v} = Access.fetch(assigns, :foo); v %>
The `assigns` extension is useful when the number of variables
required by the template is not specified at compilation time.
"""
@type line :: non_neg_integer
@type column :: non_neg_integer
@type marker :: [?=] | [?/] | [?|] | []
@type metadata :: %{column: column, line: line}
@type token ::
{:comment, charlist, metadata}
| {:text, charlist, metadata}
| {:expr | :start_expr | :middle_expr | :end_expr, marker, charlist, metadata}
| {:eof, metadata}
@type tokenize_opt ::
{:file, binary()}
| {:line, line}
| {:column, column}
| {:indentation, non_neg_integer}
| {:trim, boolean()}
@type compile_opt ::
tokenize_opt
| {:engine, module()}
| {:parser_options, Code.parser_opts()}
| {atom(), term()}
@doc """
Generates a function definition from the given string.
The first argument is the kind of the generated function (`:def` or `:defp`).
The `name` argument is the name that the generated function will have.
`template` is the string containing the EEx template. `args` is a list of arguments
that the generated function will accept. They will be available inside the EEx
template.
The supported `options` are described [in the module docs](#module-options).
Additional options are passed to the underlying engine.
## Examples
iex> defmodule Sample do
...> require EEx
...> EEx.function_from_string(:def, :sample, "<%= a + b %>", [:a, :b])
...> end
iex> Sample.sample(1, 2)
"3"
"""
defmacro function_from_string(kind, name, template, args \\ [], options \\ []) do
quote bind_quoted: binding() do
info = Keyword.merge([file: __ENV__.file, line: __ENV__.line], options)
args = Enum.map(args, fn arg -> {arg, [line: info[:line]], nil} end)
compiled = EEx.compile_string(template, info)
case kind do
:def -> def unquote(name)(unquote_splicing(args)), do: unquote(compiled)
:defp -> defp unquote(name)(unquote_splicing(args)), do: unquote(compiled)
end
end
end
@doc """
Generates a function definition from the file contents.
The first argument is the kind of the generated function (`:def` or `:defp`).
The `name` argument is the name that the generated function will have.
`file` is the path to the EEx template file. `args` is a list of arguments
that the generated function will accept. They will be available inside the EEx
template.
This function is useful in case you have templates but
you want to precompile inside a module for speed.
The supported `options` are described [in the module docs](#module-options).
## Examples
# sample.eex
<%= a + b %>
# sample.ex
defmodule Sample do
require EEx
EEx.function_from_file(:def, :sample, "sample.eex", [:a, :b])
end
# iex
Sample.sample(1, 2)
#=> "3"
"""
defmacro function_from_file(kind, name, file, args \\ [], options \\ []) do
quote bind_quoted: binding() do
info = Keyword.merge([file: IO.chardata_to_string(file), line: 1], options)
args = Enum.map(args, fn arg -> {arg, [line: 1], nil} end)
compiled = EEx.compile_file(file, info)
@external_resource file
@file file
case kind do
:def -> def unquote(name)(unquote_splicing(args)), do: unquote(compiled)
:defp -> defp unquote(name)(unquote_splicing(args)), do: unquote(compiled)
end
end
end
@doc """
Gets a string `source` and generates a quoted expression
that can be evaluated by Elixir or compiled to a function.
This is useful if you want to compile a EEx template into code and inject
that code somewhere or evaluate it at runtime.
The generated quoted code will use variables defined in the template that
will be taken from the context where the code is evaluated. If you
have a template such as `<%= a + b %>`, then the returned quoted code
will use the `a` and `b` variables in the context where it's evaluated. See
examples below.
The supported `options` are described [in the module docs](#module-options).
## Examples
iex> quoted = EEx.compile_string("<%= a + b %>")
iex> {result, _bindings} = Code.eval_quoted(quoted, a: 1, b: 2)
iex> result
"3"
"""
@spec compile_string(String.t(), [compile_opt]) :: Macro.t()
def compile_string(source, options \\ []) when is_binary(source) and is_list(options) do
tokenize_opts = Keyword.take(options, [:file, :line, :column, :indentation, :trim])
case tokenize(source, tokenize_opts) do
{:ok, tokens} ->
EEx.Compiler.compile(tokens, source, options)
{:error, message, %{column: column, line: line}} ->
file = options[:file] || "nofile"
raise EEx.SyntaxError, file: file, line: line, column: column, message: message
end
end
@doc """
Gets a `filename` and generates a quoted expression
that can be evaluated by Elixir or compiled to a function.
This is useful if you want to compile a EEx template into code and inject
that code somewhere or evaluate it at runtime.
The generated quoted code will use variables defined in the template that
will be taken from the context where the code is evaluated. If you
have a template such as `<%= a + b %>`, then the returned quoted code
will use the `a` and `b` variables in the context where it's evaluated. See
examples below.
The supported `options` are described [in the module docs](#module-options).
## Examples
# sample.eex
<%= a + b %>
# In code:
quoted = EEx.compile_file("sample.eex")
{result, _bindings} = Code.eval_quoted(quoted, a: 1, b: 2)
result
#=> "3"
"""
@spec compile_file(Path.t(), [compile_opt]) :: Macro.t()
def compile_file(filename, options \\ []) when is_list(options) do
filename = IO.chardata_to_string(filename)
options = Keyword.merge([file: filename, line: 1], options)
compile_string(File.read!(filename), options)
end
@doc """
Gets a string `source` and evaluate the values using the `bindings`.
The supported `options` are described [in the module docs](#module-options).
## Examples
iex> EEx.eval_string("foo <%= bar %>", bar: "baz")
"foo baz"
"""
@spec eval_string(String.t(), keyword, [compile_opt]) :: term()
def eval_string(source, bindings \\ [], options \\ [])
when is_binary(source) and is_list(bindings) and is_list(options) do
compiled = compile_string(source, options)
do_eval(compiled, bindings, options)
end
@doc """
Gets a `filename` and evaluate the values using the `bindings`.
The supported `options` are described [in the module docs](#module-options).
## Examples
# sample.eex
foo <%= bar %>
# IEx
EEx.eval_file("sample.eex", bar: "baz")
#=> "foo baz"
"""
@spec eval_file(Path.t(), keyword, [compile_opt]) :: String.t()
def eval_file(filename, bindings \\ [], options \\ [])
when is_list(bindings) and is_list(options) do
filename = IO.chardata_to_string(filename)
options = Keyword.put_new(options, :file, filename)
compiled = compile_file(filename, options)
do_eval(compiled, bindings, options)
end
@doc """
Tokenize the given contents according to the given options.
## Options
* `:line` - An integer to start as line. Default is 1.
* `:column` - An integer to start as column. Default is 1.
* `:indentation` - An integer that indicates the indentation. Default is 0.
* `:trim` - Tells the tokenizer to either trim the content or not. Default is false.
* `:file` - Can be either a file or a string "nofile".
## Examples
iex> EEx.tokenize(~c"foo", line: 1, column: 1)
{:ok, [{:text, ~c"foo", %{column: 1, line: 1}}, {:eof, %{column: 4, line: 1}}]}
## Result
It returns `{:ok, [token]}` where a token is one of:
* `{:text, content, %{column: column, line: line}}`
* `{:expr, marker, content, %{column: column, line: line}}`
* `{:start_expr, marker, content, %{column: column, line: line}}`
* `{:middle_expr, marker, content, %{column: column, line: line}}`
* `{:end_expr, marker, content, %{column: column, line: line}}`
* `{:eof, %{column: column, line: line}}`
Or `{:error, message, %{column: column, line: line}}` in case of errors.
Note new tokens may be added in the future.
"""
@doc since: "1.14.0"
@spec tokenize([char()] | String.t(), [tokenize_opt]) ::
{:ok, [token()]} | {:error, String.t(), metadata()}
def tokenize(contents, opts \\ []) do
EEx.Compiler.tokenize(contents, opts)
end
### Helpers
defp do_eval(compiled, bindings, options) do
options = Keyword.take(options, [:file, :line, :module, :prune_binding])
{result, _} = Code.eval_quoted(compiled, bindings, options)
result
end
end
================================================
FILE: lib/eex/mix.exs
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
defmodule EEx.MixProject do
use Mix.Project
def project do
[
app: :eex,
version: System.version(),
build_per_environment: false
]
end
end
================================================
FILE: lib/eex/test/eex/smart_engine_test.exs
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
Code.require_file("../test_helper.exs", __DIR__)
defmodule EEx.SmartEngineTest do
use ExUnit.Case, async: true
test "evaluates simple string" do
assert_eval("foo bar", "foo bar")
end
test "evaluates with assigns as keywords" do
assert_eval("1", "<%= @foo %>", assigns: [foo: 1])
end
test "evaluates with assigns as a map" do
assert_eval("1", "<%= @foo %>", assigns: %{foo: 1})
end
test "error with missing assigns" do
stderr =
ExUnit.CaptureIO.capture_io(:stderr, fn ->
assert_eval("", "<%= @foo %>", assigns: %{})
end)
assert stderr =~ "assign @foo not available in EEx template"
end
test "evaluates with loops" do
assert_eval("1\n2\n3\n", "<%= for x <- [1, 2, 3] do %><%= x %>\n<% end %>")
end
test "preserves line numbers in assignments" do
result = EEx.compile_string("foo\n<%= @hello %>", engine: EEx.SmartEngine)
Macro.prewalk(result, fn
{_left, meta, [_, :hello]} ->
assert Keyword.get(meta, :line) == 2
send(self(), :found)
node ->
node
end)
assert_received :found
end
defp assert_eval(expected, actual, binding \\ []) do
result = EEx.eval_string(actual, binding, file: __ENV__.file, engine: EEx.SmartEngine)
assert result == expected
end
end
================================================
FILE: lib/eex/test/eex/tokenizer_test.exs
================================================
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
Code.require_file("../test_helper.exs", __DIR__)
defmodule EEx.TokenizerTest do
use ExUnit.Case, async: true
@opts [indentation: 0, trim: false]
test "simple charlists" do
assert EEx.tokenize(~c"foo", @opts) ==
{:ok, [{:text, ~c"foo", %{column: 1, line: 1}}, {:eof, %{column: 4, line: 1}}]}
end
test "simple strings" do
assert EEx.tokenize("foo", @opts) ==
{:ok, [{:text, ~c"foo", %{column: 1, line: 1}}, {:eof, %{column: 4, line: 1}}]}
end
test "strings with embedded code" do
assert EEx.tokenize(~c"foo <% bar %>", @opts) ==
{:ok,
[
{:text, ~c"foo ", %{column: 1, line: 1}},
{:expr, ~c"", ~c" bar ", %{column: 5, line: 1}},
{:eof, %{column: 14, line: 1}}
]}
end
test "strings with embedded equals code" do
assert EEx.tokenize(~c"foo <%= bar %>", @opts) ==
{:ok,
[
{:text, ~c"foo ", %{column: 1, line: 1}},
{:expr, ~c"=", ~c" bar ", %{column: 5, line: 1}},
{:eof, %{column: 15, line: 1}}
]}
end
test "strings with embedded slash code" do
assert EEx.tokenize(~c"foo <%/ bar %>", @opts) ==
{:ok,
[
{:text, ~c"foo ", %{column: 1, line: 1}},
{:expr, ~c"/", ~c" bar ", %{column: 5, line: 1}},
{:eof, %{column: 15, line: 1}}
]}
end
test "strings with embedded pipe code" do
assert EEx.tokenize(~c"foo <%| bar %>", @opts) ==
{:ok,
[
{:text, ~c"foo ", %{column: 1, line: 1}},
{:expr, ~c"|", ~c" bar ", %{column: 5, line: 1}},
{:eof, %{column: 15, line: 1}}
]}
end
test "strings with more than one line" do
assert EEx.tokenize(~c"foo\n<%= bar %>", @opts) ==
{:ok,
[
{:text, ~c"foo\n", %{column: 1, line: 1}},
{:expr, ~c"=", ~c" bar ", %{column: 1, line: 2}},
{:eof, %{column: 11, line: 2}}
]}
end
test "strings with more than one line and expression with more than one line" do
string = ~c"""
foo <%= bar
baz %>
<% foo %>
"""
exprs = [
{:text, ~c"foo ", %{column: 1, line: 1}},
{:expr, ~c"=", ~c" bar\n\nbaz ",
gitextract_xqgczhmk/ ├── .formatter.exs ├── .gitattributes ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── config.yml │ │ └── issue.yml │ ├── dependabot.yml │ └── workflows/ │ ├── ci.yml │ ├── codeql.yml │ ├── license_compliance.yml │ ├── markdown.yml │ ├── notify.exs │ ├── ort/ │ │ └── action.yml │ ├── posix_compliance.yml │ ├── release.yml │ ├── release_notifications.yml │ └── release_pre_built/ │ └── action.yml ├── .gitignore ├── .markdownlint-cli2.jsonc ├── .ort/ │ ├── config/ │ │ ├── config.yml │ │ └── evaluator.rules.kts │ └── package-configurations/ │ ├── eex.yml │ ├── elixir.yml │ ├── ex_unit.yml │ ├── logger.yml │ └── mix.yml ├── .ort.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── LICENSES/ │ ├── Apache-2.0.txt │ ├── LicenseRef-elixir-trademark-policy.txt │ └── LicenseRef-scancode-unicode.txt ├── Makefile ├── OPEN_SOURCE_POLICY.md ├── README.md ├── RELEASE.md ├── SECURITY.md ├── VERSION ├── bin/ │ ├── elixir │ ├── elixir.bat │ ├── elixirc │ ├── elixirc.bat │ ├── iex │ ├── iex.bat │ ├── mix │ ├── mix.bat │ └── mix.ps1 ├── lib/ │ ├── eex/ │ │ ├── lib/ │ │ │ ├── eex/ │ │ │ │ ├── compiler.ex │ │ │ │ ├── engine.ex │ │ │ │ └── smart_engine.ex │ │ │ └── eex.ex │ │ ├── mix.exs │ │ └── test/ │ │ ├── eex/ │ │ │ ├── smart_engine_test.exs │ │ │ └── tokenizer_test.exs │ │ ├── eex_test.exs │ │ ├── fixtures/ │ │ │ ├── eex_template.eex │ │ │ ├── eex_template_with_bindings.eex │ │ │ └── eex_template_with_syntax_error.eex │ │ └── test_helper.exs │ ├── elixir/ │ │ ├── Emakefile │ │ ├── lib/ │ │ │ ├── access.ex │ │ │ ├── agent/ │ │ │ │ └── server.ex │ │ │ ├── agent.ex │ │ │ ├── application.ex │ │ │ ├── atom.ex │ │ │ ├── base.ex │ │ │ ├── behaviour.ex │ │ │ ├── bitwise.ex │ │ │ ├── calendar/ │ │ │ │ ├── date.ex │ │ │ │ ├── date_range.ex │ │ │ │ ├── datetime.ex │ │ │ │ ├── duration.ex │ │ │ │ ├── iso.ex │ │ │ │ ├── naive_datetime.ex │ │ │ │ ├── time.ex │ │ │ │ └── time_zone_database.ex │ │ │ ├── calendar.ex │ │ │ ├── code/ │ │ │ │ ├── formatter.ex │ │ │ │ ├── fragment.ex │ │ │ │ ├── identifier.ex │ │ │ │ ├── normalizer.ex │ │ │ │ └── typespec.ex │ │ │ ├── code.ex │ │ │ ├── collectable.ex │ │ │ ├── config/ │ │ │ │ ├── provider.ex │ │ │ │ └── reader.ex │ │ │ ├── config.ex │ │ │ ├── dict.ex │ │ │ ├── dynamic_supervisor.ex │ │ │ ├── enum.ex │ │ │ ├── exception.ex │ │ │ ├── file/ │ │ │ │ ├── stat.ex │ │ │ │ └── stream.ex │ │ │ ├── file.ex │ │ │ ├── float.ex │ │ │ ├── function.ex │ │ │ ├── gen_event/ │ │ │ │ └── stream.ex │ │ │ ├── gen_event.ex │ │ │ ├── gen_server.ex │ │ │ ├── hash_dict.ex │ │ │ ├── hash_set.ex │ │ │ ├── inspect/ │ │ │ │ ├── algebra.ex │ │ │ │ └── error.ex │ │ │ ├── inspect.ex │ │ │ ├── integer.ex │ │ │ ├── io/ │ │ │ │ ├── ansi/ │ │ │ │ │ └── docs.ex │ │ │ │ ├── ansi.ex │ │ │ │ └── stream.ex │ │ │ ├── io.ex │ │ │ ├── json.ex │ │ │ ├── kernel/ │ │ │ │ ├── cli.ex │ │ │ │ ├── error_handler.ex │ │ │ │ ├── lexical_tracker.ex │ │ │ │ ├── parallel_compiler.ex │ │ │ │ ├── parallel_require.ex │ │ │ │ ├── special_forms.ex │ │ │ │ ├── typespec.ex │ │ │ │ └── utils.ex │ │ │ ├── kernel.ex │ │ │ ├── keyword.ex │ │ │ ├── list/ │ │ │ │ └── chars.ex │ │ │ ├── list.ex │ │ │ ├── macro/ │ │ │ │ └── env.ex │ │ │ ├── macro.ex │ │ │ ├── map.ex │ │ │ ├── map_set.ex │ │ │ ├── module/ │ │ │ │ ├── behaviour.ex │ │ │ │ ├── parallel_checker.ex │ │ │ │ ├── types/ │ │ │ │ │ ├── apply.ex │ │ │ │ │ ├── descr.ex │ │ │ │ │ ├── expr.ex │ │ │ │ │ ├── helpers.ex │ │ │ │ │ ├── of.ex │ │ │ │ │ ├── pattern.ex │ │ │ │ │ └── traverse.ex │ │ │ │ └── types.ex │ │ │ ├── module.ex │ │ │ ├── node.ex │ │ │ ├── option_parser.ex │ │ │ ├── partition_supervisor.ex │ │ │ ├── path.ex │ │ │ ├── port.ex │ │ │ ├── process.ex │ │ │ ├── protocol.ex │ │ │ ├── range.ex │ │ │ ├── record/ │ │ │ │ └── extractor.ex │ │ │ ├── record.ex │ │ │ ├── regex.ex │ │ │ ├── registry.ex │ │ │ ├── set.ex │ │ │ ├── stream/ │ │ │ │ └── reducers.ex │ │ │ ├── stream.ex │ │ │ ├── string/ │ │ │ │ └── chars.ex │ │ │ ├── string.ex │ │ │ ├── string_io.ex │ │ │ ├── supervisor/ │ │ │ │ ├── default.ex │ │ │ │ └── spec.ex │ │ │ ├── supervisor.ex │ │ │ ├── system.ex │ │ │ ├── task/ │ │ │ │ ├── supervised.ex │ │ │ │ └── supervisor.ex │ │ │ ├── task.ex │ │ │ ├── tuple.ex │ │ │ ├── uri.ex │ │ │ └── version.ex │ │ ├── mix.exs │ │ ├── pages/ │ │ │ ├── anti-patterns/ │ │ │ │ ├── code-anti-patterns.md │ │ │ │ ├── design-anti-patterns.md │ │ │ │ ├── macro-anti-patterns.md │ │ │ │ ├── process-anti-patterns.md │ │ │ │ └── what-anti-patterns.md │ │ │ ├── cheatsheets/ │ │ │ │ ├── enum-cheat.cheatmd │ │ │ │ └── types-cheat.cheatmd │ │ │ ├── getting-started/ │ │ │ │ ├── alias-require-and-import.md │ │ │ │ ├── anonymous-functions.md │ │ │ │ ├── basic-types.md │ │ │ │ ├── binaries-strings-and-charlists.md │ │ │ │ ├── case-cond-and-if.md │ │ │ │ ├── comprehensions.md │ │ │ │ ├── debugging.md │ │ │ │ ├── enumerable-and-streams.md │ │ │ │ ├── erlang-libraries.md │ │ │ │ ├── introduction.md │ │ │ │ ├── io-and-the-file-system.md │ │ │ │ ├── keywords-and-maps.md │ │ │ │ ├── lists-and-tuples.md │ │ │ │ ├── module-attributes.md │ │ │ │ ├── modules-and-functions.md │ │ │ │ ├── optional-syntax.md │ │ │ │ ├── pattern-matching.md │ │ │ │ ├── processes.md │ │ │ │ ├── protocols.md │ │ │ │ ├── recursion.md │ │ │ │ ├── sigils.md │ │ │ │ ├── structs.md │ │ │ │ ├── try-catch-and-rescue.md │ │ │ │ └── writing-documentation.md │ │ │ ├── meta-programming/ │ │ │ │ ├── domain-specific-languages.md │ │ │ │ ├── macros.md │ │ │ │ └── quote-and-unquote.md │ │ │ ├── mix-and-otp/ │ │ │ │ ├── agents.md │ │ │ │ ├── config-and-distribution.md │ │ │ │ ├── docs-tests-and-with.md │ │ │ │ ├── dynamic-supervisor.md │ │ │ │ ├── genservers.md │ │ │ │ ├── introduction-to-mix.md │ │ │ │ ├── releases.md │ │ │ │ ├── supervisor-and-application.md │ │ │ │ └── task-and-gen-tcp.md │ │ │ └── references/ │ │ │ ├── compatibility-and-deprecations.md │ │ │ ├── gradual-set-theoretic-types.md │ │ │ ├── library-guidelines.md │ │ │ ├── naming-conventions.md │ │ │ ├── operators.md │ │ │ ├── patterns-and-guards.md │ │ │ ├── sbom.md │ │ │ ├── syntax-reference.md │ │ │ ├── typespecs.md │ │ │ └── unicode-syntax.md │ │ ├── scripts/ │ │ │ ├── cover.exs │ │ │ ├── cover_record.exs │ │ │ ├── diff.exs │ │ │ ├── docs_config.exs │ │ │ ├── elixir_docs.exs │ │ │ ├── generate_app.escript │ │ │ ├── infer.exs │ │ │ ├── mix_docs.exs │ │ │ └── windows_installer/ │ │ │ ├── .gitignore │ │ │ ├── build.sh │ │ │ ├── installer.nsi │ │ │ └── update_system_path.erl │ │ ├── src/ │ │ │ ├── elixir.app.src │ │ │ ├── elixir.erl │ │ │ ├── elixir.hrl │ │ │ ├── elixir_aliases.erl │ │ │ ├── elixir_bitstring.erl │ │ │ ├── elixir_bootstrap.erl │ │ │ ├── elixir_clauses.erl │ │ │ ├── elixir_code_server.erl │ │ │ ├── elixir_compiler.erl │ │ │ ├── elixir_config.erl │ │ │ ├── elixir_def.erl │ │ │ ├── elixir_dispatch.erl │ │ │ ├── elixir_env.erl │ │ │ ├── elixir_erl.erl │ │ │ ├── elixir_erl_clauses.erl │ │ │ ├── elixir_erl_compiler.erl │ │ │ ├── elixir_erl_for.erl │ │ │ ├── elixir_erl_pass.erl │ │ │ ├── elixir_erl_try.erl │ │ │ ├── elixir_erl_var.erl │ │ │ ├── elixir_errors.erl │ │ │ ├── elixir_expand.erl │ │ │ ├── elixir_fn.erl │ │ │ ├── elixir_import.erl │ │ │ ├── elixir_interpolation.erl │ │ │ ├── elixir_lexical.erl │ │ │ ├── elixir_map.erl │ │ │ ├── elixir_module.erl │ │ │ ├── elixir_overridable.erl │ │ │ ├── elixir_parser.yrl │ │ │ ├── elixir_quote.erl │ │ │ ├── elixir_rewrite.erl │ │ │ ├── elixir_sup.erl │ │ │ ├── elixir_tokenizer.erl │ │ │ ├── elixir_tokenizer.hrl │ │ │ ├── elixir_utils.erl │ │ │ └── iex.erl │ │ ├── test/ │ │ │ ├── elixir/ │ │ │ │ ├── access_test.exs │ │ │ │ ├── agent_test.exs │ │ │ │ ├── application_test.exs │ │ │ │ ├── atom_test.exs │ │ │ │ ├── base_test.exs │ │ │ │ ├── bitwise_test.exs │ │ │ │ ├── calendar/ │ │ │ │ │ ├── date_range_test.exs │ │ │ │ │ ├── date_test.exs │ │ │ │ │ ├── datetime_test.exs │ │ │ │ │ ├── duration_test.exs │ │ │ │ │ ├── fakes.exs │ │ │ │ │ ├── holocene.exs │ │ │ │ │ ├── iso_test.exs │ │ │ │ │ ├── naive_datetime_test.exs │ │ │ │ │ └── time_test.exs │ │ │ │ ├── calendar_test.exs │ │ │ │ ├── changelog_test.exs │ │ │ │ ├── code_formatter/ │ │ │ │ │ ├── calls_test.exs │ │ │ │ │ ├── comments_test.exs │ │ │ │ │ ├── containers_test.exs │ │ │ │ │ ├── general_test.exs │ │ │ │ │ ├── integration_test.exs │ │ │ │ │ ├── literals_test.exs │ │ │ │ │ ├── migration_test.exs │ │ │ │ │ └── operators_test.exs │ │ │ │ ├── code_fragment_test.exs │ │ │ │ ├── code_identifier_test.exs │ │ │ │ ├── code_normalizer/ │ │ │ │ │ ├── formatted_ast_test.exs │ │ │ │ │ └── quoted_ast_test.exs │ │ │ │ ├── code_test.exs │ │ │ │ ├── collectable_test.exs │ │ │ │ ├── config/ │ │ │ │ │ ├── provider_test.exs │ │ │ │ │ └── reader_test.exs │ │ │ │ ├── config_test.exs │ │ │ │ ├── dynamic_supervisor_test.exs │ │ │ │ ├── enum_test.exs │ │ │ │ ├── exception_test.exs │ │ │ │ ├── file/ │ │ │ │ │ └── stream_test.exs │ │ │ │ ├── file_test.exs │ │ │ │ ├── fixtures/ │ │ │ │ │ ├── at_exit.exs │ │ │ │ │ ├── code_sample.exs │ │ │ │ │ ├── compile_sample.ex │ │ │ │ │ ├── configs/ │ │ │ │ │ │ ├── bad_app.exs │ │ │ │ │ │ ├── bad_import.exs │ │ │ │ │ │ ├── env.exs │ │ │ │ │ │ ├── good_config.exs │ │ │ │ │ │ ├── good_import.exs │ │ │ │ │ │ ├── good_kw.exs │ │ │ │ │ │ ├── imports_recursive.exs │ │ │ │ │ │ ├── kernel.exs │ │ │ │ │ │ ├── nested.exs │ │ │ │ │ │ └── recursive.exs │ │ │ │ │ ├── consolidation/ │ │ │ │ │ │ ├── no_impl.ex │ │ │ │ │ │ ├── sample.ex │ │ │ │ │ │ └── with_any.ex │ │ │ │ │ ├── cp_mode │ │ │ │ │ ├── cp_r/ │ │ │ │ │ │ ├── a/ │ │ │ │ │ │ │ ├── 1.txt │ │ │ │ │ │ │ └── a/ │ │ │ │ │ │ │ └── 2.txt │ │ │ │ │ │ └── b/ │ │ │ │ │ │ └── 3.txt │ │ │ │ │ ├── dialyzer/ │ │ │ │ │ │ ├── assertions.ex │ │ │ │ │ │ ├── boolean_check.ex │ │ │ │ │ │ ├── callback.ex │ │ │ │ │ │ ├── cond.ex │ │ │ │ │ │ ├── defmacrop.ex │ │ │ │ │ │ ├── for_bitstring.ex │ │ │ │ │ │ ├── for_boolean_check.ex │ │ │ │ │ │ ├── in_range.ex │ │ │ │ │ │ ├── is_struct.ex │ │ │ │ │ │ ├── macrocallback.ex │ │ │ │ │ │ ├── opaqueness.ex │ │ │ │ │ │ ├── raise.ex │ │ │ │ │ │ ├── regressions.ex │ │ │ │ │ │ ├── remote_call.ex │ │ │ │ │ │ ├── rewrite.ex │ │ │ │ │ │ ├── try.ex │ │ │ │ │ │ ├── with.ex │ │ │ │ │ │ ├── with_no_return.ex │ │ │ │ │ │ └── with_throwing_else.ex │ │ │ │ │ ├── file.txt │ │ │ │ │ ├── multiline_file.txt │ │ │ │ │ ├── utf16_be_bom.txt │ │ │ │ │ ├── utf16_le_bom.txt │ │ │ │ │ ├── utf8.txt │ │ │ │ │ └── utf8_bom.txt │ │ │ │ ├── float_test.exs │ │ │ │ ├── function_test.exs │ │ │ │ ├── gen_server_test.exs │ │ │ │ ├── inspect/ │ │ │ │ │ └── algebra_test.exs │ │ │ │ ├── inspect_test.exs │ │ │ │ ├── integer_test.exs │ │ │ │ ├── io/ │ │ │ │ │ ├── ansi/ │ │ │ │ │ │ └── docs_test.exs │ │ │ │ │ └── ansi_test.exs │ │ │ │ ├── io_test.exs │ │ │ │ ├── json_test.exs │ │ │ │ ├── kernel/ │ │ │ │ │ ├── alias_test.exs │ │ │ │ │ ├── binary_test.exs │ │ │ │ │ ├── charlist_test.exs │ │ │ │ │ ├── cli_test.exs │ │ │ │ │ ├── comprehension_test.exs │ │ │ │ │ ├── defaults_test.exs │ │ │ │ │ ├── deprecated_test.exs │ │ │ │ │ ├── diagnostics_test.exs │ │ │ │ │ ├── dialyzer_test.exs │ │ │ │ │ ├── docs_test.exs │ │ │ │ │ ├── errors_test.exs │ │ │ │ │ ├── expansion_test.exs │ │ │ │ │ ├── fn_test.exs │ │ │ │ │ ├── guard_test.exs │ │ │ │ │ ├── impl_test.exs │ │ │ │ │ ├── import_test.exs │ │ │ │ │ ├── lexical_tracker_test.exs │ │ │ │ │ ├── macros_test.exs │ │ │ │ │ ├── overridable_test.exs │ │ │ │ │ ├── parallel_compiler_test.exs │ │ │ │ │ ├── parser_test.exs │ │ │ │ │ ├── quote_test.exs │ │ │ │ │ ├── raise_test.exs │ │ │ │ │ ├── sigils_test.exs │ │ │ │ │ ├── special_forms_test.exs │ │ │ │ │ ├── string_tokenizer_test.exs │ │ │ │ │ ├── tracers_test.exs │ │ │ │ │ ├── warning_test.exs │ │ │ │ │ └── with_test.exs │ │ │ │ ├── kernel_test.exs │ │ │ │ ├── keyword_test.exs │ │ │ │ ├── list/ │ │ │ │ │ └── chars_test.exs │ │ │ │ ├── list_test.exs │ │ │ │ ├── macro/ │ │ │ │ │ └── env_test.exs │ │ │ │ ├── macro_test.exs │ │ │ │ ├── map_set_test.exs │ │ │ │ ├── map_test.exs │ │ │ │ ├── module/ │ │ │ │ │ └── types/ │ │ │ │ │ ├── descr_test.exs │ │ │ │ │ ├── expr_test.exs │ │ │ │ │ ├── helpers_test.exs │ │ │ │ │ ├── infer_test.exs │ │ │ │ │ ├── integration_test.exs │ │ │ │ │ ├── map_test.exs │ │ │ │ │ ├── pattern_test.exs │ │ │ │ │ └── type_helper.exs │ │ │ │ ├── module_test.exs │ │ │ │ ├── option_parser_test.exs │ │ │ │ ├── partition_supervisor_test.exs │ │ │ │ ├── path_test.exs │ │ │ │ ├── port_test.exs │ │ │ │ ├── process_test.exs │ │ │ │ ├── protocol/ │ │ │ │ │ └── consolidation_test.exs │ │ │ │ ├── protocol_test.exs │ │ │ │ ├── range_test.exs │ │ │ │ ├── record_test.exs │ │ │ │ ├── regex_test.exs │ │ │ │ ├── registry/ │ │ │ │ │ ├── duplicate_test.exs │ │ │ │ │ └── unique_test.exs │ │ │ │ ├── registry_test.exs │ │ │ │ ├── stream_test.exs │ │ │ │ ├── string/ │ │ │ │ │ └── chars_test.exs │ │ │ │ ├── string_io_test.exs │ │ │ │ ├── string_test.exs │ │ │ │ ├── supervisor_test.exs │ │ │ │ ├── system_test.exs │ │ │ │ ├── task/ │ │ │ │ │ └── supervisor_test.exs │ │ │ │ ├── task_test.exs │ │ │ │ ├── test_helper.exs │ │ │ │ ├── tuple_test.exs │ │ │ │ ├── typespec_test.exs │ │ │ │ ├── uri_test.exs │ │ │ │ └── version_test.exs │ │ │ └── erlang/ │ │ │ ├── atom_test.erl │ │ │ ├── control_test.erl │ │ │ ├── function_test.erl │ │ │ ├── string_test.erl │ │ │ ├── test_helper.erl │ │ │ └── tokenizer_test.erl │ │ └── unicode/ │ │ ├── IdentifierType.txt │ │ ├── PropList.txt │ │ ├── PropertyValueAliases.txt │ │ ├── ScriptExtensions.txt │ │ ├── Scripts.txt │ │ ├── SpecialCasing.txt │ │ ├── UnicodeData.txt │ │ ├── confusables.txt │ │ ├── security.ex │ │ ├── tokenizer.ex │ │ └── unicode.ex │ ├── ex_unit/ │ │ ├── examples/ │ │ │ ├── difference.exs │ │ │ └── one_of_each.exs │ │ ├── lib/ │ │ │ ├── ex_unit/ │ │ │ │ ├── assertions.ex │ │ │ │ ├── callbacks.ex │ │ │ │ ├── capture_io.ex │ │ │ │ ├── capture_log.ex │ │ │ │ ├── capture_server.ex │ │ │ │ ├── case.ex │ │ │ │ ├── case_template.ex │ │ │ │ ├── cli_formatter.ex │ │ │ │ ├── diff.ex │ │ │ │ ├── doc_test.ex │ │ │ │ ├── event_manager.ex │ │ │ │ ├── failures_manifest.ex │ │ │ │ ├── filters.ex │ │ │ │ ├── formatter.ex │ │ │ │ ├── on_exit_handler/ │ │ │ │ │ └── supervisor.ex │ │ │ │ ├── on_exit_handler.ex │ │ │ │ ├── runner.ex │ │ │ │ ├── runner_stats.ex │ │ │ │ └── server.ex │ │ │ └── ex_unit.ex │ │ ├── mix.exs │ │ └── test/ │ │ ├── ex_unit/ │ │ │ ├── assertions_test.exs │ │ │ ├── callbacks_test.exs │ │ │ ├── capture_io_test.exs │ │ │ ├── capture_log_test.exs │ │ │ ├── case_template_test.exs │ │ │ ├── case_test.exs │ │ │ ├── describe_test.exs │ │ │ ├── diff_test.exs │ │ │ ├── doc_test_test.exs │ │ │ ├── failures_manifest_test.exs │ │ │ ├── filters_test.exs │ │ │ ├── formatter_test.exs │ │ │ ├── register_test.exs │ │ │ ├── runner_stats_test.exs │ │ │ └── supervised_test.exs │ │ ├── ex_unit_test.exs │ │ ├── fixtures/ │ │ │ ├── failing.md │ │ │ └── passing.md │ │ └── test_helper.exs │ ├── iex/ │ │ ├── lib/ │ │ │ ├── iex/ │ │ │ │ ├── app.ex │ │ │ │ ├── autocomplete.ex │ │ │ │ ├── broker.ex │ │ │ │ ├── config.ex │ │ │ │ ├── evaluator.ex │ │ │ │ ├── helpers.ex │ │ │ │ ├── history.ex │ │ │ │ ├── info.ex │ │ │ │ ├── introspection.ex │ │ │ │ ├── mix_listener.ex │ │ │ │ ├── pry.ex │ │ │ │ └── server.ex │ │ │ └── iex.ex │ │ ├── mix.exs │ │ └── test/ │ │ ├── iex/ │ │ │ ├── autocomplete_test.exs │ │ │ ├── config_test.exs │ │ │ ├── helpers_test.exs │ │ │ ├── info_test.exs │ │ │ ├── interaction_test.exs │ │ │ ├── pry_test.exs │ │ │ └── server_test.exs │ │ └── test_helper.exs │ ├── logger/ │ │ ├── lib/ │ │ │ ├── logger/ │ │ │ │ ├── app.ex │ │ │ │ ├── backends/ │ │ │ │ │ ├── config.ex │ │ │ │ │ ├── console.ex │ │ │ │ │ ├── handler.ex │ │ │ │ │ ├── internal.ex │ │ │ │ │ ├── supervisor.ex │ │ │ │ │ └── watcher.ex │ │ │ │ ├── formatter.ex │ │ │ │ ├── translator.ex │ │ │ │ └── utils.ex │ │ │ └── logger.ex │ │ ├── mix.exs │ │ └── test/ │ │ ├── logger/ │ │ │ ├── backends/ │ │ │ │ ├── console_test.exs │ │ │ │ └── handler_test.exs │ │ │ ├── backends_test.exs │ │ │ ├── formatter_test.exs │ │ │ ├── translator_test.exs │ │ │ └── utils_test.exs │ │ ├── logger_test.exs │ │ └── test_helper.exs │ └── mix/ │ ├── lib/ │ │ ├── mix/ │ │ │ ├── app_loader.ex │ │ │ ├── cli.ex │ │ │ ├── compilers/ │ │ │ │ ├── elixir.ex │ │ │ │ ├── erlang.ex │ │ │ │ ├── protocol.ex │ │ │ │ └── test.ex │ │ │ ├── config.ex │ │ │ ├── dep/ │ │ │ │ ├── converger.ex │ │ │ │ ├── elixir_scm.ex │ │ │ │ ├── fetcher.ex │ │ │ │ ├── loader.ex │ │ │ │ ├── lock.ex │ │ │ │ └── umbrella.ex │ │ │ ├── dep.ex │ │ │ ├── exceptions.ex │ │ │ ├── generator.ex │ │ │ ├── hex.ex │ │ │ ├── local/ │ │ │ │ └── installer.ex │ │ │ ├── local.ex │ │ │ ├── project.ex │ │ │ ├── project_stack.ex │ │ │ ├── pubsub/ │ │ │ │ └── subscriber.ex │ │ │ ├── pubsub.ex │ │ │ ├── rebar.ex │ │ │ ├── release.ex │ │ │ ├── remote_converger.ex │ │ │ ├── scm/ │ │ │ │ ├── git.ex │ │ │ │ └── path.ex │ │ │ ├── scm.ex │ │ │ ├── shell/ │ │ │ │ ├── io.ex │ │ │ │ ├── process.ex │ │ │ │ └── quiet.ex │ │ │ ├── shell.ex │ │ │ ├── state.ex │ │ │ ├── sync/ │ │ │ │ ├── lock.ex │ │ │ │ └── pubsub.ex │ │ │ ├── task.compiler.ex │ │ │ ├── task.ex │ │ │ ├── tasks/ │ │ │ │ ├── app.config.ex │ │ │ │ ├── app.start.ex │ │ │ │ ├── app.tree.ex │ │ │ │ ├── archive.build.ex │ │ │ │ ├── archive.check.ex │ │ │ │ ├── archive.ex │ │ │ │ ├── archive.install.ex │ │ │ │ ├── archive.uninstall.ex │ │ │ │ ├── clean.ex │ │ │ │ ├── cmd.ex │ │ │ │ ├── compile.all.ex │ │ │ │ ├── compile.app.ex │ │ │ │ ├── compile.elixir.ex │ │ │ │ ├── compile.erlang.ex │ │ │ │ ├── compile.ex │ │ │ │ ├── compile.leex.ex │ │ │ │ ├── compile.protocols.ex │ │ │ │ ├── compile.yecc.ex │ │ │ │ ├── deps.clean.ex │ │ │ │ ├── deps.compile.ex │ │ │ │ ├── deps.ex │ │ │ │ ├── deps.get.ex │ │ │ │ ├── deps.loadpaths.ex │ │ │ │ ├── deps.partition.ex │ │ │ │ ├── deps.precompile.ex │ │ │ │ ├── deps.tree.ex │ │ │ │ ├── deps.unlock.ex │ │ │ │ ├── deps.update.ex │ │ │ │ ├── do.ex │ │ │ │ ├── escript.build.ex │ │ │ │ ├── escript.ex │ │ │ │ ├── escript.install.ex │ │ │ │ ├── escript.uninstall.ex │ │ │ │ ├── eval.ex │ │ │ │ ├── format.ex │ │ │ │ ├── help.ex │ │ │ │ ├── iex.ex │ │ │ │ ├── loadconfig.ex │ │ │ │ ├── loadpaths.ex │ │ │ │ ├── local.ex │ │ │ │ ├── local.hex.ex │ │ │ │ ├── local.rebar.ex │ │ │ │ ├── new.ex │ │ │ │ ├── profile.cprof.ex │ │ │ │ ├── profile.eprof.ex │ │ │ │ ├── profile.fprof.ex │ │ │ │ ├── profile.tprof.ex │ │ │ │ ├── release.ex │ │ │ │ ├── release.init.ex │ │ │ │ ├── run.ex │ │ │ │ ├── test.coverage.ex │ │ │ │ ├── test.ex │ │ │ │ ├── will_recompile.ex │ │ │ │ └── xref.ex │ │ │ ├── tasks_server.ex │ │ │ └── utils.ex │ │ └── mix.ex │ ├── mix.exs │ └── test/ │ ├── fixtures/ │ │ ├── .gitignore │ │ ├── archive/ │ │ │ ├── invalid-archive-0.1.0.ez │ │ │ ├── lib/ │ │ │ │ └── local.sample.ex │ │ │ └── priv/ │ │ │ └── .dot_file │ │ ├── compile_erlang/ │ │ │ ├── include/ │ │ │ │ └── r.hrl │ │ │ └── src/ │ │ │ ├── b.erl │ │ │ ├── c.erl │ │ │ └── z.erl │ │ ├── compile_leex/ │ │ │ └── src/ │ │ │ └── test_ok.xrl │ │ ├── compile_listeners/ │ │ │ └── deps/ │ │ │ └── reloader/ │ │ │ ├── lib/ │ │ │ │ └── reloader.ex │ │ │ └── mix.exs │ │ ├── compile_yecc/ │ │ │ └── src/ │ │ │ └── test_ok.yrl │ │ ├── config.exs │ │ ├── deps_cycle/ │ │ │ ├── app1/ │ │ │ │ └── mix.exs │ │ │ └── app2/ │ │ │ └── mix.exs │ │ ├── deps_status/ │ │ │ ├── _build/ │ │ │ │ └── dev/ │ │ │ │ └── lib/ │ │ │ │ ├── invalidapp/ │ │ │ │ │ └── ebin/ │ │ │ │ │ └── invalidapp.app │ │ │ │ ├── invalidvsn/ │ │ │ │ │ └── ebin/ │ │ │ │ │ └── invalidvsn.app │ │ │ │ ├── nosemver/ │ │ │ │ │ └── ebin/ │ │ │ │ │ └── nosemver.app │ │ │ │ └── ok/ │ │ │ │ └── ebin/ │ │ │ │ └── ok.app │ │ │ ├── custom/ │ │ │ │ ├── bad_deps_repo/ │ │ │ │ │ └── mix.exs │ │ │ │ ├── deps_repo/ │ │ │ │ │ └── mix.exs │ │ │ │ ├── noscm_repo/ │ │ │ │ │ └── mix.exs │ │ │ │ └── raw_repo/ │ │ │ │ ├── lib/ │ │ │ │ │ └── raw_repo.ex │ │ │ │ └── mix.exs │ │ │ └── deps/ │ │ │ ├── invalidapp/ │ │ │ │ └── mix.exs │ │ │ ├── invalidvsn/ │ │ │ │ └── .gitkeep │ │ │ ├── nosemver/ │ │ │ │ └── .gitkeep │ │ │ └── ok/ │ │ │ ├── mix.exs │ │ │ └── priv/ │ │ │ └── sample │ │ ├── escript_test/ │ │ │ ├── config/ │ │ │ │ └── config.exs │ │ │ ├── lib/ │ │ │ │ └── escript_test.ex │ │ │ ├── priv/ │ │ │ │ └── hello/ │ │ │ │ └── world.txt │ │ │ └── src/ │ │ │ └── escript_test.erl │ │ ├── no_mixfile/ │ │ │ └── lib/ │ │ │ ├── a.ex │ │ │ └── b.ex │ │ ├── rebar3 │ │ ├── rebar_dep/ │ │ │ ├── rebar.config │ │ │ ├── rebar.config.script │ │ │ └── src/ │ │ │ ├── rebar_dep.app.src │ │ │ └── rebar_dep.erl │ │ ├── rebar_dep_script/ │ │ │ ├── rebar.config │ │ │ └── rebar.config.script │ │ ├── rebar_override/ │ │ │ └── rebar.config.script │ │ ├── release_test/ │ │ │ ├── config/ │ │ │ │ └── config.exs │ │ │ ├── lib/ │ │ │ │ └── release_test.ex │ │ │ ├── mix.exs │ │ │ └── priv/ │ │ │ └── hello │ │ ├── test_failed/ │ │ │ ├── mix.exs │ │ │ └── test/ │ │ │ ├── only_failing_test_failed.exs │ │ │ ├── only_passing_test_failed.exs │ │ │ ├── passing_and_failing_test_failed.exs │ │ │ └── test_helper.exs │ │ ├── test_stale/ │ │ │ ├── lib/ │ │ │ │ ├── a.ex │ │ │ │ └── b.ex │ │ │ ├── mix.exs │ │ │ └── test/ │ │ │ ├── a_test_stale.exs │ │ │ ├── b_test_stale.exs │ │ │ └── test_helper.exs │ │ ├── umbrella_dep/ │ │ │ ├── deps/ │ │ │ │ └── umbrella/ │ │ │ │ ├── apps/ │ │ │ │ │ ├── bar/ │ │ │ │ │ │ ├── lib/ │ │ │ │ │ │ │ └── bar.ex │ │ │ │ │ │ └── mix.exs │ │ │ │ │ ├── dont_error_on_files │ │ │ │ │ ├── dont_error_on_missing_mixfile/ │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── foo/ │ │ │ │ │ ├── lib/ │ │ │ │ │ │ └── foo.ex │ │ │ │ │ └── mix.exs │ │ │ │ └── mix.exs │ │ │ └── mix.exs │ │ └── umbrella_test/ │ │ ├── apps/ │ │ │ ├── bar/ │ │ │ │ ├── lib/ │ │ │ │ │ └── bar.ex │ │ │ │ ├── mix.exs │ │ │ │ └── test/ │ │ │ │ ├── bar_tests.exs │ │ │ │ └── test_helper.exs │ │ │ └── foo/ │ │ │ ├── lib/ │ │ │ │ └── foo.ex │ │ │ ├── mix.exs │ │ │ └── test/ │ │ │ ├── foo_tests.exs │ │ │ └── test_helper.exs │ │ └── mix.exs │ ├── mix/ │ │ ├── aliases_test.exs │ │ ├── cli_test.exs │ │ ├── dep/ │ │ │ ├── converger_test.exs │ │ │ └── lock_test.exs │ │ ├── dep_test.exs │ │ ├── generator_test.exs │ │ ├── local/ │ │ │ └── installer_test.exs │ │ ├── local_test.exs │ │ ├── project_test.exs │ │ ├── rebar_test.exs │ │ ├── release_test.exs │ │ ├── scm/ │ │ │ └── git_test.exs │ │ ├── scm_test.exs │ │ ├── shell/ │ │ │ ├── io_test.exs │ │ │ └── quiet_test.exs │ │ ├── shell_test.exs │ │ ├── sync/ │ │ │ ├── lock_test.exs │ │ │ └── pubsub_test.exs │ │ ├── task_test.exs │ │ ├── tasks/ │ │ │ ├── app.config_test.exs │ │ │ ├── app.start_test.exs │ │ │ ├── app.tree_test.exs │ │ │ ├── archive_test.exs │ │ │ ├── clean_test.exs │ │ │ ├── cmd_test.exs │ │ │ ├── compile.app_test.exs │ │ │ ├── compile.elixir_test.exs │ │ │ ├── compile.erlang_test.exs │ │ │ ├── compile.leex_test.exs │ │ │ ├── compile.yecc_test.exs │ │ │ ├── compile_test.exs │ │ │ ├── deps.git_test.exs │ │ │ ├── deps.path_test.exs │ │ │ ├── deps.tree_test.exs │ │ │ ├── deps_test.exs │ │ │ ├── do_test.exs │ │ │ ├── escript_test.exs │ │ │ ├── eval_test.exs │ │ │ ├── format_test.exs │ │ │ ├── help_test.exs │ │ │ ├── iex_test.exs │ │ │ ├── loadconfig_test.exs │ │ │ ├── local_test.exs │ │ │ ├── new_test.exs │ │ │ ├── profile.cprof_test.exs │ │ │ ├── profile.eprof_test.exs │ │ │ ├── profile.fprof_test.exs │ │ │ ├── profile.tprof_test.exs │ │ │ ├── release.init_test.exs │ │ │ ├── release_test.exs │ │ │ ├── run_test.exs │ │ │ ├── test_test.exs │ │ │ ├── will_recompile_test.exs │ │ │ └── xref_test.exs │ │ ├── umbrella_test.exs │ │ └── utils_test.exs │ ├── mix_test.exs │ └── test_helper.exs ├── man/ │ ├── common │ ├── elixir.1.in │ ├── elixirc.1 │ ├── iex.1.in │ └── mix.1 └── project.spdx.yml
Showing preview only (843K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (10028 symbols across 530 files)
FILE: lib/eex/lib/eex.ex
class EEx (line 17) | defmodule EEx
class EEx.SyntaxError (line 5) | defmodule EEx.SyntaxError
method message (line 9) | def message(exception) do
method tokenize (line 360) | def tokenize(contents, opts \\ []) do
method do_eval (line 366) | defp do_eval(compiled, bindings, options) do
FILE: lib/eex/lib/eex/compiler.ex
class EEx.Compiler (line 5) | defmodule EEx.Compiler
method tokenize (line 39) | defp tokenize(~c"<%%" ++ t, line, column, state, buffer, acc) do
method tokenize (line 43) | defp tokenize(~c"<%!--" ++ t, line, column, state, buffer, acc) do
method tokenize (line 56) | defp tokenize(~c"<%#" ++ t, line, column, state, buffer, acc) do
method tokenize (line 72) | defp tokenize(~c"<%" ++ t, line, column, state, buffer, acc) do
method tokenize (line 110) | defp tokenize([?\n | t], line, _column, state, buffer, acc) do
method tokenize (line 114) | defp tokenize([h | t], line, column, state, buffer, acc) do
method tokenize (line 118) | defp tokenize([], line, column, _state, buffer, acc) do
method trim_and_tokenize (line 123) | defp trim_and_tokenize(rest, line, column, state, buffer, acc, fun) do
method retrieve_marker (line 136) | defp retrieve_marker(t) do
method comment (line 142) | defp comment([?-, ?-, ?%, ?> | t], line, column, _state, buffer) do
method comment (line 146) | defp comment([?\n | t], line, _column, state, buffer) do
method comment (line 150) | defp comment([head | t], line, column, state, buffer) do
method comment (line 154) | defp comment([], _line, _column, _state, _buffer) do
method expr (line 160) | defp expr([?%, ?> | t], line, column, _state, buffer) do
method expr (line 164) | defp expr([?\n | t], line, _column, state, buffer) do
method expr (line 168) | defp expr([h | t], line, column, state, buffer) do
method expr (line 172) | defp expr([], _line, _column, _state, _buffer) do
method token_key (line 177) | defp token_key(rev_tokens, expr) do
method drop_eol (line 209) | defp drop_eol([{:eol, _} | rest]), do: drop_eol(rest)
method drop_eol (line 210) | defp drop_eol(rest), do: rest
method maybe_append_space (line 212) | defp maybe_append_space([?\s]), do: [?\s]
method maybe_append_space (line 213) | defp maybe_append_space([h]), do: [h, ?\s]
method maybe_append_space (line 214) | defp maybe_append_space([h | t]), do: [h | maybe_append_space(t)]
method closing_bracket? (line 217) | defp closing_bracket?(_), do: false
method tokenize_text (line 222) | defp tokenize_text([{_line, _column}], acc) do
method tokenize_text (line 226) | defp tokenize_text(buffer, acc) do
method trim_if_needed (line 233) | defp trim_if_needed(rest, line, column, state, buffer) do
method trim_init (line 246) | defp trim_init([?\r, ?\n | t], line, _column, state),
method trim_init (line 249) | defp trim_init([?\n | t], line, _column, state),
method trim_init (line 252) | defp trim_init([?<, ?% | _] = rest, line, column, _state),
method trim_init (line 255) | defp trim_init(_, _, _, _), do: false
method trim_left (line 257) | defp trim_left(buffer, count) do
method trim_right (line 266) | defp trim_right(rest, line, column, last_column, state) do
method trim_whitespace (line 286) | defp trim_whitespace(list, column), do: {list, column}
method compile (line 294) | def compile(tokens, source, opts) do
method generate_buffer (line 324) | defp generate_buffer([{:comment, _chars, _meta} | rest], buffer, scope...
method generate_buffer (line 331) | defp generate_buffer([{:text, chars, meta} | rest], buffer, scope, sta...
method generate_buffer (line 344) | defp generate_buffer([{:expr, mark, chars, meta} | rest], buffer, scop...
method generate_buffer (line 354) | defp generate_buffer(
method generate_buffer (line 383) | defp generate_buffer(
method generate_buffer (line 400) | defp generate_buffer([{:middle_expr, _, chars, meta} | _tokens], _buff...
method generate_buffer (line 405) | defp generate_buffer(
method generate_buffer (line 418) | defp generate_buffer([{:end_expr, _, chars, meta} | _], _buffer, [], s...
method generate_buffer (line 423) | defp generate_buffer([{:eof, _meta}], buffer, [], state) do
method generate_buffer (line 427) | defp generate_buffer([{:eof, _meta}], _buffer, [{content, line, column...
method non_whitespace_meta (line 436) | defp non_whitespace_meta([?\n | rest], line, _column, state),
method non_whitespace_meta (line 439) | defp non_whitespace_meta(_, line, column, _),
method wrap_expr (line 444) | defp wrap_expr(current, line, buffer, chars, state) do
method look_ahead_middle (line 456) | defp look_ahead_middle([{:comment, _comment, _meta} | rest], start, co...
method look_ahead_middle (line 459) | defp look_ahead_middle([{:text, text, _meta} | rest], start, contents) do
method look_ahead_middle (line 467) | defp look_ahead_middle([{:middle_expr, _, chars, meta} | rest], _start...
method look_ahead_middle (line 471) | defp look_ahead_middle(_tokens, _start, _contents) do
method only_spaces? (line 475) | defp only_spaces?(chars) do
method insert_quoted (line 481) | defp insert_quoted({:__EEX__, _, [key]}, quoted) do
method insert_quoted (line 486) | defp insert_quoted({left, line, right}, quoted) do
method insert_quoted (line 490) | defp insert_quoted({left, right}, quoted) do
method insert_quoted (line 498) | defp insert_quoted(other, _quoted) do
method column (line 502) | defp column(column, mark) do
method syntax_error! (line 507) | defp syntax_error!(message, meta, state) do
method code_snippet (line 516) | defp code_snippet(source, indentation, meta) do
FILE: lib/eex/lib/eex/engine.ex
class EEx.Engine (line 5) | defmodule EEx.Engine
method handle_assign (line 133) | def handle_assign(arg) do
method fetch_assign! (line 140) | def fetch_assign!(assigns, key) do
method init (line 159) | def init(_opts) do
method handle_begin (line 168) | def handle_begin(state) do
method handle_end (line 174) | def handle_end(quoted) do
method handle_body (line 179) | def handle_body(state) do
method handle_text (line 188) | def handle_text(state, _meta, text) do
method handle_expr (line 195) | def handle_expr(state, "=", ast) do
method handle_expr (line 213) | def handle_expr(state, "", ast) do
method check_state! (line 223) | defp check_state!(%{binary: _, dynamic: _, vars_count: _}), do: :ok
method check_state! (line 225) | defp check_state!(state) do
FILE: lib/eex/lib/eex/smart_engine.ex
class EEx.SmartEngine (line 5) | defmodule EEx.SmartEngine
method handle_expr (line 58) | def handle_expr(state, marker, expr) do
FILE: lib/eex/mix.exs
class EEx.MixProject (line 5) | defmodule EEx.MixProject
method project (line 8) | def project do
FILE: lib/eex/test/eex/smart_engine_test.exs
class EEx.SmartEngineTest (line 7) | defmodule EEx.SmartEngineTest
method assert_eval (line 50) | defp assert_eval(expected, actual, binding \\ []) do
FILE: lib/eex/test/eex/tokenizer_test.exs
class EEx.TokenizerTest (line 7) | defmodule EEx.TokenizerTest
FILE: lib/eex/test/eex_test.exs
class Clause (line 42) | defmodule Clause
class EExTest (line 50) | defmodule EExTest
class EExTest.Compiled (line 9) | defmodule EExTest.Compiled
method before_compile (line 10) | def before_compile do
method file_sample (line 22) | def file_sample(arg), do: private_file_sample(arg)
method after_compile (line 24) | def after_compile do
method unknown (line 29) | def unknown do
method get_stacktrace (line 33) | defp get_stacktrace do
method strip_ansi (line 1006) | defp strip_ansi(doc) do
method assert_eval (line 1010) | defp assert_eval(expected, actual, binding \\ [], opts \\ []) do
method assert_normalized_newline_equal (line 1016) | defp assert_normalized_newline_equal(expected, actual) do
method tuple_map (line 1020) | def tuple_map({list, callback}) do
method switching_map (line 1024) | def switching_map(list, a, b) do
class TestEngine (line 930) | defmodule TestEngine
method init (line 933) | def init(_opts) do
method handle_body (line 937) | def handle_body(body) do
method handle_begin (line 941) | def handle_begin(_) do
method handle_end (line 945) | def handle_end(buffer) do
method handle_text (line 949) | def handle_text(buffer, meta, text) do
method handle_expr (line 953) | def handle_expr(buffer, "/", expr) do
method handle_expr (line 957) | def handle_expr(buffer, "=", expr) do
method handle_expr (line 961) | def handle_expr(buffer, mark, expr) do
FILE: lib/elixir/lib/access.ex
class Access (line 5) | defmodule Access
method fetch (line 247) | def fetch(container, key)
method fetch (line 249) | def fetch(%module{} = container, key) do
method fetch (line 275) | def fetch(nil, _key) do
method fetch! (line 291) | def fetch!(container, key) do
method get (line 318) | def get(container, key, default \\ nil)
method get (line 324) | def get(%module{} = container, key, default) do
method get (line 369) | def get(nil, _key, default) do
method get_and_update (line 398) | def get_and_update(container, key, fun)
method get_and_update (line 400) | def get_and_update(%module{} = container, key, fun) do
method get_and_update (line 435) | def get_and_update(nil, key, _fun) do
method pop (line 466) | def pop(%module{} = container, key) do
method pop (line 481) | def pop(nil, key) do
method key (line 524) | def key(key, default \\ nil) do
method key! (line 584) | def key!(key) do
method all (line 686) | def all() do
method all (line 698) | defp all(_op, data, _next) do
method all (line 702) | defp all([head | rest], next, gets, updates) do
method all (line 709) | defp all([], _next, gets, updates) do
method at (line 777) | defp at(_op, data, _index, _next) do
method get_and_update_at (line 781) | defp get_and_update_at([head | rest], 0, next, updates, _default_fun) do
method get_and_update_at (line 802) | defp get_and_update_at([], _index, _next, updates, default_fun) do
method at! (line 837) | defp at!(_op, data, _index, _next) do
method filter (line 896) | defp filter(_op, data, _func, _next) do
method get_and_update_filter (line 900) | defp get_and_update_filter([head | rest], func, next, updates, gets) do
method get_and_update_filter (line 914) | defp get_and_update_filter([], _func, _next, updates, gets) do
method slice (line 968) | def slice(%Range{} = range) do
method slice (line 993) | defp slice(_op, data, _range, _next) do
method values (line 1036) | def values do
method values (line 1040) | defp values(:get, data = %{}, next) do
method values (line 1044) | defp values(:get_and_update, data = %{}, next) do
method values (line 1056) | defp values(op, data = [], next) do
method values (line 1064) | defp values(_op, data, _next) do
method values_keyword (line 1068) | defp values_keyword(:get, data, next) do
method values_keyword (line 1072) | defp values_keyword(:get_and_update, data, next) do
method normalize_range (line 1092) | defp normalize_range(range, _list), do: range
method get_and_update_slice (line 1094) | defp get_and_update_slice([head | rest], range, next, updates, gets, i...
method get_and_update_slice (line 1115) | defp get_and_update_slice([], _range, _next, updates, gets, _index) do
method find (line 1171) | defp find(_op, data, _predicate, _next) do
method get_and_update_find (line 1175) | defp get_and_update_find([], updates, _predicate, _next) do
method get_and_update_find (line 1179) | defp get_and_update_find([head | rest], updates, predicate, next) do
FILE: lib/elixir/lib/agent.ex
class Agent (line 5) | defmodule Agent
method child_spec (line 204) | def child_spec(arg) do
method start_link (line 292) | def start_link(module, fun, args, options \\ []) do
method start (line 319) | def start(module, fun, args, options \\ []) do
method get (line 356) | def get(agent, module, fun, args, timeout \\ 5000) do
method get_and_update (line 397) | def get_and_update(agent, module, fun, args, timeout \\ 5000) do
method update (line 447) | def update(agent, module, fun, args, timeout \\ 5000) do
method cast (line 492) | def cast(agent, module, fun, args) do
method stop (line 515) | def stop(agent, reason \\ :normal, timeout \\ :infinity) do
FILE: lib/elixir/lib/agent/server.ex
class Agent.Server (line 5) | defmodule Agent.Server
method init (line 10) | def init(fun) do
method handle_call (line 15) | def handle_call({:get, fun}, _from, state) do
method handle_call (line 19) | def handle_call({:get_and_update, fun}, _from, state) do
method handle_call (line 26) | def handle_call({:update, fun}, _from, state) do
method handle_cast (line 30) | def handle_cast({:cast, fun}, state) do
method code_change (line 34) | def code_change(_old, state, fun) do
method initial_call (line 38) | defp initial_call(mfa) do
method get_initial_call (line 49) | defp get_initial_call({mod, fun, args}) do
method run (line 53) | defp run({m, f, a}, extra), do: apply(m, f, extra ++ a)
method run (line 54) | defp run(fun, extra), do: apply(fun, extra)
FILE: lib/elixir/lib/application.ex
class Application (line 5) | defmodule Application
method compile_env (line 595) | def compile_env(%Macro.Env{} = env, app, key_or_path, default) do
method compile_env! (line 636) | def compile_env!(%Macro.Env{} = env, app, key_or_path) do
method fetch_compile_env (line 655) | defp fetch_compile_env(app, key, path, env) do
method traverse_env (line 665) | defp traverse_env(return, []), do: return
method traverse_env (line 666) | defp traverse_env(:error, _paths), do: :error
method traverse_env (line 667) | defp traverse_env({:ok, value}, [key | keys]), do: traverse_env(Access...
method fetch_env_failed_reason (line 786) | defp fetch_env_failed_reason(app, key) do
method maybe_warn_on_app_env_key (line 873) | defp maybe_warn_on_app_env_key(app, key) do
method ensure_all_started (line 927) | def ensure_all_started(app_or_apps, type_or_opts \\ [])
method app_dir (line 1050) | def app_dir(app, path)
method loaded_applications (line 1073) | def loaded_applications do
method format_error (line 1083) | def format_error(reason) do
method do_format_error (line 1095) | defp do_format_error({{:EXIT, :normal}, {mod, :start, args}}) do
method do_format_error (line 1100) | defp do_format_error({reason, {mod, :start, args}}) do
method do_format_error (line 1106) | defp do_format_error({:bad_return, {{mod, :start, args}, {:EXIT, reaso...
method do_format_error (line 1111) | defp do_format_error({:bad_return, {{mod, :start, args}, return}}) do
method do_format_error (line 1123) | defp do_format_error({:bad_application, app}) do
method do_format_error (line 1135) | defp do_format_error({:invalid_restart_type, restart}) do
method do_format_error (line 1139) | defp do_format_error({:invalid_name, name}) do
method do_format_error (line 1143) | defp do_format_error({:invalid_options, opts}) do
method do_format_error (line 1147) | defp do_format_error({:badstartspec, spec}) do
method do_format_error (line 1151) | defp do_format_error({~c"no such file or directory", file}) do
method do_format_error (line 1155) | defp do_format_error(reason) do
FILE: lib/elixir/lib/atom.ex
class Atom (line 5) | defmodule Atom
method to_string (line 62) | def to_string(atom) do
method to_charlist (line 78) | def to_charlist(atom) do
method to_char_list (line 85) | def to_char_list(atom), do: Atom.to_charlist(atom)
FILE: lib/elixir/lib/base.ex
class Base (line 5) | defmodule Base
method bad_character! (line 140) | defp bad_character!(byte) do
method maybe_pad (line 145) | defp maybe_pad(acc, false, _count), do: acc
method maybe_pad (line 146) | defp maybe_pad(acc, true, 6), do: acc <> "======"
method maybe_pad (line 147) | defp maybe_pad(acc, true, 4), do: acc <> "===="
method maybe_pad (line 148) | defp maybe_pad(acc, true, 3), do: acc <> "==="
method maybe_pad (line 149) | defp maybe_pad(acc, true, 2), do: acc <> "=="
method maybe_pad (line 150) | defp maybe_pad(acc, true, 1), do: acc <> "="
method remove_ignored (line 152) | defp remove_ignored(string, nil), do: string
method remove_ignored (line 154) | defp remove_ignored(string, :whitespace) do
method decode16 (line 269) | def decode16(string, opts \\ []) do
method decode16! (line 306) | def decode16!(string, opts \\ [])
method valid16? (line 354) | def valid16?(string, opts \\ [])
method decode32 (line 1182) | def decode32(string, opts \\ []) do
method hex_decode32 (line 1315) | def hex_decode32(string, opts \\ []) do
FILE: lib/elixir/lib/behaviour.ex
class Behaviour (line 5) | defmodule Behaviour
method split_spec (line 38) | defp split_spec({:when, _, [{:"::", _, [spec, return]}, guard]}, _defa...
method split_spec (line 42) | defp split_spec({:when, _, [spec, guard]}, default) do
method split_spec (line 46) | defp split_spec({:"::", _, [spec, return]}, _default) do
method split_spec (line 50) | defp split_spec(spec, default) do
method do_defcallback (line 54) | defp do_defcallback(kind, {spec, return, guards}) do
method do_callback (line 64) | defp do_callback(kind, name, args, return, guards) do
method ensure_not_default (line 89) | defp ensure_not_default({:\\, _, [_, _]}) do
method ensure_not_default (line 93) | defp ensure_not_default(_), do: :ok
FILE: lib/elixir/lib/bitwise.ex
class Bitwise (line 5) | defmodule Bitwise
method bnot (line 64) | def bnot(expr) do
method band (line 86) | def band(left, right) do
method bor (line 122) | def bor(left, right) do
method bxor (line 158) | def bxor(left, right) do
method bsl (line 189) | def bsl(left, right) do
method bsr (line 243) | def bsr(left, right) do
FILE: lib/elixir/lib/calendar.ex
class Calendar (line 5) | defmodule Calendar
method compatible_calendars? (line 421) | def compatible_calendars?(calendar, calendar), do: true
method compatible_calendars? (line 423) | def compatible_calendars?(calendar1, calendar2) do
method truncate (line 435) | def truncate(microsecond_tuple, :microsecond), do: microsecond_tuple
method truncate (line 437) | def truncate({microsecond, precision}, :millisecond) do
method truncate (line 442) | def truncate(_, :second), do: {0, 0}
method get_time_zone_database (line 458) | def get_time_zone_database() do
method parse (line 648) | defp parse("", _datetime, _format_options, acc),
method parse (line 651) | defp parse("%" <> rest, datetime, format_options, acc),
method parse (line 654) | defp parse(<<char, rest::binary>>, datetime, format_options, acc),
method parse_modifiers (line 657) | defp parse_modifiers("-" <> rest, width, nil, parser_data) do
method parse_modifiers (line 661) | defp parse_modifiers("0" <> rest, nil, nil, parser_data) do
method parse_modifiers (line 665) | defp parse_modifiers("_" <> rest, width, nil, parser_data) do
method parse_modifiers (line 676) | defp parse_modifiers(<<format, _::binary>> = rest, width, nil, parser_...
method parse_modifiers (line 681) | defp parse_modifiers(<<format, _::binary>> = rest, nil, pad, parser_da...
method parse_modifiers (line 685) | defp parse_modifiers(rest, width, pad, {datetime, format_options, acc}...
method default_pad (line 698) | defp default_pad(_format), do: ?0
method default_width (line 701) | defp default_width(?j), do: 3
method default_width (line 703) | defp default_width(_format), do: 0
method format_modifiers (line 706) | defp format_modifiers("%" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 711) | defp format_modifiers("a" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 722) | defp format_modifiers("A" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 733) | defp format_modifiers("b" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 743) | defp format_modifiers("B" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 753) | defp format_modifiers(
method format_modifiers (line 765) | defp format_modifiers("c" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 775) | defp format_modifiers("d" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 781) | defp format_modifiers("f" <> rest, _width, _pad, datetime, format_opti...
method format_modifiers (line 794) | defp format_modifiers("H" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 800) | defp format_modifiers("I" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 806) | defp format_modifiers("j" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 812) | defp format_modifiers("m" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 818) | defp format_modifiers("M" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 824) | defp format_modifiers("p" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 835) | defp format_modifiers("P" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 846) | defp format_modifiers("q" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 852) | defp format_modifiers("S" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 858) | defp format_modifiers("u" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 864) | defp format_modifiers(
method format_modifiers (line 876) | defp format_modifiers("x" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 886) | defp format_modifiers(
method format_modifiers (line 898) | defp format_modifiers("X" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 908) | defp format_modifiers("y" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 914) | defp format_modifiers("Y" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 927) | defp format_modifiers(
method format_modifiers (line 945) | defp format_modifiers("s" <> rest, _width, _pad, datetime, format_opti...
method format_modifiers (line 955) | defp format_modifiers(
method format_modifiers (line 973) | defp format_modifiers("z" <> rest, _width, _pad, datetime, format_opti...
method format_modifiers (line 978) | defp format_modifiers("Z" <> rest, width, pad, datetime, format_option...
method format_modifiers (line 983) | defp format_modifiers(rest, _width, _pad, _datetime, _format_options, ...
method pad_preferred (line 992) | defp pad_preferred(result, _width, _pad), do: result
method pad_leading (line 994) | defp pad_leading(string, count, padding) do
method do_pad_leading (line 999) | defp do_pad_leading(0, _, acc), do: acc
method do_pad_leading (line 1001) | defp do_pad_leading(count, padding, acc),
method apply_format (line 1012) | defp apply_format(_term, formatter, _datetime) do
method options (line 1016) | defp options(user_options) do
FILE: lib/elixir/lib/calendar/date.ex
class Date (line 5) | defmodule Date
method range (line 108) | def range(%{calendar: calendar} = first, %{calendar: calendar} = last) do
method range (line 126) | def range(%{calendar: _, year: _, month: _, day: _}, %{calendar: _, ye...
method range (line 156) | def range(
method range (line 166) | defp range(first, first_days, last, last_days, calendar, step) do
method utc_today (line 188) | def utc_today(calendar \\ Calendar.ISO)
method utc_today (line 190) | def utc_today(Calendar.ISO) do
method utc_today (line 195) | def utc_today(calendar) do
method leap_year? (line 219) | def leap_year?(date)
method leap_year? (line 221) | def leap_year?(%{calendar: calendar, year: year}) do
method days_in_month (line 240) | def days_in_month(date)
method days_in_month (line 242) | def days_in_month(%{calendar: calendar, year: year, month: month}) do
method months_in_year (line 257) | def months_in_year(date)
method months_in_year (line 259) | def months_in_year(%{calendar: calendar, year: year}) do
method new (line 286) | def new(year, month, day, calendar \\ Calendar.ISO) do
method new! (line 311) | def new!(year, month, day, calendar \\ Calendar.ISO) do
method to_string (line 335) | def to_string(date)
method to_string (line 337) | def to_string(%{calendar: calendar, year: year, month: month, day: day...
method from_iso8601 (line 360) | def from_iso8601(string, calendar \\ Calendar.ISO) do
method from_iso8601! (line 381) | def from_iso8601!(string, calendar \\ Calendar.ISO) do
method to_iso8601 (line 415) | def to_iso8601(date, format \\ :extended)
method to_erl (line 445) | def to_erl(date) do
method from_erl (line 466) | def from_erl(tuple, calendar \\ Calendar.ISO)
method from_erl (line 468) | def from_erl({year, month, day}, calendar) do
method from_erl! (line 484) | def from_erl!(tuple, calendar \\ Calendar.ISO) do
method to_gregorian_days (line 529) | def to_gregorian_days(date) do
method compare (line 559) | def compare(%{calendar: calendar} = date1, %{calendar: calendar} = dat...
method compare (line 570) | def compare(%{calendar: calendar1} = date1, %{calendar: calendar2} = d...
method before? (line 602) | def before?(date1, date2) do
method after? (line 621) | def after?(date1, date2) do
method convert (line 646) | def convert(%{calendar: calendar, year: year, month: month, day: day},...
method convert (line 650) | def convert(%{calendar: calendar} = date, target_calendar) do
method convert! (line 679) | def convert!(date, calendar) do
method add (line 718) | def add(%{calendar: Calendar.ISO} = date, days) do
method add (line 724) | def add(%{calendar: calendar} = date, days) do
method diff (line 750) | def diff(%{calendar: Calendar.ISO} = date1, %{calendar: Calendar.ISO} ...
method diff (line 758) | def diff(%{calendar: calendar1} = date1, %{calendar: calendar2} = date...
method shift (line 809) | def shift(%{calendar: calendar} = date, duration) do
method __duration__! (line 816) | def __duration__!(%Duration{} = duration) do
method __duration__! (line 821) | def __duration__!(unit_pairs) do
method validate_duration_unit! (line 839) | defp validate_duration_unit!({unit, value}) do
method to_iso_days (line 845) | def to_iso_days(%{calendar: Calendar.ISO, year: year, month: month, da...
method to_iso_days (line 849) | def to_iso_days(%{calendar: calendar, year: year, month: month, day: d...
method from_iso_days (line 853) | defp from_iso_days({days, _}, Calendar.ISO) do
method from_iso_days (line 858) | defp from_iso_days(iso_days, target_calendar) do
method day_of_week (line 908) | def day_of_week(date, starting_on \\ :default)
method day_of_week (line 910) | def day_of_week(%{calendar: calendar, year: year, month: month, day: d...
method beginning_of_week (line 938) | def beginning_of_week(date, starting_on \\ :default)
method beginning_of_week (line 940) | def beginning_of_week(%{calendar: Calendar.ISO} = date, starting_on) do
method beginning_of_week (line 956) | def beginning_of_week(%{calendar: calendar} = date, starting_on) do
method end_of_week (line 991) | def end_of_week(date, starting_on \\ :default)
method end_of_week (line 993) | def end_of_week(%{calendar: Calendar.ISO} = date, starting_on) do
method end_of_week (line 1009) | def end_of_week(%{calendar: calendar} = date, starting_on) do
method day_of_year (line 1041) | def day_of_year(date)
method day_of_year (line 1043) | def day_of_year(%{calendar: calendar, year: year, month: month, day: d...
method quarter_of_year (line 1067) | def quarter_of_year(date)
method quarter_of_year (line 1069) | def quarter_of_year(%{calendar: calendar, year: year, month: month, da...
method year_of_era (line 1092) | def year_of_era(date)
method year_of_era (line 1094) | def year_of_era(%{calendar: calendar, year: year, month: month, day: d...
method day_of_era (line 1116) | def day_of_era(date)
method day_of_era (line 1118) | def day_of_era(%{calendar: calendar, year: year, month: month, day: da...
method beginning_of_month (line 1137) | def beginning_of_month(date)
method beginning_of_month (line 1139) | def beginning_of_month(%{year: year, month: month, calendar: calendar}...
method end_of_month (line 1158) | def end_of_month(date)
method end_of_month (line 1160) | def end_of_month(%{year: year, month: month, calendar: calendar} = dat...
FILE: lib/elixir/lib/calendar/date_range.ex
class Date.Range (line 5) | defmodule Date.Range
FILE: lib/elixir/lib/calendar/datetime.ex
class DateTime (line 5) | defmodule DateTime
method utc_now (line 197) | def utc_now(calendar_or_time_unit \\ Calendar.ISO) do
method new (line 282) | def new(
method new (line 289) | def new(%Date{calendar: calendar} = date, %Time{calendar: calendar} = ...
method new (line 311) | def new(date, time, time_zone, time_zone_database) do
method new! (line 353) | def new!(
method new! (line 360) | def new!(date, time, time_zone, time_zone_database) do
method from_unix! (line 477) | def from_unix!(integer, unit \\ :second, calendar \\ Calendar.ISO) do
method from_naive (line 560) | def from_naive(
method from_naive (line 566) | def from_naive(naive_datetime, "Etc/UTC", _) do
method from_naive (line 571) | def from_naive(%{calendar: Calendar.ISO} = naive_datetime, time_zone, ...
method from_naive_with_period (line 629) | defp from_naive_with_period(naive_datetime, time_zone, period) do
method from_naive! (line 683) | def from_naive!(
method shift_zone (line 736) | def shift_zone(datetime, time_zone, time_zone_database \\ Calendar.get...
method shift_zone (line 738) | def shift_zone(%{time_zone: time_zone} = datetime, time_zone, _) do
method shift_zone (line 742) | def shift_zone(datetime, time_zone, time_zone_database) do
method shift_zone_for_iso_days_utc (line 756) | defp shift_zone_for_iso_days_utc(iso_days_utc, calendar, precision, ti...
method shift_zone! (line 802) | def shift_zone!(datetime, time_zone, time_zone_database \\ Calendar.ge...
method now (line 839) | def now(time_zone, time_zone_database \\ Calendar.get_time_zone_databa...
method now (line 841) | def now("Etc/UTC", _) do
method now (line 845) | def now(time_zone, time_zone_database) do
method now! (line 869) | def now!(time_zone, time_zone_database \\ Calendar.get_time_zone_datab...
method to_unix (line 911) | def to_unix(datetime, unit \\ :second)
method to_unix (line 913) | def to_unix(%{utc_offset: utc_offset, std_offset: std_offset} = dateti...
method to_naive (line 936) | def to_naive(datetime)
method to_naive (line 938) | def to_naive(%{
method to_date (line 977) | def to_date(datetime)
method to_date (line 979) | def to_date(%{
method to_time (line 1009) | def to_time(datetime)
method to_time (line 1011) | def to_time(%{
method to_iso8601 (line 1097) | def to_iso8601(datetime, format \\ :extended, offset \\ nil)
method to_iso8601_iodata (line 1113) | defp to_iso8601_iodata(datetime, format, nil) do
method to_iso8601_iodata (line 1133) | defp to_iso8601_iodata(
method to_iso8601_iodata (line 1155) | defp to_iso8601_iodata(datetime, format, offset) do
method shift_by_offset (line 1174) | defp shift_by_offset(%{calendar: calendar} = datetime, offset) do
method datetime_to_iodata (line 1184) | defp datetime_to_iodata(year, month, day, hour, minute, second, micros...
method from_iso8601 (line 1247) | def from_iso8601(string, format_or_calendar \\ Calendar.ISO)
method from_iso8601 (line 1275) | def from_iso8601(string, calendar, format) do
method to_gregorian_seconds (line 1369) | def to_gregorian_seconds(
method to_string (line 1421) | def to_string(%{calendar: calendar} = datetime) do
method compare (line 1475) | def compare(
method before? (line 1515) | def before?(datetime1, datetime2) do
method after? (line 1534) | def after?(datetime1, datetime2) do
method diff (line 1576) | def diff(datetime1, datetime2, unit \\ :second)
method diff (line 1578) | def diff(datetime1, datetime2, :day) do
method diff (line 1582) | def diff(datetime1, datetime2, :hour) do
method diff (line 1586) | def diff(datetime1, datetime2, :minute) do
method diff (line 1590) | def diff(
method add (line 1689) | def add(
method shift (line 1813) | def shift(datetime, duration, time_zone_database \\ Calendar.get_time_...
method shift (line 1815) | def shift(%{calendar: calendar, time_zone: "Etc/UTC"} = datetime, dura...
method shift (line 1853) | def shift(%{calendar: calendar} = datetime, duration, time_zone_databa...
method truncate (line 1928) | def truncate(%DateTime{microsecond: microsecond} = datetime, precision...
method truncate (line 1932) | def truncate(%{} = datetime_map, precision) do
method convert (line 1963) | def convert(%DateTime{calendar: calendar} = datetime, calendar) do
method convert (line 1967) | def convert(%{calendar: calendar} = datetime, calendar) do
method convert (line 1971) | def convert(%{calendar: dt_calendar, microsecond: {_, precision}} = da...
method convert! (line 2008) | def convert!(datetime, calendar) do
method to_iso_days (line 2022) | defp to_iso_days(%{
method from_iso_days (line 2035) | defp from_iso_days(iso_days, datetime, calendar, precision) do
method apply_tz_offset (line 2058) | defp apply_tz_offset(iso_days, 0) do
method apply_tz_offset (line 2062) | defp apply_tz_offset(iso_days, offset) do
method from_map (line 2066) | defp from_map(%{} = datetime_map) do
method seconds_from_day_fraction (line 2082) | defp seconds_from_day_fraction({parts_in_day, @seconds_per_day}),
method seconds_from_day_fraction (line 2085) | defp seconds_from_day_fraction({parts_in_day, parts_per_day}),
FILE: lib/elixir/lib/calendar/duration.ex
class Duration (line 4) | defmodule Duration
method new! (line 198) | def new!(%Duration{} = duration) do
method new! (line 202) | def new!(unit_pairs) do
method validate_unit! (line 212) | defp validate_unit!({:microsecond, microsecond}) do
method validate_unit! (line 227) | defp validate_unit!({unit, value}) do
method add (line 246) | def add(%Duration{} = d1, %Duration{} = d2) do
method subtract (line 276) | def subtract(%Duration{} = d1, %Duration{} = d2) do
method negate (line 329) | def negate(%Duration{microsecond: {ms, p}} = duration) do
method to_string (line 456) | def to_string(%Duration{} = duration, opts \\ []) do
method to_string_part (line 472) | defp to_string_part(0, _units, _key, _default, acc),
method to_string_part (line 475) | defp to_string_part(x, units, key, default, acc),
method to_string_year (line 478) | defp to_string_year(%{year: year} = duration, acc, units) do
method to_string_month (line 482) | defp to_string_month(%{month: month} = duration, acc, units) do
method to_string_week (line 486) | defp to_string_week(%{week: week} = duration, acc, units) do
method to_string_day (line 490) | defp to_string_day(%{day: day} = duration, acc, units) do
method to_string_hour (line 494) | defp to_string_hour(%{hour: hour} = duration, acc, units) do
method to_string_minute (line 498) | defp to_string_minute(%{minute: minute} = duration, acc, units) do
method to_string_second (line 502) | defp to_string_second(%{second: 0, microsecond: {0, _}}, acc, _units) do
method to_string_second (line 506) | defp to_string_second(%{second: s, microsecond: {ms, p}}, acc, units) do
method to_iso8601 (line 534) | def to_iso8601(%Duration{} = duration) do
method to_iso8601_duration_date (line 541) | defp to_iso8601_duration_date(%{year: 0, month: 0, week: 0, day: 0}) do
method to_iso8601_duration_date (line 545) | defp to_iso8601_duration_date(%{year: year, month: month, week: week, ...
method to_iso8601_duration_time (line 549) | defp to_iso8601_duration_time(%{hour: 0, minute: 0, second: 0, microse...
method to_iso8601_duration_time (line 553) | defp to_iso8601_duration_time(%{hour: hour, minute: minute} = d) do
method second_component (line 557) | defp second_component(%{second: 0, microsecond: {0, _}}) do
method second_component (line 561) | defp second_component(%{second: second, microsecond: {ms, p}}) do
method second_component (line 565) | defp second_component(second, _ms, 0) do
method second_component (line 569) | defp second_component(second, ms, p) do
method pair (line 584) | defp pair(0, _key), do: []
method pair (line 585) | defp pair(num, key), do: [Integer.to_string(num), key]
FILE: lib/elixir/lib/calendar/iso.ex
class Calendar.ISO (line 5) | defmodule Calendar.ISO
method time_unit_to_precision (line 288) | def time_unit_to_precision(:nanosecond), do: 6
method time_unit_to_precision (line 289) | def time_unit_to_precision(:microsecond), do: 6
method time_unit_to_precision (line 290) | def time_unit_to_precision(:millisecond), do: 3
method time_unit_to_precision (line 291) | def time_unit_to_precision(:second), do: 0
method do_parse_time (line 358) | defp do_parse_time(_, _) do
method parse_formatted_time (line 362) | defp parse_formatted_time(hour, minute, second, rest) do
method parse_date_guarded (line 423) | defp parse_date_guarded("-" <> string, format),
method parse_date_guarded (line 426) | defp parse_date_guarded("+" <> string, format),
method parse_date_guarded (line 429) | defp parse_date_guarded(string, format),
method do_parse_date (line 442) | defp do_parse_date(_, _, _) do
method parse_formatted_date (line 446) | defp parse_formatted_date(year, month, day, multiplier) do
method parse_naive_datetime_guarded (line 508) | defp parse_naive_datetime_guarded("-" <> string, format),
method parse_naive_datetime_guarded (line 511) | defp parse_naive_datetime_guarded("+" <> string, format),
method parse_naive_datetime_guarded (line 514) | defp parse_naive_datetime_guarded(string, format),
method do_parse_naive_datetime (line 539) | defp do_parse_naive_datetime(_, _, _) do
method parse_formatted_naive_datetime (line 543) | defp parse_formatted_naive_datetime(year, month, day, hour, minute, se...
method parse_utc_datetime_guarded (line 612) | defp parse_utc_datetime_guarded("-" <> string, format),
method parse_utc_datetime_guarded (line 615) | defp parse_utc_datetime_guarded("+" <> string, format),
method parse_utc_datetime_guarded (line 618) | defp parse_utc_datetime_guarded(string, format),
method do_parse_utc_datetime (line 643) | defp do_parse_utc_datetime(_, _, _) do
method parse_formatted_utc_datetime (line 647) | defp parse_formatted_utc_datetime(year, month, day, hour, minute, seco...
method parse_duration (line 710) | def parse_duration(_) do
method parse_duration_date (line 714) | defp parse_duration_date("", acc, _allowed), do: {:ok, acc}
method parse_duration_date (line 720) | defp parse_duration_date(string, acc, allowed) do
method parse_duration_time (line 729) | defp parse_duration_time("", acc, _allowed), do: {:ok, acc}
method parse_duration_time (line 731) | defp parse_duration_time(string, acc, allowed) do
method find_unit (line 762) | defp find_unit([{key, unit} | rest], unit), do: {key, rest}
method find_unit (line 763) | defp find_unit([_ | rest], unit), do: find_unit(rest, unit)
method find_unit (line 764) | defp find_unit([], _unit), do: false
method naive_datetime_to_iso_days (line 792) | def naive_datetime_to_iso_days(year, month, day, hour, minute, second,...
method naive_datetime_from_iso_days (line 822) | def naive_datetime_from_iso_days({days, day_fraction}) do
method time_to_day_fraction (line 847) | def time_to_day_fraction(0, 0, 0, {0, _}) do
method time_to_day_fraction (line 851) | def time_to_day_fraction(hour, minute, second, {microsecond, _}) do
method time_from_day_fraction (line 871) | def time_from_day_fraction({0, _}) do
method time_from_day_fraction (line 875) | def time_from_day_fraction({parts_in_day, parts_per_day}) do
method divide_by_parts_per_day (line 888) | defp divide_by_parts_per_day(parts_in_day, @parts_per_day), do: parts_...
method divide_by_parts_per_day (line 890) | defp divide_by_parts_per_day(parts_in_day, parts_per_day),
method date_to_iso_days (line 895) | def date_to_iso_days(0, 1, 1), do: 0
method date_to_iso_days (line 896) | def date_to_iso_days(1970, 1, 1), do: @unix_epoch_days
method date_to_iso_days (line 898) | def date_to_iso_days(year, month, day) do
method date_from_iso_days (line 915) | def date_from_iso_days(days) do
method div_rem (line 940) | defp div_rem(int1, int2) do
method floor_div_positive_divisor (line 952) | defp floor_div_positive_divisor(int1, int2), do: -div(-int1 - 1, int2)...
method days_in_month_guarded (line 982) | defp days_in_month_guarded(year, 2) do
method days_in_month_guarded (line 987) | defp days_in_month_guarded(_, _), do: 31
method day_of_week (line 1031) | def day_of_week(year, month, day) do
method day_of_week (line 1087) | def day_of_week(year, month, day, starting_on) do
method iso_days_to_day_of_week (line 1093) | def iso_days_to_day_of_week(iso_days, starting_on) do
method day_of_week_offset (line 1097) | defp day_of_week_offset(:default), do: 5
method day_of_week_offset (line 1098) | defp day_of_week_offset(:wednesday), do: 3
method day_of_week_offset (line 1099) | defp day_of_week_offset(:thursday), do: 2
method day_of_week_offset (line 1100) | defp day_of_week_offset(:friday), do: 1
method day_of_week_offset (line 1101) | defp day_of_week_offset(:saturday), do: 0
method day_of_week_offset (line 1102) | defp day_of_week_offset(:sunday), do: 6
method day_of_week_offset (line 1103) | defp day_of_week_offset(:monday), do: 5
method day_of_week_offset (line 1104) | defp day_of_week_offset(:tuesday), do: 4
method day_of_year (line 1124) | def day_of_year(year, month, day) do
method year_of_era (line 1201) | def year_of_era(year, _month, _day), do: year_of_era(year)
method time_to_string (line 1264) | def time_to_string(
method time_to_iodata_guarded (line 1307) | defp time_to_iodata_guarded(hour, minute, second, {_, 0}, format) do
method time_to_iodata_guarded (line 1311) | defp time_to_iodata_guarded(hour, minute, second, {microsecond, precis...
method microseconds_to_iodata (line 1320) | def microseconds_to_iodata(_microsecond, 0), do: []
method microseconds_to_iodata (line 1321) | def microseconds_to_iodata(microsecond, 6), do: zero_pad(microsecond, 6)
method microseconds_to_iodata (line 1323) | def microseconds_to_iodata(microsecond, precision) do
method scale_factor (line 1328) | defp scale_factor(1), do: 100_000
method scale_factor (line 1329) | defp scale_factor(2), do: 10_000
method scale_factor (line 1330) | defp scale_factor(3), do: 1_000
method scale_factor (line 1331) | defp scale_factor(4), do: 100
method scale_factor (line 1332) | defp scale_factor(5), do: 10
method scale_factor (line 1333) | defp scale_factor(6), do: 1
method time_to_iodata_format (line 1335) | defp time_to_iodata_format(hour, minute, second, :extended) do
method time_to_iodata_format (line 1339) | defp time_to_iodata_format(hour, minute, second, :basic) do
method date_to_string (line 1368) | def date_to_string(year, month, day, format \\ :extended) do
method date_to_iodata_guarded (line 1392) | defp date_to_iodata_guarded(year, month, day, :extended) do
method date_to_iodata_guarded (line 1396) | defp date_to_iodata_guarded(year, month, day, :basic) do
method naive_datetime_to_string (line 1430) | def naive_datetime_to_string(
method naive_datetime_to_iodata (line 1480) | def naive_datetime_to_iodata(
method datetime_to_string (line 1547) | def datetime_to_string(
method offset_to_string (line 1632) | def offset_to_string(0, 0, "Etc/UTC", _format), do: "Z"
method offset_to_string (line 1634) | def offset_to_string(utc, std, zone, format) do
method offset_to_iodata (line 1640) | def offset_to_iodata(0, 0, "Etc/UTC", _format), do: ?Z
method offset_to_iodata (line 1642) | def offset_to_iodata(utc, std, _zone, format) do
method format_offset (line 1650) | defp format_offset(total, hour, minute, :extended) do
method format_offset (line 1654) | defp format_offset(total, hour, minute, :basic) do
method zone_to_iodata (line 1658) | defp zone_to_iodata(_, _, _, "Etc/UTC"), do: []
method zone_to_iodata (line 1659) | defp zone_to_iodata(_, _, abbr, zone), do: [?\s, abbr, ?\s | zone]
method day_rollover_relative_to_midnight_utc (line 1716) | def day_rollover_relative_to_midnight_utc() do
method sign (line 1721) | defp sign(_), do: ?+
method zero_pad (line 1736) | defp zero_pad(val, count) do
method iso_days_to_beginning_of_day (line 1756) | def iso_days_to_beginning_of_day({days, _day_fraction}) do
method iso_days_to_end_of_day (line 1776) | def iso_days_to_end_of_day({days, _day_fraction}) do
method shift_date (line 1796) | def shift_date(year, month, day, duration) do
method shift_naive_datetime (line 1834) | def shift_naive_datetime(year, month, day, hour, minute, second, micro...
method shift_time (line 1863) | def shift_time(hour, minute, second, microsecond, duration) do
method shift_days (line 1876) | def shift_days({year, month, day}, days) do
method shift_months (line 1885) | defp shift_months({year, month, day}, months) do
method shift_time_unit_values (line 1933) | defp shift_time_unit_values({0, _}, {_, original_precision}) do
method shift_time_unit_values (line 1937) | defp shift_time_unit_values({ms_value, ms_precision}, {_, _}) do
method shift_time_unit_values (line 1941) | defp shift_time_unit_values(value, {_, original_precision}) do
method shift_date_options (line 1945) | defp shift_date_options(%Duration{
method shift_date_options (line 1961) | defp shift_date_options(_duration) do
method shift_datetime_options (line 1966) | defp shift_datetime_options(%Duration{
method shift_time_options (line 1983) | defp shift_time_options(%Duration{
method shift_time_options (line 1999) | defp shift_time_options(_duration) do
method precision_for_unit (line 2021) | defp precision_for_unit(unit) do
method parse_microsecond (line 2033) | defp parse_microsecond("." <> rest) do
method parse_microsecond (line 2044) | defp parse_microsecond("," <> rest) do
method parse_microsecond (line 2048) | defp parse_microsecond(rest) do
method parse_microsecond (line 2058) | defp parse_microsecond(rest, precision, acc) do
method parse_offset (line 2062) | defp parse_offset(""), do: {nil, ""}
method parse_offset (line 2063) | defp parse_offset("Z"), do: {0, ""}
method parse_offset (line 2064) | defp parse_offset("-00:00"), do: :error
method parse_offset (line 2066) | defp parse_offset(<<?+, h1, h2, ?:, m1, m2, rest::binary>>),
method parse_offset (line 2069) | defp parse_offset(<<?-, h1, h2, ?:, m1, m2, rest::binary>>),
method parse_offset (line 2072) | defp parse_offset(<<?+, h1, h2, m1, m2, rest::binary>>),
method parse_offset (line 2075) | defp parse_offset(<<?-, h1, h2, m1, m2, rest::binary>>),
method parse_offset (line 2078) | defp parse_offset(<<?+, h1, h2, rest::binary>>), do: parse_offset(1, h...
method parse_offset (line 2079) | defp parse_offset(<<?-, h1, h2, rest::binary>>), do: parse_offset(-1, ...
method parse_offset (line 2080) | defp parse_offset(_), do: :error
method parse_offset (line 2082) | defp parse_offset(sign, h1, h2, m1, m2, rest) do
method gregorian_seconds_to_iso_days (line 2095) | def gregorian_seconds_to_iso_days(seconds, microsecond) do
method iso_days_to_unit (line 2103) | def iso_days_to_unit({days, {parts, ppd}}, unit) do
method add_day_fraction_to_iso_days (line 2110) | def add_day_fraction_to_iso_days({days, {parts, ppd}}, add, ppd) do
method add_day_fraction_to_iso_days (line 2114) | def add_day_fraction_to_iso_days({days, {parts, ppd}}, add, add_ppd) do
method normalize_iso_days (line 2123) | defp normalize_iso_days(days, parts, ppd) do
method leap_day_offset (line 2136) | defp leap_day_offset(year, _month) do
method days_before_month (line 2140) | defp days_before_month(1), do: 0
method days_before_month (line 2141) | defp days_before_month(2), do: 31
method days_before_month (line 2142) | defp days_before_month(3), do: 59
method days_before_month (line 2143) | defp days_before_month(4), do: 90
method days_before_month (line 2144) | defp days_before_month(5), do: 120
method days_before_month (line 2145) | defp days_before_month(6), do: 151
method days_before_month (line 2146) | defp days_before_month(7), do: 181
method days_before_month (line 2147) | defp days_before_month(8), do: 212
method days_before_month (line 2148) | defp days_before_month(9), do: 243
method days_before_month (line 2149) | defp days_before_month(10), do: 273
method days_before_month (line 2150) | defp days_before_month(11), do: 304
method days_before_month (line 2151) | defp days_before_month(12), do: 334
method iso_seconds_to_datetime (line 2153) | defp iso_seconds_to_datetime(seconds) do
FILE: lib/elixir/lib/calendar/naive_datetime.ex
class NaiveDateTime (line 5) | defmodule NaiveDateTime
method utc_now (line 115) | def utc_now(calendar_or_time_unit \\ Calendar.ISO)
method utc_now (line 121) | def utc_now(calendar) do
method local_now (line 188) | def local_now(calendar \\ Calendar.ISO)
method local_now (line 190) | def local_now(Calendar.ISO) do
method local_now (line 196) | def local_now(calendar) do
method new (line 257) | def new(year, month, day, hour, minute, second, microsecond \\ {0, 0},...
method new (line 264) | def new(year, month, day, hour, minute, second, microsecond, calendar) do
method new! (line 322) | def new!(
method new! (line 333) | def new!(year, month, day, hour, minute, second, microsecond, calendar...
method new (line 353) | def new(date, time)
method new (line 355) | def new(%Date{calendar: calendar} = date, %Time{calendar: calendar} = ...
method new! (line 384) | def new!(date, time)
method new! (line 386) | def new!(%Date{calendar: calendar} = date, %Time{calendar: calendar} =...
method add (line 460) | def add(naive_datetime, amount_to_add, unit \\ :second)
method diff (line 541) | def diff(naive_datetime1, naive_datetime2, unit \\ :second)
method diff (line 543) | def diff(naive_datetime1, naive_datetime2, :day) do
method diff (line 547) | def diff(naive_datetime1, naive_datetime2, :hour) do
method diff (line 551) | def diff(naive_datetime1, naive_datetime2, :minute) do
method diff (line 555) | def diff(
method shift (line 617) | def shift(%{calendar: calendar} = naive_datetime, duration) do
method truncate (line 676) | def truncate(%NaiveDateTime{microsecond: microsecond} = naive_datetime...
method truncate (line 680) | def truncate(
method to_date (line 718) | def to_date(%{
method to_time (line 744) | def to_time(%{
method to_string (line 789) | def to_string(%{calendar: calendar} = naive_datetime) do
method from_iso8601 (line 860) | def from_iso8601(string, calendar \\ Calendar.ISO) do
method from_iso8601! (line 895) | def from_iso8601!(string, calendar \\ Calendar.ISO) do
method to_iso8601 (line 938) | def to_iso8601(naive_datetime, format \\ :extended)
method to_iso8601_iodata (line 954) | defp to_iso8601_iodata(naive_datetime, format) do
method to_erl (line 997) | def to_erl(%{calendar: _} = naive_datetime) do
method from_erl (line 1029) | def from_erl(tuple, microsecond \\ {0, 0}, calendar \\ Calendar.ISO)
method from_erl (line 1031) | def from_erl({{year, month, day}, {hour, minute, second}}, microsecond...
method from_erl! (line 1059) | def from_erl!(tuple, microsecond \\ {0, 0}, calendar \\ Calendar.ISO) do
method from_gregorian_seconds (line 1085) | def from_gregorian_seconds(seconds, microsecond_precision \\ {0, 0}, c...
method div_rem (line 1125) | defp div_rem(int1, int2) do
method to_gregorian_seconds (line 1149) | def to_gregorian_seconds(%{
method compare (line 1204) | def compare(%{calendar: calendar1} = naive_datetime1, %{calendar: cale...
method before? (line 1236) | def before?(naive_datetime1, naive_datetime2) do
method after? (line 1255) | def after?(naive_datetime1, naive_datetime2) do
method convert (line 1282) | def convert(%NaiveDateTime{calendar: calendar} = ndt, calendar) do
method convert (line 1286) | def convert(
method convert (line 1313) | def convert(%{calendar: ndt_calendar, microsecond: {_, precision}} = n...
method convert! (line 1345) | def convert!(naive_datetime, calendar) do
method beginning_of_day (line 1378) | def beginning_of_day(%{calendar: calendar, microsecond: {_, precision}...
method end_of_day (line 1405) | def end_of_day(%{calendar: calendar, microsecond: {_, precision}} = na...
method seconds_from_day_fraction (line 1421) | defp seconds_from_day_fraction({parts_in_day, @seconds_per_day}),
method seconds_from_day_fraction (line 1424) | defp seconds_from_day_fraction({parts_in_day, parts_per_day}),
method to_iso_days (line 1428) | defp to_iso_days(%{
method from_iso_days (line 1441) | defp from_iso_days(iso_days, calendar, precision) do
FILE: lib/elixir/lib/calendar/time.ex
class Time (line 5) | defmodule Time
method utc_now (line 80) | def utc_now(calendar_or_time_unit \\ Calendar.ISO) do
method new (line 161) | def new(hour, minute, second, microsecond \\ {0, 0}, calendar \\ Calen...
method new! (line 215) | def new!(hour, minute, second, microsecond \\ {0, 0}, calendar \\ Cale...
method to_string (line 244) | def to_string(time)
method to_string (line 246) | def to_string(%{
method from_iso8601 (line 293) | def from_iso8601(string, calendar \\ Calendar.ISO) do
method from_iso8601! (line 319) | def from_iso8601!(string, calendar \\ Calendar.ISO) do
method to_iso8601 (line 353) | def to_iso8601(time, format \\ :extended)
method to_erl (line 388) | def to_erl(time) do
method from_erl (line 414) | def from_erl(tuple, microsecond \\ {0, 0}, calendar \\ Calendar.ISO)
method from_erl (line 416) | def from_erl({hour, minute, second}, microsecond, calendar) do
method from_erl! (line 437) | def from_erl!(tuple, microsecond \\ {0, 0}, calendar \\ Calendar.ISO) do
method to_seconds_after_midnight (line 500) | def to_seconds_after_midnight(%{microsecond: {microsecond, _precision}...
method add (line 560) | def add(time, amount_to_add, unit \\ :second)
method shift (line 633) | def shift(%{calendar: calendar} = time, duration) do
method __duration__! (line 649) | def __duration__!(%Duration{} = duration) do
method __duration__! (line 654) | def __duration__!(unit_pairs) do
method validate_duration_unit! (line 664) | defp validate_duration_unit!({:microsecond, microsecond}) do
method validate_duration_unit! (line 684) | defp validate_duration_unit!({unit, value}) do
method compare (line 718) | def compare(%{calendar: calendar} = time1, %{calendar: calendar} = tim...
method compare (line 729) | def compare(time1, time2) do
method before? (line 755) | def before?(time1, time2) do
method after? (line 774) | def after?(time1, time2) do
method convert (line 798) | def convert(
method convert (line 819) | def convert(%{microsecond: {_, precision}} = time, calendar) do
method convert! (line 852) | def convert!(time, calendar) do
method diff (line 901) | def diff(time1, time2, unit \\ :second)
method diff (line 903) | def diff(time1, time2, :hour) do
method diff (line 907) | def diff(time1, time2, :minute) do
method diff (line 911) | def diff(
method diff (line 935) | def diff(time1, time2, unit) do
method truncate (line 964) | def truncate(%Time{microsecond: microsecond} = time, precision) do
method to_day_fraction (line 970) | defp to_day_fraction(%{
FILE: lib/elixir/lib/calendar/time_zone_database.ex
class Calendar.TimeZoneDatabase (line 5) | defmodule Calendar.TimeZoneDatabase
class Calendar.UTCOnlyTimeZoneDatabase (line 80) | defmodule Calendar.UTCOnlyTimeZoneDatabase
method time_zone_period_from_utc_iso_days (line 90) | def time_zone_period_from_utc_iso_days(_, "Etc/UTC"),
method time_zone_period_from_utc_iso_days (line 93) | def time_zone_period_from_utc_iso_days(_, _),
method time_zone_periods_from_wall_datetime (line 97) | def time_zone_periods_from_wall_datetime(_, "Etc/UTC"),
method time_zone_periods_from_wall_datetime (line 100) | def time_zone_periods_from_wall_datetime(_, _),
FILE: lib/elixir/lib/code.ex
class Code (line 5) | defmodule Code
method required_files (line 340) | def required_files do
method loaded_files (line 346) | def loaded_files do
method cursor_context (line 352) | def cursor_context(code, options \\ []) do
method unload_files (line 386) | def unload_files(files) do
method append_path (line 417) | def append_path(path, opts \\ []) do
method prepend_path (line 448) | def prepend_path(path, opts \\ []) do
method cache (line 510) | defp cache(opts) do
method delete_path (line 538) | def delete_path(path) do
method eval_string (line 630) | def eval_string(string, binding \\ [], opts_or_env \\ [])
method eval_string (line 632) | def eval_string(string, binding, %Macro.Env{} = env) do
method validate_binding (line 642) | defp validate_binding(binding) do
method validated_eval_string (line 646) | defp validated_eval_string(string, binding, env, opts) do
method eval_verify (line 653) | defp eval_verify(fun, args) do
method with_diagnostics (line 693) | def with_diagnostics(opts \\ [], fun) do
method print_diagnostic (line 725) | def print_diagnostic(diagnostic, opts \\ []) do
method eval_quoted (line 1177) | def eval_quoted(quoted, binding \\ [], env_or_opts \\ [])
method eval_quoted (line 1179) | def eval_quoted(quoted, binding, %Macro.Env{} = env) do
method eval_quoted (line 1187) | defp eval_quoted(quoted, binding, env, opts) do
method env_for_eval (line 1219) | def env_for_eval(env_or_opts), do: :elixir.env_for_eval(env_or_opts)
method string_to_quoted_with_comments! (line 1456) | def string_to_quoted_with_comments!(string, opts \\ []) do
method preserve_comments (line 1472) | defp preserve_comments(line, column, tokens, comment, rest) do
method next_eol_count (line 1486) | defp next_eol_count([?\s | rest], count), do: next_eol_count(rest, count)
method next_eol_count (line 1487) | defp next_eol_count([?\t | rest], count), do: next_eol_count(rest, count)
method next_eol_count (line 1488) | defp next_eol_count([?\n | rest], count), do: next_eol_count(rest, cou...
method next_eol_count (line 1489) | defp next_eol_count([?\r, ?\n | rest], count), do: next_eol_count(rest...
method next_eol_count (line 1490) | defp next_eol_count(_, count), do: count
method last_comment_distance (line 1492) | defp last_comment_distance([%{line: last_line} | _], line), do: line -...
method last_comment_distance (line 1493) | defp last_comment_distance([], _line), do: :infinity
method previous_eol_count (line 1500) | defp previous_eol_count([]), do: 1
method previous_eol_count (line 1501) | defp previous_eol_count(_), do: 0
method quoted_to_algebra (line 1560) | def quoted_to_algebra(quoted, opts \\ []) do
method compiler_options (line 1660) | def compiler_options do
method compiler_options (line 1683) | def compiler_options(opts) do
method get_compiler_option (line 1709) | def get_compiler_option(:warnings_as_errors) do
method available_compiler_options (line 1726) | def available_compiler_options do
method put_compiler_option (line 1856) | def put_compiler_option(:module_definition, value) do
method put_compiler_option (line 1865) | def put_compiler_option(:infer_signatures, value) do
method put_compiler_option (line 1885) | def put_compiler_option(:no_warn_undefined, value) do
method put_compiler_option (line 1896) | def put_compiler_option(:warnings_as_errors, _value) do
method put_compiler_option (line 1924) | def put_compiler_option(key, _value) do
method purge_compiler_modules (line 1948) | def purge_compiler_modules() do
method ensure_loaded! (line 2060) | def ensure_loaded!(module) do
method ensure_all_loaded! (line 2101) | def ensure_all_loaded!(modules) do
method ensure_compiled! (line 2169) | def ensure_compiled!(module) do
method ensure_compiled (line 2180) | defp ensure_compiled(module, mode) do
method loaded? (line 2215) | def loaded?(module) do
method can_await_module_compilation? (line 2230) | def can_await_module_compilation? do
method fetch_docs (line 2282) | def fetch_docs(module_or_path)
method get_beam_and_path (line 2321) | defp get_beam_and_path(module) do
method fetch_docs_from_beam (line 2333) | defp fetch_docs_from_beam(bin_or_path) do
method fetch_docs_from_chunk (line 2349) | defp fetch_docs_from_chunk(path) do
method load_docs_chunk (line 2359) | defp load_docs_chunk(bin) do
method get_docs (line 2368) | def get_docs(_module, _kind) do
method find_file! (line 2377) | defp find_file!(file, relative_to) do
FILE: lib/elixir/lib/code/formatter.ex
class Code.Formatter (line 5) | defmodule Code.Formatter
method to_algebra (line 162) | def to_algebra(quoted, opts \\ []) do
method locals_without_parens (line 178) | def locals_without_parens do
method local_without_parens? (line 185) | def local_without_parens?(fun, arity, locals_without_parens) do
method state (line 192) | defp state(comments, opts) do
method format_comment (line 234) | defp format_comment(%{text: text} = comment) do
method format_comment_text (line 238) | defp format_comment_text("#"), do: "#"
method format_comment_text (line 239) | defp format_comment_text("#!" <> rest), do: "#!" <> rest
method format_comment_text (line 240) | defp format_comment_text("##" <> rest), do: "#" <> format_comment_text...
method format_comment_text (line 241) | defp format_comment_text("# " <> rest), do: "# " <> rest
method format_comment_text (line 242) | defp format_comment_text("#" <> rest), do: "# " <> rest
method gather_comments (line 245) | defp gather_comments([%{previous_eol_count: 0} = comment | comments]) do
method gather_comments (line 250) | defp gather_comments([comment | comments]) do
method gather_comments (line 260) | defp gather_comments([]) do
method gather_followup_comments (line 270) | defp gather_followup_comments(_line, next_eol_count, comments, doc) do
method quoted_to_algebra (line 276) | defp quoted_to_algebra({{:special, :clause_args}, _meta, [args]}, _con...
method quoted_to_algebra (line 281) | defp quoted_to_algebra({{:special, :bitstring_segment}, _meta, [arg, l...
method quoted_to_algebra (line 289) | defp quoted_to_algebra({:<<>>, meta, entries}, _context, state) do
method quoted_to_algebra (line 311) | defp quoted_to_algebra(
method quoted_to_algebra (line 336) | defp quoted_to_algebra(
method quoted_to_algebra (line 349) | defp quoted_to_algebra({{:., _, [Access, :get]}, meta, [target, arg]},...
method quoted_to_algebra (line 365) | defp quoted_to_algebra({:%, _, [name, {:%{}, meta, args}]}, _context, ...
method quoted_to_algebra (line 373) | defp quoted_to_algebra({:%{}, meta, args}, _context, state) do
method quoted_to_algebra (line 379) | defp quoted_to_algebra({:{}, meta, args}, _context, state) do
method quoted_to_algebra (line 383) | defp quoted_to_algebra({:__block__, meta, [{left, right}]}, _context, ...
method quoted_to_algebra (line 388) | defp quoted_to_algebra({:__block__, _, [[{:->, _, _} | _] = clauses]},...
method quoted_to_algebra (line 443) | defp quoted_to_algebra(
method quoted_to_algebra (line 452) | defp quoted_to_algebra({:__block__, _meta, [arg]}, context, state) do
method quoted_to_algebra (line 456) | defp quoted_to_algebra({:__block__, _meta, []}, _context, state) do
method quoted_to_algebra (line 465) | defp quoted_to_algebra({:__aliases__, _meta, [head | tail]}, context, ...
method quoted_to_algebra (line 483) | defp quoted_to_algebra({:&, _, [arg]}, context, state) do
method quoted_to_algebra (line 487) | defp quoted_to_algebra({:@, meta, [arg]}, context, state) do
method quoted_to_algebra (line 493) | defp quoted_to_algebra({:not, meta, [{:in, _, [left, right]}]}, contex...
method quoted_to_algebra (line 517) | defp quoted_to_algebra(
method quoted_to_algebra (line 526) | defp quoted_to_algebra(
method quoted_to_algebra (line 541) | defp quoted_to_algebra(
method quoted_to_algebra (line 554) | defp quoted_to_algebra({:.., _meta, []}, context, state) do
method quoted_to_algebra (line 563) | defp quoted_to_algebra({:..., _meta, []}, _context, state) do
method quoted_to_algebra (line 568) | defp quoted_to_algebra({:..//, meta, [left, middle, right]}, context, ...
method quoted_to_algebra (line 572) | defp quoted_to_algebra({:fn, meta, [_ | _] = clauses}, _context, state...
method quoted_to_algebra (line 595) | defp quoted_to_algebra({left_arg, right_arg}, context, state) do
method quoted_to_algebra (line 635) | defp quoted_to_algebra(unknown, _context, state) do
method block_to_algebra (line 641) | defp block_to_algebra([{:->, _, _} | _] = paren_fun, min_line, max_lin...
method block_to_algebra (line 645) | defp block_to_algebra({:__block__, _, []}, min_line, max_line, state) do
method block_to_algebra (line 649) | defp block_to_algebra({:__block__, _, [_, _ | _] = args}, min_line, ma...
method block_to_algebra (line 653) | defp block_to_algebra(block, min_line, max_line, state) do
method block_args_to_algebra (line 657) | defp block_args_to_algebra(args, min_line, max_line, state) do
method block_next_line (line 674) | defp block_next_line(:@), do: @empty
method block_next_line (line 675) | defp block_next_line(_), do: break("")
method maybe_unary_op_to_algebra (line 679) | defp maybe_unary_op_to_algebra(fun, meta, args, context, state) do
method unary_op_to_algebra (line 688) | defp unary_op_to_algebra(op, _meta, arg, context, state) do
method maybe_binary_op_to_algebra (line 709) | defp maybe_binary_op_to_algebra(fun, meta, args, context, state) do
method binary_op_to_algebra (line 731) | defp binary_op_to_algebra(op, op_string, meta, left_arg, right_arg, co...
method binary_op_to_algebra (line 798) | defp binary_op_to_algebra(op, op_string, meta, left_arg, right_arg, co...
method binary_operand_to_algebra (line 885) | defp binary_operand_to_algebra(operand, context, state, parent_op, par...
method unwrap_pipes (line 933) | defp unwrap_pipes(left, meta, context, acc) do
method unwrap_right (line 943) | defp unwrap_right({op, meta, [left, right]}, op, _meta, context, acc) do
method unwrap_right (line 949) | defp unwrap_right(right, _op, meta, context, acc) do
method operand_to_algebra_with_comments (line 954) | defp operand_to_algebra_with_comments(operands, meta, min_line, max_li...
method module_attribute_to_algebra (line 1003) | defp module_attribute_to_algebra(_meta, {:__aliases__, _, [_, _ | _]} ...
method module_attribute_to_algebra (line 1030) | defp module_attribute_to_algebra(meta, quoted, context, state) do
method capture_to_algebra (line 1040) | defp capture_to_algebra(arg, context, state) do
method capture_target_to_algebra (line 1070) | defp capture_target_to_algebra(arg, context, state) do
method remote_to_algebra (line 1078) | defp remote_to_algebra({{:., _, [target, :{}]}, meta, args}, _context,...
method remote_to_algebra (line 1085) | defp remote_to_algebra({{:., _, [target]}, meta, args}, context, state...
method remote_to_algebra (line 1123) | defp remote_to_algebra({target, meta, args}, context, state) do
method remote_target_is_a_module? (line 1134) | defp remote_target_is_a_module?(target) do
method remote_target_to_algebra (line 1143) | defp remote_target_to_algebra({:fn, _, [_ | _]} = quoted, state) do
method remote_target_to_algebra (line 1149) | defp remote_target_to_algebra(quoted, state) do
method call_args_to_algebra (line 1188) | defp call_args_to_algebra([], meta, _context, _parens, _list_to_keywor...
method call_args_to_algebra (line 1195) | defp call_args_to_algebra(args, meta, context, parens, list_to_keyword...
method call_args_to_algebra_no_blocks (line 1227) | defp call_args_to_algebra_no_blocks(meta, args, skip_parens?, list_to_...
method no_generators? (line 1340) | defp no_generators?(args) do
method do_end_blocks (line 1344) | defp do_end_blocks(meta, [{{:__block__, _, [:do]}, _} | rest] = blocks...
method do_end_blocks (line 1352) | defp do_end_blocks(_, _, _), do: nil
method can_force_do_end_blocks? (line 1354) | defp can_force_do_end_blocks?(rest, state) do
method do_end_blocks_with_range (line 1359) | defp do_end_blocks_with_range([{key1, line1, value1}, {_, line2, _} = ...
method do_end_blocks_with_range (line 1363) | defp do_end_blocks_with_range([{key, line, value}], end_line) do
method do_end_blocks_to_algebra (line 1367) | defp do_end_blocks_to_algebra([{:do, line, end_line, value} | blocks],...
method do_end_block_to_algebra (line 1376) | defp do_end_block_to_algebra(key_doc, line, end_line, value, state) do
method list_interpolated? (line 1385) | defp list_interpolated?(entries) do
method interpolated? (line 1393) | defp interpolated?(entries) do
method prepend_heredoc_line (line 1405) | defp prepend_heredoc_line(entries) do
method list_interpolation_to_algebra (line 1415) | defp list_interpolation_to_algebra([entry | entries], escape, state, a...
method list_interpolation_to_algebra (line 1421) | defp list_interpolation_to_algebra([], _escape, state, acc, last) do
method interpolation_to_algebra (line 1431) | defp interpolation_to_algebra([entry | entries], escape, state, acc, l...
method interpolation_to_algebra (line 1437) | defp interpolation_to_algebra([], _escape, state, acc, last) do
method interpolation_to_algebra (line 1441) | defp interpolation_to_algebra(quoted, %{skip_eol: skip_eol} = state) do
method maybe_sigil_to_algebra (line 1448) | defp maybe_sigil_to_algebra(fun, meta, args, state) do
method closing_sigil_delimiter (line 1498) | defp closing_sigil_delimiter("("), do: ")"
method closing_sigil_delimiter (line 1499) | defp closing_sigil_delimiter("["), do: "]"
method closing_sigil_delimiter (line 1500) | defp closing_sigil_delimiter("{"), do: "}"
method closing_sigil_delimiter (line 1501) | defp closing_sigil_delimiter("<"), do: ">"
method bitstring_to_algebra (line 1506) | defp bitstring_to_algebra(meta, args, state) do
method bitstring_segment_to_algebra (line 1523) | defp bitstring_segment_to_algebra({{:<-, meta, [left, right]}, i}, sta...
method bitstring_segment_to_algebra (line 1529) | defp bitstring_segment_to_algebra({{:"::", _, [segment, spec]}, i}, st...
method bitstring_segment_to_algebra (line 1547) | defp bitstring_segment_to_algebra({segment, i}, state, last) do
method bitstring_spec_to_algebra (line 1562) | defp bitstring_spec_to_algebra(spec, state, normalize_modifiers, _pare...
method bitstring_spec_element_to_algebra (line 1576) | defp bitstring_spec_element_to_algebra(spec_element, state, _normalize...
method bitstring_spec_normalize_empty_args (line 1580) | defp bitstring_spec_normalize_empty_args(:_), do: nil
method bitstring_spec_normalize_empty_args (line 1582) | defp bitstring_spec_normalize_empty_args(atom) do
method bitstring_wrap_parens (line 1600) | defp bitstring_wrap_parens(doc, _, _), do: doc
method list_to_algebra (line 1604) | defp list_to_algebra(meta, args, state) do
method map_to_algebra (line 1617) | defp map_to_algebra(meta, name_doc, [{:|, _, [left, right]}], state) do
method map_to_algebra (line 1633) | defp map_to_algebra(meta, name_doc, args, state) do
method do_map_to_algebra (line 1643) | defp do_map_to_algebra(name_doc, args_doc, state) do
method tuple_to_algebra (line 1648) | defp tuple_to_algebra(meta, args, join, state) do
method atom_to_algebra (line 1669) | defp atom_to_algebra(nil, _, inspect_opts) do
method atom_to_algebra (line 1673) | defp atom_to_algebra(:\\, meta, inspect_opts) do
method atom_to_algebra (line 1686) | defp atom_to_algebra(atom, _, inspect_opts) do
method integer_to_algebra (line 1699) | defp integer_to_algebra(text, inspect_otps) do
method float_to_algebra (line 1716) | defp float_to_algebra(text, inspect_otps) do
method insert_underscores (line 1724) | defp insert_underscores("-" <> digits) do
method insert_underscores (line 1728) | defp insert_underscores(digits) do
method do_insert_underscores (line 1745) | defp do_insert_underscores(acc, ""), do: acc
method do_insert_underscores (line 1747) | defp do_insert_underscores("", <<next::binary-3, rest::binary>>),
method do_insert_underscores (line 1750) | defp do_insert_underscores(acc, <<next::binary-3, rest::binary>>),
method escape_heredoc (line 1753) | defp escape_heredoc(string, escape) do
method escape_string (line 1758) | defp escape_string(string, <<_, _, _>> = escape) do
method heredoc_to_algebra (line 1772) | defp heredoc_to_algebra([string]) do
method heredoc_to_algebra (line 1776) | defp heredoc_to_algebra(["" | rest]) do
method heredoc_to_algebra (line 1782) | defp heredoc_to_algebra([string | rest]) do
method heredoc_line (line 1789) | defp heredoc_line(["", _ | _]), do: nest(line(), :reset)
method heredoc_line (line 1790) | defp heredoc_line(["\r", _ | _]), do: nest(line(), :reset)
method heredoc_line (line 1791) | defp heredoc_line(_), do: line()
method args_to_algebra_with_comments (line 1793) | defp args_to_algebra_with_comments(args, meta, skip_parens?, last_arg_...
method anon_fun_to_algebra (line 1851) | defp anon_fun_to_algebra(
method anon_fun_to_algebra (line 1879) | defp anon_fun_to_algebra(
method anon_fun_to_algebra (line 1919) | defp anon_fun_to_algebra(clauses, min_line, max_line, state, _multi_cl...
method paren_fun_to_algebra (line 1927) | defp paren_fun_to_algebra([{:->, meta, [[], body]}] = clauses, _min_li...
method paren_fun_to_algebra (line 1944) | defp paren_fun_to_algebra([{:->, meta, [args, body]}] = clauses, _min_...
method paren_fun_to_algebra (line 1969) | defp paren_fun_to_algebra(clauses, min_line, max_line, state) do
method multi_line_clauses? (line 1976) | defp multi_line_clauses?(clauses, state) do
method multi_line_block? (line 1982) | defp multi_line_block?({:__block__, _, [_, _ | _]}), do: true
method multi_line_block? (line 1983) | defp multi_line_block?(_), do: false
method clause_break_or_line (line 1985) | defp clause_break_or_line(clauses, state) do
method maybe_force_clauses (line 1989) | defp maybe_force_clauses(doc, clauses, state) do
method clauses_to_algebra (line 1993) | defp clauses_to_algebra([{:->, _, _} | _] = clauses, min_line, max_lin...
method clauses_to_algebra (line 2012) | defp clauses_to_algebra(other, min_line, max_line, state) do
method clause_to_algebra (line 2019) | defp clause_to_algebra({:->, meta, [[], body]}, _min_line, state) do
method clause_to_algebra (line 2024) | defp clause_to_algebra({:->, meta, [args, body]}, min_line, state) do
method add_max_line_to_last_clause (line 2043) | defp add_max_line_to_last_clause([{op, meta, args}], max_line) do
method add_max_line_to_last_clause (line 2047) | defp add_max_line_to_last_clause([clause | clauses], max_line) do
method clause_args_to_algebra (line 2051) | defp clause_args_to_algebra(args, min_line, state) do
method clause_args_to_algebra (line 2068) | defp clause_args_to_algebra([{:when, meta, args}], state) do
method clause_args_to_algebra (line 2083) | defp clause_args_to_algebra([], state) do
method clause_args_to_algebra (line 2088) | defp clause_args_to_algebra(args, state) do
method quoted_to_algebra_with_comments (line 2094) | defp quoted_to_algebra_with_comments(args, acc, min_line, max_line, st...
method each_quoted_to_algebra_without_comments (line 2111) | defp each_quoted_to_algebra_without_comments([], acc, state, _fun) do
method each_quoted_to_algebra_without_comments (line 2115) | defp each_quoted_to_algebra_without_comments([arg | args], acc, state,...
method each_quoted_to_algebra_with_comments (line 2121) | defp each_quoted_to_algebra_with_comments([], acc, max_line, state, co...
method each_quoted_to_algebra_with_comments (line 2126) | defp each_quoted_to_algebra_with_comments([arg | args], acc, max_line,...
method extract_comments_before (line 2154) | defp extract_comments_before(_max, acc, rest, comments?) do
method add_previous_to_acc (line 2161) | defp add_previous_to_acc(acc, _previous),
method extract_comments_trailing (line 2170) | defp extract_comments_trailing(_min, _max, acc, rest, comments?) do
method adjust_trailing_newlines (line 2181) | defp adjust_trailing_newlines(doc_triplet, _, _), do: doc_triplet
method traverse_line (line 2183) | defp traverse_line({expr, meta, args}, {min, max}) do
method traverse_line (line 2194) | defp traverse_line({left, right}, acc) do
method traverse_line (line 2202) | defp traverse_line(_, acc) do
method merge_algebra_with_comments (line 2213) | defp merge_algebra_with_comments([{doc, next_line, newlines} | docs], ...
method merge_algebra_with_comments (line 2233) | defp merge_algebra_with_comments([], _) do
method left_op_context (line 2239) | defp left_op_context(context), do: force_many_args_or_operand(context,...
method right_op_context (line 2240) | defp right_op_context(context), do: force_many_args_or_operand(context...
method force_many_args_or_operand (line 2242) | defp force_many_args_or_operand(:no_parens_one_arg, _choice), do: :no_...
method force_many_args_or_operand (line 2243) | defp force_many_args_or_operand(:parens_one_arg, _choice), do: :parens...
method force_many_args_or_operand (line 2244) | defp force_many_args_or_operand(:no_parens_arg, _choice), do: :no_pare...
method force_many_args_or_operand (line 2245) | defp force_many_args_or_operand(:parens_arg, _choice), do: :parens_arg
method force_many_args_or_operand (line 2246) | defp force_many_args_or_operand(:operand, choice), do: choice
method force_many_args_or_operand (line 2247) | defp force_many_args_or_operand(:block, choice), do: choice
method quoted_to_algebra_with_parens_if_operator (line 2249) | defp quoted_to_algebra_with_parens_if_operator(ast, context, state) do
method wrap_in_parens_if_operator (line 2254) | defp wrap_in_parens_if_operator(doc, {:__block__, _, [expr]}) do
method wrap_in_parens_if_operator (line 2258) | defp wrap_in_parens_if_operator(doc, quoted) do
method wrap_in_parens_if_binary_operator (line 2266) | defp wrap_in_parens_if_binary_operator(doc, quoted) do
method wrap_in_parens_if_inspected_atom (line 2274) | defp wrap_in_parens_if_inspected_atom(":" <> _ = doc) do
method wrap_in_parens_if_inspected_atom (line 2278) | defp wrap_in_parens_if_inspected_atom(doc) do
method wrap_in_parens (line 2282) | defp wrap_in_parens(doc) do
method many_args_to_algebra (line 2286) | defp many_args_to_algebra([arg | args], state, fun) do
method module_attribute_read? (line 2298) | defp module_attribute_read?(_), do: false
method integer_capture? (line 2301) | defp integer_capture?(_), do: false
method operator? (line 2303) | defp operator?(quoted) do
method augmented_binary_op (line 2309) | defp augmented_binary_op(:"//"), do: {:right, 190}
method augmented_binary_op (line 2310) | defp augmented_binary_op(op), do: Code.Identifier.binary_op(op)
method binary_operator? (line 2312) | defp binary_operator?(quoted) do
method unary_operator? (line 2320) | defp unary_operator?(quoted) do
method with_next_break_fits (line 2327) | defp with_next_break_fits(condition, doc, fun) do
method next_break_fits? (line 2341) | defp next_break_fits?({:{}, meta, _args}, state) do
method next_break_fits? (line 2345) | defp next_break_fits?({:__block__, meta, [{_, _}]}, state) do
method next_break_fits? (line 2349) | defp next_break_fits?({:<<>>, meta, [_ | _] = entries}, state) do
method next_break_fits? (line 2355) | defp next_break_fits?({{:., _, [List, :to_charlist]}, meta, [[_ | _]]}...
method next_break_fits? (line 2359) | defp next_break_fits?({{:., _, [_left, :{}]}, _, _}, _state) do
method next_break_fits? (line 2384) | defp next_break_fits?(_, _state) do
method eol_or_comments? (line 2388) | defp eol_or_comments?(meta, %{comments: comments} = state) do
method last_arg_to_keyword (line 2398) | defp last_arg_to_keyword([_ | _] = arg, _list_to_keyword?, _skip_paren...
method last_arg_to_keyword (line 2403) | defp last_arg_to_keyword(
method last_arg_to_keyword (line 2432) | defp last_arg_to_keyword(arg, _list_to_keyword?, _skip_parens?, _comme...
method force_args? (line 2436) | defp force_args?(args) do
method force_args? (line 2440) | defp force_args?([[arg | _] | args], lines) do
method force_args? (line 2444) | defp force_args?([arg | args], lines) do
method force_args? (line 2459) | defp force_args?([], lines), do: map_size(lines) >= 2
method force_keyword (line 2461) | defp force_keyword(doc, arg) do
method keyword? (line 2465) | defp keyword?([{_, _} | list]), do: keyword?(list)
method keyword? (line 2466) | defp keyword?(rest), do: rest == []
method keyword_key? (line 2471) | defp keyword_key?({{:., _, [:erlang, :binary_to_atom]}, meta, [{:<<>>,...
method keyword_key? (line 2474) | defp keyword_key?(_),
method eol? (line 2477) | defp eol?(_meta, %{skip_eol: true}), do: false
method eol? (line 2478) | defp eol?(meta, _state), do: Keyword.get(meta, :newlines, 0) > 0
method meta? (line 2480) | defp meta?(meta, key) do
method line (line 2484) | defp line(meta) do
method end_line (line 2488) | defp end_line(meta) do
method closing_line (line 2492) | defp closing_line(meta) do
method escape_atom (line 2496) | defp escape_atom(string, char) do
method concat_to_last_group (line 2504) | defp concat_to_last_group([left | right], concat) do
method concat_to_last_group (line 2508) | defp concat_to_last_group({:doc_group, group, mode}, concat) do
method concat_to_last_group (line 2512) | defp concat_to_last_group(other, concat) do
method ungroup_if_group (line 2516) | defp ungroup_if_group({:doc_group, group, _mode}), do: group
method ungroup_if_group (line 2517) | defp ungroup_if_group(other), do: other
method format_to_string (line 2519) | defp format_to_string(doc) do
method maybe_empty_line (line 2523) | defp maybe_empty_line() do
method surround (line 2527) | defp surround(left, doc, right) do
method nest_by_length (line 2535) | defp nest_by_length(doc, string) do
method split_last (line 2539) | defp split_last(list) do
method get_charlist_quotes (line 2544) | defp get_charlist_quotes(:heredoc, state) do
method get_charlist_quotes (line 2552) | defp get_charlist_quotes({:regular, chunks}, state) do
method has_double_quote? (line 2560) | defp has_double_quote?(chunk) do
method negate_condition (line 2593) | defp negate_condition(condition) do
FILE: lib/elixir/lib/code/fragment.ex
class Code.Fragment (line 4) | defmodule Code.Fragment
method lines (line 54) | def lines(string) do
method lines (line 58) | defp lines(<<?\n, rest::binary>>, acc),
method lines (line 61) | defp lines(<<char, rest::binary>>, acc),
method lines (line 64) | defp lines(<<>>, acc),
method cursor_context (line 233) | def cursor_context(fragment, opts \\ [])
method codepoint_cursor_context (line 261) | defp codepoint_cursor_context(reverse, _opts) do
method strip_spaces (line 295) | defp strip_spaces(rest, count), do: {rest, count}
method unquoted_atom_or_expr (line 297) | defp unquoted_atom_or_expr(0), do: {{:unquoted_atom, ~c""}, 1}
method unquoted_atom_or_expr (line 298) | defp unquoted_atom_or_expr(_), do: {:expr, 0}
method arity_to_cursor_context (line 300) | defp arity_to_cursor_context({reverse, spaces}) do
method call_to_cursor_context (line 310) | defp call_to_cursor_context({reverse, spaces}) do
method closing_or_call_to_cursor_context (line 330) | defp closing_or_call_to_cursor_context({reverse, spaces}) do
method identifier_to_cursor_context (line 338) | defp identifier_to_cursor_context([?., ?., ?: | _], n, _), do: {{:unqu...
method identifier_to_cursor_context (line 339) | defp identifier_to_cursor_context([?., ?., ?. | _], n, _), do: {{:oper...
method identifier_to_cursor_context (line 340) | defp identifier_to_cursor_context([?., ?: | _], n, _), do: {{:unquoted...
method identifier_to_cursor_context (line 341) | defp identifier_to_cursor_context([?., ?. | _], n, _), do: {{:operator...
method identifier_to_cursor_context (line 343) | defp identifier_to_cursor_context(reverse, count, call_op?) do
method closing? (line 406) | defp closing?([?>, ?> | rest]), do: rest == [] or hd(rest) not in [?>,...
method closing? (line 408) | defp closing?(rest) do
method split_non_identifier (line 423) | defp split_non_identifier(rest, acc), do: {acc, rest}
method identifier (line 425) | defp identifier([?? | rest], count), do: check_identifier(rest, count ...
method identifier (line 426) | defp identifier([?! | rest], count), do: check_identifier(rest, count ...
method identifier (line 427) | defp identifier(rest, count), do: check_identifier(rest, count, [])
method check_identifier (line 432) | defp check_identifier(_, _, _), do: :operator
method rest_identifier (line 438) | defp rest_identifier(rest, count, [?@ | acc]) do
method rest_identifier (line 460) | defp rest_identifier([?? | _], _count, _acc) do
method rest_identifier (line 472) | defp rest_identifier(rest, count, acc) do
method tokenize_identifier (line 476) | defp tokenize_identifier(rest, count, acc) do
method nested_alias (line 498) | defp nested_alias(rest, count, acc) do
method dot (line 528) | defp dot(rest, count, acc) do
method operator (line 575) | defp operator(rest, count, ~c"~", call_op?) do
method operator (line 589) | defp operator(rest, count, acc, _call_op?) do
method surround_context (line 720) | def surround_context(fragment, position, options \\ [])
method surround_context (line 738) | def surround_context(other, {_, _} = position, opts) do
method maybe_operator (line 839) | defp maybe_operator(reversed_pre, post, line, opts) do
method build_surround (line 873) | defp build_surround(context, reversed, line, offset) do
method take_identifier (line 891) | defp take_identifier(rest, acc) do
method take_alias (line 903) | defp take_alias(rest, acc) do
method take_operator (line 914) | defp take_operator(rest, acc), do: {acc, rest}
method adjust_position (line 922) | defp adjust_position(reversed_pre, [?% | post]) do
method adjust_position (line 927) | defp adjust_position(reversed_pre, post) do
method move_spaces (line 958) | defp move_spaces(t, acc), do: {t, acc}
method string_reverse_at (line 960) | defp string_reverse_at(charlist, 0, acc), do: {acc, charlist}
method string_reverse_at (line 962) | defp string_reverse_at(charlist, n, acc) do
method enum_reverse_at (line 971) | defp enum_reverse_at(rest, _, acc), do: {acc, rest}
method prepend_cursor_lines (line 993) | defp prepend_cursor_lines(lines, last_line) do
method starts_with_dot? (line 1003) | defp starts_with_dot?([?. | _]), do: true
method starts_with_dot? (line 1005) | defp starts_with_dot?(_), do: false
method ends_as_incomplete (line 1007) | defp ends_as_incomplete([?# | _], acc, incomplete?),
method ends_as_incomplete (line 1016) | defp ends_as_incomplete([h | t], acc, _incomplete?),
method ends_as_incomplete (line 1019) | defp ends_as_incomplete([], acc, incomplete?),
method surround_lines (line 1037) | defp surround_lines(lines, line, column) do
method split_at (line 1056) | defp split_at([line], _, acc), do: {acc, line, []}
method split_at (line 1057) | defp split_at([line | lines], 1, acc), do: {acc, line, lines}
method split_at (line 1058) | defp split_at([line | lines], count, acc), do: split_at(lines, count -...
method prepend_surround_lines (line 1060) | defp prepend_surround_lines(lines, lengths, last_line) do
method append_surround_lines (line 1071) | defp append_surround_lines(lines, lengths, acc_lines, incomplete?) do
method to_multiline_range (line 1083) | defp to_multiline_range(:none, _, _, _), do: :none
method to_multiline_range (line 1085) | defp to_multiline_range(
method container_cursor_to_quoted (line 1269) | def container_cursor_to_quoted(fragment, opts \\ []) do
method reverse_tokens (line 1332) | defp reverse_tokens(line, column, tokens, terminators) do
method drop_tokens (line 1345) | defp drop_tokens([{:"}", _} | _] = tokens, 0), do: tokens
method drop_tokens (line 1346) | defp drop_tokens([{:"]", _} | _] = tokens, 0), do: tokens
method drop_tokens (line 1347) | defp drop_tokens([{:")", _} | _] = tokens, 0), do: tokens
method drop_tokens (line 1348) | defp drop_tokens([{:">>", _} | _] = tokens, 0), do: tokens
method drop_tokens (line 1349) | defp drop_tokens([{:end, _} | _] = tokens, 0), do: tokens
method drop_tokens (line 1350) | defp drop_tokens([{:",", _} | _] = tokens, 0), do: tokens
method drop_tokens (line 1351) | defp drop_tokens([{:";", _} | _] = tokens, 0), do: tokens
method drop_tokens (line 1352) | defp drop_tokens([{:eol, _} | _] = tokens, 0), do: tokens
method drop_tokens (line 1353) | defp drop_tokens([{:stab_op, _, :->} | _] = tokens, 0), do: tokens
method drop_tokens (line 1355) | defp drop_tokens([{:"}", _} | tokens], counter), do: drop_tokens(token...
method drop_tokens (line 1356) | defp drop_tokens([{:"]", _} | tokens], counter), do: drop_tokens(token...
method drop_tokens (line 1357) | defp drop_tokens([{:")", _} | tokens], counter), do: drop_tokens(token...
method drop_tokens (line 1358) | defp drop_tokens([{:">>", _} | tokens], counter), do: drop_tokens(toke...
method drop_tokens (line 1359) | defp drop_tokens([{:end, _} | tokens], counter), do: drop_tokens(token...
method drop_tokens (line 1361) | defp drop_tokens([{:"{", _} | tokens], counter), do: drop_tokens(token...
method drop_tokens (line 1362) | defp drop_tokens([{:"[", _} | tokens], counter), do: drop_tokens(token...
method drop_tokens (line 1363) | defp drop_tokens([{:"(", _} | tokens], counter), do: drop_tokens(token...
method drop_tokens (line 1364) | defp drop_tokens([{:"<<", _} | tokens], counter), do: drop_tokens(toke...
method drop_tokens (line 1365) | defp drop_tokens([{:fn, _} | tokens], counter), do: drop_tokens(tokens...
method drop_tokens (line 1366) | defp drop_tokens([{:do, _} | tokens], counter), do: drop_tokens(tokens...
method drop_tokens (line 1368) | defp drop_tokens([_ | tokens], counter), do: drop_tokens(tokens, counter)
method drop_tokens (line 1369) | defp drop_tokens([], _counter), do: []
method maybe_missing_stab? (line 1371) | defp maybe_missing_stab?([{:after, _} | _], _stab_choice?), do: true
method maybe_missing_stab? (line 1372) | defp maybe_missing_stab?([{:do, _} | _], _stab_choice?), do: true
method maybe_missing_stab? (line 1373) | defp maybe_missing_stab?([{:fn, _} | _], _stab_choice?), do: true
method maybe_missing_stab? (line 1374) | defp maybe_missing_stab?([{:else, _} | _], _stab_choice?), do: true
method maybe_missing_stab? (line 1375) | defp maybe_missing_stab?([{:catch, _} | _], _stab_choice?), do: true
method maybe_missing_stab? (line 1376) | defp maybe_missing_stab?([{:rescue, _} | _], _stab_choice?), do: true
method maybe_missing_stab? (line 1377) | defp maybe_missing_stab?([{:stab_op, _, :->} | _], stab_choice?), do: ...
method maybe_missing_stab? (line 1378) | defp maybe_missing_stab?([_ | tail], stab_choice?), do: maybe_missing_...
method maybe_missing_stab? (line 1379) | defp maybe_missing_stab?([], _stab_choice?), do: false
FILE: lib/elixir/lib/code/identifier.ex
class Code.Identifier (line 5) | defmodule Code.Identifier
method unary_op (line 18) | def unary_op(op) do
method binary_op (line 37) | def binary_op(op) do
method escape (line 85) | defp escape(<<_, _::binary>> = binary, _char, 0, acc, _fun) do
method escape (line 89) | defp escape(<<char, t::binary>>, char, count, acc, fun) do
method escape (line 93) | defp escape(<<?#, ?{, t::binary>>, char, count, acc, fun) do
method escape (line 97) | defp escape(<<h::utf8, t::binary>>, char, count, acc, fun) do
method escape (line 106) | defp escape(<<a::4, b::4, t::binary>>, char, count, acc, fun) do
method escape (line 110) | defp escape(<<>>, _char, _count, acc, _fun) do
method escape_char (line 114) | defp escape_char(0, acc), do: <<acc::binary, ?\\, ?0>>
method escape_map (line 170) | defp escape_map(?\a), do: "\\a"
method escape_map (line 171) | defp escape_map(?\b), do: "\\b"
method escape_map (line 172) | defp escape_map(?\d), do: "\\d"
method escape_map (line 173) | defp escape_map(?\e), do: "\\e"
method escape_map (line 174) | defp escape_map(?\f), do: "\\f"
method escape_map (line 175) | defp escape_map(?\n), do: "\\n"
method escape_map (line 176) | defp escape_map(?\r), do: "\\r"
method escape_map (line 177) | defp escape_map(?\t), do: "\\t"
method escape_map (line 178) | defp escape_map(?\v), do: "\\v"
method escape_map (line 179) | defp escape_map(?\\), do: "\\\\"
method escape_map (line 180) | defp escape_map(_), do: false
method decrement (line 186) | defp decrement(:infinity), do: :infinity
method decrement (line 187) | defp decrement(counter), do: counter - 1
FILE: lib/elixir/lib/code/normalizer.ex
class Code.Normalizer (line 4) | defmodule Code.Normalizer
method normalize (line 18) | def normalize(quoted, opts \\ []) do
method do_normalize (line 45) | defp do_normalize({:__aliases__, _, _} = quoted, _state) do
method do_normalize (line 56) | defp do_normalize(left..right//step, state) do
method do_normalize (line 104) | defp do_normalize({{:., dot_meta, [List, :to_charlist]}, call_meta, [p...
method do_normalize (line 128) | defp do_normalize({:., meta, [Access, :get]}, state) do
method do_normalize (line 145) | defp do_normalize({:->, meta, [left, right]}, state) do
method do_normalize (line 211) | defp do_normalize({:@, meta, [{name, name_meta, [value]}]}, state) do
method do_normalize (line 243) | defp do_normalize(quoted, state) do
method normalize_literal (line 282) | defp normalize_literal({left, right}, meta, state) do
method normalize_literal (line 323) | defp normalize_literal(quoted, meta, _state) do
method normalize_call (line 327) | defp normalize_call({form, meta, args}, state) do
method block_keyword? (line 401) | defp block_keyword?([]), do: true
method block_keyword? (line 402) | defp block_keyword?(_), do: false
method allow_keyword? (line 404) | defp allow_keyword?(:when, 2), do: true
method allow_keyword? (line 405) | defp allow_keyword?(:{}, _), do: false
method allow_keyword? (line 406) | defp allow_keyword?(op, arity), do: not is_atom(op) or not Macro.opera...
method normalize_bitstring (line 408) | defp normalize_bitstring({:<<>>, meta, parts}, state, escape_interpola...
method normalize_interpolation_parts (line 430) | defp normalize_interpolation_parts(parts, state, escape_interpolation) do
method normalize_map_args (line 454) | defp normalize_map_args(args, state) do
method normalize_kw_blocks (line 461) | defp normalize_kw_blocks(form, meta, args, state) do
method normalize_kw_args (line 488) | defp normalize_kw_args(elems, state, keyword?)
method normalize_kw_args (line 510) | defp normalize_kw_args([{left, right} | rest] = current, state, keywor...
method normalize_kw_args (line 534) | defp normalize_kw_args([first | rest], state, keyword?) do
method normalize_kw_args (line 538) | defp normalize_kw_args([], _state, _keyword?) do
method normalize_args (line 542) | defp normalize_args(args, state) do
method maybe_escape_literal (line 558) | defp maybe_escape_literal(term, _) do
method binary_interpolated? (line 562) | defp binary_interpolated?(parts) do
method list_interpolated? (line 570) | defp list_interpolated?(parts) do
method patch_meta_line (line 578) | defp patch_meta_line(meta, parent_meta) do
method meta_line (line 587) | defp meta_line(state) do
method keyword? (line 610) | defp keyword?([]), do: true
method keyword? (line 611) | defp keyword?(_other), do: false
FILE: lib/elixir/lib/code/typespec.ex
class Code.Typespec (line 5) | defmodule Code.Typespec
method spec_to_quoted (line 12) | def spec_to_quoted(name, spec)
method type_to_quoted (line 65) | def type_to_quoted(type)
method typespecs_abstract_code (line 155) | defp typespecs_abstract_code(module) do
method collect_vars (line 206) | defp collect_vars({:typed_record_field, _anno, type}) do
method collect_vars (line 210) | defp collect_vars({:paren_type, _anno, [type]}) do
method collect_vars (line 214) | defp collect_vars({:var, _anno, var}) do
method collect_vars (line 218) | defp collect_vars(_) do
method typespec_to_quoted (line 222) | defp typespec_to_quoted({:user_type, anno, name, args}) do
method typespec_to_quoted (line 227) | defp typespec_to_quoted({:type, anno, :tuple, :any}) do
method typespec_to_quoted (line 231) | defp typespec_to_quoted({:type, anno, :tuple, args}) do
method typespec_to_quoted (line 236) | defp typespec_to_quoted({:type, _anno, :list, [{:type, _, :union, unio...
method typespec_to_quoted (line 243) | defp typespec_to_quoted({:type, anno, :list, []}) do
method typespec_to_quoted (line 247) | defp typespec_to_quoted({:type, _anno, :list, [arg]}) do
method typespec_to_quoted (line 251) | defp typespec_to_quoted({:type, anno, :nonempty_list, []}) do
method typespec_to_quoted (line 255) | defp typespec_to_quoted({:type, anno, :nonempty_list, [arg]}) do
method typespec_to_quoted (line 259) | defp typespec_to_quoted({:type, anno, :map, :any}) do
method typespec_to_quoted (line 263) | defp typespec_to_quoted({:type, anno, :map, fields}) do
method typespec_to_quoted (line 289) | defp typespec_to_quoted({:type, anno, :binary, [arg1, arg2]}) do
method typespec_to_quoted (line 304) | defp typespec_to_quoted({:type, anno, :union, args}) do
method typespec_to_quoted (line 309) | defp typespec_to_quoted({:type, anno, :fun, [{:type, _, :product, args...
method typespec_to_quoted (line 314) | defp typespec_to_quoted({:type, anno, :fun, [args, result]}) do
method typespec_to_quoted (line 318) | defp typespec_to_quoted({:type, anno, :range, [left, right]}) do
method typespec_to_quoted (line 322) | defp typespec_to_quoted({:type, _anno, nil, []}) do
method typespec_to_quoted (line 326) | defp typespec_to_quoted({:type, anno, name, args}) do
method typespec_to_quoted (line 331) | defp typespec_to_quoted({:var, anno, var}) do
method typespec_to_quoted (line 339) | defp typespec_to_quoted({:op, anno, :*, arg1, arg2}) do
method typespec_to_quoted (line 343) | defp typespec_to_quoted({:remote_type, anno, [mod, name, args]}) do
method typespec_to_quoted (line 347) | defp typespec_to_quoted({:ann_type, anno, [var, type]}) do
method typespec_to_quoted (line 351) | defp typespec_to_quoted(
method typespec_to_quoted (line 357) | defp typespec_to_quoted({:type, _, :any}) do
method typespec_to_quoted (line 361) | defp typespec_to_quoted({:paren_type, _, [type]}) do
method typespec_to_quoted (line 369) | defp typespec_to_quoted(other), do: other
method remote_type (line 373) | defp remote_type(anno, {:atom, _, :elixir}, {:atom, _, :charlist}, []) do
method remote_type (line 377) | defp remote_type(anno, {:atom, _, :elixir}, {:atom, _, :nonempty_charl...
method remote_type (line 381) | defp remote_type(anno, {:atom, _, :elixir}, {:atom, _, :struct}, []) do
method remote_type (line 385) | defp remote_type(anno, {:atom, _, :elixir}, {:atom, _, :as_boolean}, [...
method remote_type (line 389) | defp remote_type(anno, {:atom, _, :elixir}, {:atom, _, :keyword}, args...
method remote_type (line 393) | defp remote_type(anno, mod, name, args) do
method erl_to_ex_var (line 399) | defp erl_to_ex_var(var) do
method unpack_typespec_kw (line 409) | defp unpack_typespec_kw([{:type, _, :tuple, [{:atom, _, atom}, type]} ...
method unpack_typespec_kw (line 413) | defp unpack_typespec_kw([], acc) do
method unpack_typespec_kw (line 417) | defp unpack_typespec_kw(_, _acc) do
method meta (line 421) | defp meta(anno) do
FILE: lib/elixir/lib/config.ex
class Config (line 5) | defmodule Config
method get_opts! (line 111) | defp get_opts!(), do: Process.get(@opts_key) || raise_improper_use!()
method put_opts (line 112) | defp put_opts(value), do: Process.put(@opts_key, value)
method delete_opts (line 113) | defp delete_opts(), do: Process.delete(@opts_key)
method get_config! (line 115) | defp get_config!(), do: Process.get(@config_key) || raise_improper_use!()
method put_config (line 116) | defp put_config(value), do: Process.put(@config_key, value)
method delete_config (line 117) | defp delete_config(), do: Process.delete(@config_key)
method get_imports! (line 119) | defp get_imports!(), do: Process.get(@imports_key) || raise_improper_u...
method put_imports (line 120) | defp put_imports(value), do: Process.put(@imports_key, value)
method delete_imports (line 121) | defp delete_imports(), do: Process.delete(@imports_key)
method raise_improper_use! (line 123) | defp raise_improper_use!() do
method __env__! (line 255) | def __env__!() do
method __target__! (line 278) | def __target__!() do
method import_config! (line 342) | defp import_config!(file, contents, raise_when_disabled?) do
method deep_merge (line 372) | defp deep_merge(_key, value1, value2) do
method validate! (line 380) | defp validate!(config, file) do
FILE: lib/elixir/lib/config/provider.ex
class Config.Provider (line 5) | defmodule Config.Provider
method validate_config_path! (line 177) | def validate_config_path!(path) do
method resolve_config_path! (line 199) | def resolve_config_path!({:system, name, path}), do: System.fetch_env!...
method boot (line 218) | def boot(reboot_fun \\ &restart_and_sleep/0) do
method boot_providers (line 247) | defp boot_providers(path, provider, reboot_config, reboot_fun) do
method maybe_validate_compile_env (line 284) | defp maybe_validate_compile_env(provider) do
method valid_compile_env? (line 292) | def valid_compile_env?(compile_env) do
method validate_compile_env (line 303) | def validate_compile_env(compile_env, ensure_loaded? \\ true)
method validate_compile_env (line 305) | def validate_compile_env([{app, [key | path], compile_return} | compil...
method validate_compile_env (line 343) | def validate_compile_env([], _ensure_loaded?) do
method ensure_app_loaded? (line 347) | defp ensure_app_loaded?(app, true), do: Application.ensure_loaded(app)...
method ensure_app_loaded? (line 348) | defp ensure_app_loaded?(app, false), do: Application.spec(app, :vsn) !...
method path (line 350) | defp path(key, []), do: "for key #{inspect(key)}"
method path (line 351) | defp path(key, path), do: "for path #{inspect(path)} inside key #{insp...
method compile_env_tips (line 353) | defp compile_env_tips(app),
method return_to_text (line 367) | defp return_to_text({:ok, value}), do: "was set to: #{inspect(value)}"
method return_to_text (line 368) | defp return_to_text(:error), do: "was not set"
method traverse_env (line 370) | defp traverse_env(return, []), do: return
method traverse_env (line 371) | defp traverse_env(:error, _paths), do: :error
method traverse_env (line 372) | defp traverse_env({:ok, value}, [key | keys]), do: traverse_env(Access...
method restart_and_sleep (line 375) | defp restart_and_sleep() do
method booted_value (line 387) | defp booted_value(%{prune_runtime_sys_config_after_boot: true}, path),...
method booted_value (line 388) | defp booted_value(%{prune_runtime_sys_config_after_boot: false}, _path...
method read_config! (line 390) | defp read_config!(path) do
method run_providers (line 403) | defp run_providers(config, %{providers: providers}) do
method write_config! (line 422) | defp write_config!(config, path) do
method bad_path_abort (line 437) | defp bad_path_abort(msg, path) do
method abort (line 445) | defp abort(msg) do
FILE: lib/elixir/lib/config/reader.ex
class Config.Reader (line 5) | defmodule Config.Reader
method init (line 62) | def init(path) do
method load (line 67) | def load(config, {path, opts}) do
FILE: lib/elixir/lib/dict.ex
class Dict (line 5) | defmodule Dict
method keys (line 256) | def keys(dict) do
method values (line 262) | def values(dict) do
method size (line 268) | def size(dict) do
method has_key? (line 274) | def has_key?(dict, key) do
method get (line 280) | def get(dict, key, default \\ nil) do
method get_lazy (line 286) | def get_lazy(dict, key, fun) do
method get_and_update (line 292) | def get_and_update(dict, key, fun) do
method fetch (line 298) | def fetch(dict, key) do
method fetch! (line 304) | def fetch!(dict, key) do
method put (line 310) | def put(dict, key, val) do
method put_new (line 316) | def put_new(dict, key, val) do
method put_new_lazy (line 322) | def put_new_lazy(dict, key, fun) do
method delete (line 328) | def delete(dict, key) do
method merge (line 334) | def merge(dict1, dict2) do
method merge (line 347) | def merge(dict1, dict2, fun) do
method do_merge (line 358) | defp do_merge(target1, dict1, dict2, fun) do
method pop (line 367) | def pop(dict, key, default \\ nil) do
method pop_lazy (line 373) | def pop_lazy(dict, key, fun) do
method update! (line 379) | def update!(dict, key, fun) do
method update (line 385) | def update(dict, key, default, fun) do
method split (line 391) | def split(dict, keys) do
method drop (line 397) | def drop(dict, keys) do
method take (line 403) | def take(dict, keys) do
method empty (line 409) | def empty(dict) do
method equal? (line 415) | def equal?(dict1, dict2) do
method to_list (line 439) | def to_list(dict) do
method unsupported_dict (line 444) | defp unsupported_dict(dict) do
FILE: lib/elixir/lib/dynamic_supervisor.ex
class DynamicSupervisor (line 5) | defmodule DynamicSupervisor
method start_link (line 344) | def start_link(module, init_arg, opts \\ []) do
method start_child (line 388) | def start_child(supervisor, {_, _, _, _, _, _} = child_spec) do
method start_child (line 392) | def start_child(supervisor, child_spec) do
method validate_and_start_child (line 396) | defp validate_and_start_child(supervisor, child_spec) do
method validate_child (line 403) | defp validate_child(%{id: _, start: {mod, _, _} = start} = child) do
method validate_child (line 418) | defp validate_child({_, start, restart, shutdown, type, modules}) do
method validate_child (line 422) | defp validate_child(other) do
method validate_child (line 426) | defp validate_child(start, restart, shutdown, type, modules, significa...
method validate_start (line 438) | defp validate_start(mfa), do: {:invalid_mfa, mfa}
method validate_type (line 441) | defp validate_type(type), do: {:invalid_child_type, type}
method validate_restart (line 444) | defp validate_restart(restart), do: {:invalid_restart_type, restart}
method validate_shutdown (line 448) | defp validate_shutdown(shutdown), do: {:invalid_shutdown, shutdown}
method validate_significant (line 450) | defp validate_significant(false), do: :ok
method validate_significant (line 451) | defp validate_significant(significant), do: {:invalid_significant, sig...
method validate_modules (line 453) | defp validate_modules(:dynamic), do: :ok
method validate_modules (line 455) | defp validate_modules(mods) do
method which_children (line 508) | def which_children(supervisor) do
method count_children (line 536) | def count_children(supervisor) do
method stop (line 552) | def stop(supervisor, reason \\ :normal, timeout \\ :infinity) do
method init (line 596) | def init({mod, init_arg, name}) do
method init (line 624) | defp init(state, flags) do
method validate_strategy (line 651) | defp validate_strategy(strategy), do: {:error, {:invalid_strategy, str...
method validate_restarts (line 654) | defp validate_restarts(restart), do: {:error, {:invalid_intensity, res...
method validate_seconds (line 657) | defp validate_seconds(seconds), do: {:error, {:invalid_period, seconds}}
method validate_dynamic (line 659) | defp validate_dynamic(:infinity), do: :ok
method validate_dynamic (line 661) | defp validate_dynamic(dynamic), do: {:error, {:invalid_max_children, d...
method validate_extra_arguments (line 664) | defp validate_extra_arguments(extra), do: {:error, {:invalid_extra_arg...
method validate_auto_shutdown (line 668) | defp validate_auto_shutdown(auto_shutdown),
method handle_call (line 672) | def handle_call(:which_children, _from, state) do
method handle_call (line 689) | def handle_call(:count_children, _from, state) do
method handle_call (line 712) | def handle_call({:terminate_child, pid}, _from, %{children: children} ...
method handle_call (line 723) | def handle_call({:start_task, args, restart, shutdown}, from, state) do
method handle_call (line 739) | def handle_call({:start_child, child}, _from, state) do
method handle_start_child (line 749) | defp handle_start_child({{m, f, args} = mfa, restart, shutdown, type, ...
method start_child (line 764) | defp start_child(m, f, a) do
method save_child (line 779) | defp save_child(pid, mfa, restart, shutdown, type, modules, state) do
method mfa_for_restart (line 784) | defp mfa_for_restart({m, f, _}, :temporary), do: {m, f, :undefined}
method mfa_for_restart (line 785) | defp mfa_for_restart(mfa, _), do: mfa
method exit_reason (line 787) | defp exit_reason(:exit, reason, _), do: reason
method exit_reason (line 788) | defp exit_reason(:error, reason, stack), do: {reason, stack}
method exit_reason (line 789) | defp exit_reason(:throw, value, stack), do: {{:nocatch, value}, stack}
method handle_cast (line 792) | def handle_cast(_msg, state) do
method handle_info (line 797) | def handle_info({:EXIT, pid, reason}, state) do
method handle_info (line 804) | def handle_info({:"$gen_restart", pid}, state) do
method handle_info (line 823) | def handle_info(msg, state) do
method code_change (line 842) | def code_change(_, %{mod: mod, args: init_arg} = state, _) do
method terminate (line 859) | def terminate(_, %{children: children} = state) do
method terminate_children (line 863) | defp terminate_children(children, state) do
method monitor_children (line 881) | defp monitor_children(children) do
method monitor_child (line 901) | defp monitor_child(pid) do
method exit_child (line 915) | defp exit_child(pid, {_, _, shutdown, _, _}, times) do
method wait_children (line 931) | defp wait_children(_pids, 0, timers, stacks) do
method wait_children (line 945) | defp wait_children(pids, size, timers, stacks) do
method wait_child (line 963) | defp wait_child(pid, {_, _, :brutal_kill, _, _} = child, reason, stack...
method wait_child (line 970) | defp wait_child(pid, {_, restart, _, _, _} = child, reason, stacks) do
method maybe_restart_child (line 979) | defp maybe_restart_child(pid, reason, %{children: children} = state) do
method maybe_restart_child (line 989) | defp maybe_restart_child(:permanent, reason, pid, child, state) do
method maybe_restart_child (line 994) | defp maybe_restart_child(_, :normal, pid, _child, state) do
method maybe_restart_child (line 998) | defp maybe_restart_child(_, :shutdown, pid, _child, state) do
method maybe_restart_child (line 1002) | defp maybe_restart_child(_, {:shutdown, _}, pid, _child, state) do
method maybe_restart_child (line 1006) | defp maybe_restart_child(:transient, reason, pid, child, state) do
method maybe_restart_child (line 1011) | defp maybe_restart_child(:temporary, reason, pid, child, state) do
method delete_child (line 1016) | defp delete_child(pid, %{children: children} = state) do
method restart_child (line 1020) | defp restart_child(pid, child, state) do
method add_restart (line 1038) | defp add_restart(state) do
method add_restart (line 1052) | defp add_restart(restarts, now, period) do
method restart_child (line 1056) | defp restart_child(:one_for_one, current_pid, child, state) do
method report_error (line 1079) | defp report_error(error, reason, pid, child, %{name: name, extra_argum...
method extract_child (line 1099) | defp extract_child(pid, {{m, f, args}, restart, shutdown, type, _modul...
method call (line 1114) | defp call(supervisor, req) do
method format_report (line 1119) | def format_report(%{
FILE: lib/elixir/lib/enum.ex
class Enum (line 251) | defmodule Enum
method all? (line 359) | def all?(enumerable) do
method all? (line 395) | def all?(first..last//step, fun) do
method all? (line 399) | def all?(enumerable, fun) do
method any? (line 429) | def any?(enumerable) do
method any? (line 460) | def any?(first..last//step, fun) do
method any? (line 464) | def any?(enumerable, fun) do
method chunk (line 505) | def chunk(enumerable, count), do: chunk(enumerable, count, count, nil)
method chunk (line 509) | def chunk(enum, n, step) do
method chunk (line 515) | def chunk(enumerable, count, step, leftover) do
method chunk_every (line 524) | def chunk_every(enumerable, count), do: chunk_every(enumerable, count,...
method chunk_while (line 623) | def chunk_while(enumerable, acc, chunk_fun, after_fun) do
method chunk_by (line 652) | def chunk_by(enumerable, fun) do
method concat (line 670) | def concat(enumerables)
method concat (line 676) | def concat(enums) do
method concat (line 701) | def concat(left, right) do
method count (line 719) | def count(enumerable) do
method count (line 740) | def count(enumerable, fun) do
method dedup (line 835) | def dedup(enumerable) do
method dedup_by (line 862) | def dedup_by(enumerable, fun) do
method drop (line 895) | def drop(enumerable, 0) do
method drop_every (line 937) | def drop_every(enumerable, nth)
method drop_every (line 939) | def drop_every(_enumerable, 1), do: []
method drop_every (line 940) | def drop_every(enumerable, 0), do: to_list(enumerable)
method drop_while (line 963) | def drop_while(enumerable, fun) do
method each (line 986) | def each(enumerable, fun) do
method empty? (line 1014) | def empty?(enumerable) do
method filter (line 1123) | def filter(enumerable, fun) do
method filter_map (line 1133) | def filter_map(enumerable, filter, mapper) do
method find (line 1155) | def find(enumerable, default \\ nil, fun)
method find (line 1161) | def find(enumerable, default, fun) do
method find_index (line 1186) | def find_index(enumerable, fun) do
method find_value (line 1224) | def find_value(enumerable, default \\ nil, fun)
method find_value (line 1230) | def find_value(enumerable, default, fun) do
method flat_map (line 1270) | def flat_map(enumerable, fun) do
method flat_reverse (line 1282) | defp flat_reverse([[elem] | t], acc), do: flat_reverse(t, [elem | acc])
method flat_reverse (line 1283) | defp flat_reverse([h | t], acc), do: flat_reverse(t, h ++ acc)
method flat_reverse (line 1284) | defp flat_reverse([], acc), do: acc
method flat_map_reduce (line 1312) | def flat_map_reduce(enumerable, acc, fun) do
method frequencies (line 1345) | def frequencies(enumerable) do
method group_by (line 1424) | def group_by(enumerable, key_fun, value_fun \\ fn x -> x end)
method group_by (line 1438) | def group_by(enumerable, dict, fun) do
method intersperse (line 1475) | def intersperse(enumerable, separator) do
method into (line 1515) | def into(enumerable, collectable)
method into (line 1517) | def into(enumerable, []) do
method into (line 1529) | def into(%_{} = enumerable, collectable) do
method into (line 1533) | def into(enumerable, %_{} = collectable) do
method into (line 1537) | def into(enumerable, %{} = collectable) do
method into (line 1545) | def into(enumerable, collectable) do
method into_map (line 1549) | defp into_map(%{} = enumerable), do: enumerable
method into_map (line 1551) | defp into_map(enumerable), do: enumerable |> Enum.to_list() |> :maps.f...
method into_map (line 1553) | defp into_map(%{} = enumerable, collectable), do: Map.merge(collectabl...
method into_map (line 1558) | defp into_map(enumerable, collectable),
method into_protocol (line 1561) | defp into_protocol(enumerable, collectable) do
method reduce_into_protocol (line 1579) | defp reduce_into_protocol(enumerable, initial, fun) do
method into (line 1601) | def into(enumerable, [], transform) do
method into (line 1613) | def into(enumerable, %_{} = collectable, transform) do
method into (line 1617) | def into(enumerable, %{} = collectable, transform) do
method into (line 1628) | def into(enumerable, collectable, transform) do
method into_protocol (line 1632) | defp into_protocol(enumerable, collectable, transform) do
method reduce_into_protocol (line 1650) | defp reduce_into_protocol(enumerable, initial, transform, fun) do
method join (line 1680) | def join(enumerable, joiner \\ "")
method join (line 1682) | def join(enumerable, "") do
method map (line 1722) | def map(enumerable, fun)
method map (line 1728) | def map(first..last//step, fun) do
method map (line 1732) | def map(enumerable, fun) do
method map_every (line 1765) | def map_every(enumerable, nth, fun)
method map_every (line 1767) | def map_every(enumerable, 1, fun), do: map(enumerable, fun)
method map_every (line 1768) | def map_every(enumerable, 0, _fun), do: to_list(enumerable)
method map_intersperse (line 1786) | def map_intersperse(enumerable, separator, mapper)
method map_intersperse (line 1792) | def map_intersperse(enumerable, separator, mapper) do
method map_reduce (line 1854) | def map_reduce(enumerable, acc, fun) do
method max (line 1865) | def max(list = [_ | _]), do: :lists.max(list)
method max (line 1926) | def max(enumerable, sorter \\ &>=/2, empty_fallback \\ fn -> raise Enu...
method member? (line 2030) | def member?(enumerable, element) do
method min (line 2045) | def min(list = [_ | _]), do: :lists.min(list)
method min (line 2106) | def min(enumerable, sorter \\ &<=/2, empty_fallback \\ fn -> raise Enu...
method min_max (line 2233) | def min_max(enumerable, sorter_or_empty_fallback \\ fn -> raise Enum.E...
method min_max_by (line 2350) | def min_max_by(
method split_with (line 2422) | def split_with(enumerable, fun) do
method partition (line 2437) | def partition(enumerable, fun) do
method random (line 2476) | def random(enumerable)
method random (line 2485) | def random(first.._//step = range) do
method random (line 2492) | def random(enumerable) do
method random_count (line 2522) | defp random_count(count) do
method reduce (line 2553) | def reduce(enumerable, fun)
method reduce (line 2555) | def reduce([h | t], fun) do
method reduce (line 2559) | def reduce([], _fun) do
method reduce (line 2563) | def reduce(enumerable, fun) do
method reduce (line 2620) | def reduce(first..last//step, acc, fun) do
method reduce (line 2624) | def reduce(%_{} = enumerable, acc, fun) do
method reduce (line 2628) | def reduce(%{} = enumerable, acc, fun) do
method reduce (line 2632) | def reduce(enumerable, acc, fun) do
method reduce_while (line 2670) | def reduce_while(enumerable, acc, fun) do
method reject (line 2691) | def reject(enumerable, fun) do
method reverse (line 2705) | def reverse(enumerable)
method reverse (line 2707) | def reverse([]), do: []
method reverse (line 2708) | def reverse([_] = list), do: list
method reverse (line 2709) | def reverse([element1, element2]), do: [element2, element1]
method reverse (line 2710) | def reverse([element1, element2 | rest]), do: :lists.reverse(rest, [el...
method reverse (line 2711) | def reverse(enumerable), do: reduce(enumerable, [], &[&1 | &2])
method reverse (line 2731) | def reverse(enumerable, tail) do
method slide (line 2812) | def slide(enumerable, range_or_single_index, insertion_index)
method slide (line 2842) | def slide(enumerable, insertion_index.._//_, insertion_index) do
method slide (line 2858) | def slide(enumerable, first..last//_, insertion_index) do
method slide_any (line 2868) | defp slide_any(enumerable, start, middle, last) do
method slide_list_start (line 2904) | defp slide_list_start(list, 0, middle, last), do: slide_list_middle(li...
method slide_list_start (line 2905) | defp slide_list_start([], _start, _middle, _last), do: []
method slide_list_middle (line 2911) | defp slide_list_middle(list, 0, last, start_to_middle) do
method slide_list_middle (line 2917) | defp slide_list_middle([], _, _, acc) do
method slide_list_last (line 2925) | defp slide_list_last(rest, 0, acc) do
method slide_list_last (line 2929) | defp slide_list_last([], _, acc) do
method scan (line 2951) | def scan(enumerable, fun)
method scan (line 2953) | def scan([], _fun), do: []
method scan (line 2955) | def scan([elem | rest], fun) do
method scan (line 2960) | def scan(enumerable, fun) do
method scan (line 2986) | def scan(enumerable, acc, fun) do
method shuffle (line 3012) | def shuffle(enumerable) do
method shuffle_unwrap (line 3021) | defp shuffle_unwrap([{_, h} | rest]), do: [h | shuffle_unwrap(rest)]
method shuffle_unwrap (line 3022) | defp shuffle_unwrap([]), do: []
method slice (line 3089) | def slice(enumerable, first..last//step = index_range) do
method slice (line 3109) | def slice(enumerable, %{__struct__: Range, first: first, last: last} =...
method slice_range (line 3127) | defp slice_range(enumerable, first, last, step) do
method amount_with_step (line 3142) | defp amount_with_step(amount, 1), do: amount
method amount_with_step (line 3143) | defp amount_with_step(amount, step), do: div(amount - 1, step) + 1
method sort (line 3220) | def sort(enumerable) do
method sort (line 3308) | def sort(enumerable, sorter) do
method to_sort_fun (line 3316) | defp to_sort_fun(:asc), do: &<=/2
method to_sort_fun (line 3317) | defp to_sort_fun(:desc), do: &>=/2
method sort_by (line 3433) | def sort_by(enumerable, mapper, sorter \\ :asc)
method split_while (line 3524) | def split_while(enumerable, fun) do
method sum (line 3557) | def sum(enumerable)
method sum (line 3559) | def sum(first..last//step = range) do
method sum (line 3566) | def sum(enumerable) do
method sum_by (line 3594) | def sum_by(enumerable, mapper)
method product (line 3623) | def product(enumerable) do
method product_by (line 3651) | def product_by(enumerable, mapper)
method take (line 3689) | def take(enumerable, amount)
method take (line 3691) | def take(_enumerable, 0), do: []
method take_every (line 3743) | def take_every(enumerable, nth)
method take_every (line 3745) | def take_every(_enumerable, 0), do: []
method take_every (line 3746) | def take_every(enumerable, 1), do: to_list(enumerable)
method take_random (line 3776) | def take_random(enumerable, count)
method take_random (line 3777) | def take_random(_enumerable, 0), do: []
method take_random (line 3778) | def take_random([], _), do: []
method take_random (line 3780) | def take_random(enumerable, 1) do
method take_jdx_w (line 3856) | defp take_jdx_w(idx, w, count) do
method take_index (line 3862) | defp take_index(0), do: 0
method take_index (line 3863) | defp take_index(idx), do: :rand.uniform(idx + 1) - 1
method take_tupled (line 3865) | defp take_tupled(_sample, 0, acc), do: acc
method take_tupled (line 3867) | defp take_tupled(sample, position, acc) do
method take_mapped (line 3872) | defp take_mapped(_sample, 0, acc), do: acc
method take_mapped (line 3874) | defp take_mapped(sample, position, acc) do
method take_while (line 3894) | def take_while(enumerable, fun) do
method to_list (line 3918) | def to_list(%{__struct__: Range} = range), do: Range.to_list(range)
method to_list (line 3919) | def to_list(%_{} = enumerable), do: reverse(enumerable) |> :lists.reve...
method to_list (line 3920) | def to_list(%{} = enumerable), do: Map.to_list(enumerable)
method to_list (line 3921) | def to_list(enumerable), do: reverse(enumerable) |> :lists.reverse()
method uniq (line 3936) | def uniq(enumerable) do
method uniq (line 3942) | def uniq(enumerable, fun) do
method uniq_by (line 3972) | def uniq_by(enumerable, fun) do
method unzip (line 3995) | def unzip(enumerable)
method unzip (line 3997) | def unzip([_ | _] = list) do
method unzip (line 4001) | def unzip([]) do
method unzip (line 4005) | def unzip(enumerable) do
method unzip (line 4014) | defp unzip([{el1, el2} | reversed_list], list1, list2) do
method unzip (line 4018) | defp unzip([], list1, list2) do
method with_index (line 4047) | def with_index(enumerable, fun_or_offset \\ 0)
method zip (line 4096) | def zip(enumerable1, enumerable2) do
method zip (line 4117) | def zip([]), do: []
method zip (line 4119) | def zip(enumerables) do
method zip_with (line 4202) | def zip_with([], _fun), do: []
method zip_with (line 4204) | def zip_with(enumerables, zip_fun) do
method entry_to_string (line 4291) | defp entry_to_string(entry), do: String.Chars.to_string(entry)
method aggregate (line 4293) | defp aggregate([head | tail], fun, _empty) do
method aggregate (line 4297) | defp aggregate([], _fun, empty) do
method aggregate (line 4301) | defp aggregate(first..last//step = range, fun, empty) do
method aggregate (line 4316) | defp aggregate(enumerable, fun, empty) do
method aggregate_list (line 4336) | defp aggregate_list([head | tail], acc, fun) do
method aggregate_list (line 4346) | defp aggregate_list([], acc, _fun), do: acc
method aggregate_by (line 4348) | defp aggregate_by(enumerable, fun, sorter, empty_fallback) do
method reduce_by (line 4366) | defp reduce_by([head | tail], first, fun) do
method reduce_by (line 4370) | defp reduce_by([], _first, _fun) do
method reduce_by (line 4374) | defp reduce_by(enumerable, first, fun) do
method all_list (line 4385) | defp all_list([h | t]) do
method all_list (line 4393) | defp all_list([]) do
method any_list (line 4399) | defp any_list([h | t]) do
method any_list (line 4407) | defp any_list([]) do
method predicate_list (line 4413) | defp predicate_list([h | t], initial, fun) do
method predicate_list (line 4421) | defp predicate_list([], initial, _) do
method predicate_range (line 4435) | defp predicate_range(_first, _last, _step, initial, _fun) do
method concat_list (line 4442) | defp concat_list([h | t]), do: concat_enum([h | t])
method concat_list (line 4443) | defp concat_list([]), do: []
method concat_enum (line 4445) | defp concat_enum(enum) do
method count_until_list (line 4454) | defp count_until_list([], _limit, acc), do: acc
method count_until_list (line 4456) | defp count_until_list([_head | tail], limit, acc) do
method count_until_enum (line 4463) | defp count_until_enum(enumerable, limit) do
method count_until_list (line 4481) | defp count_until_list([], _fun, _limit, acc), do: acc
method count_until_list (line 4483) | defp count_until_list([head | tail], fun, limit, acc) do
method count_until_enum (line 4494) | defp count_until_enum(enumerable, fun, limit) do
method dedup_list (line 4510) | defp dedup_list([value | tail], acc) do
method dedup_list (line 4520) | defp dedup_list([], acc) do
method drop_list (line 4526) | defp drop_list(list, 0), do: list
method drop_list (line 4527) | defp drop_list([_ | tail], counter), do: drop_list(tail, counter - 1)
method drop_list (line 4528) | defp drop_list([], _), do: []
method drop_while_list (line 4532) | defp drop_while_list([head | tail], fun) do
method drop_while_list (line 4540) | defp drop_while_list([], _) do
method filter_list (line 4546) | defp filter_list([head | tail], fun) do
method filter_list (line 4554) | defp filter_list([], _fun) do
method find_list (line 4560) | defp find_list([head | tail], default, fun) do
method find_list (line 4568) | defp find_list([], default, _) do
method find_index_list (line 4574) | defp find_index_list([head | tail], counter, fun) do
method find_index_list (line 4582) | defp find_index_list([], _, _) do
method find_value_list (line 4588) | defp find_value_list([head | tail], default, fun) do
method find_value_list (line 4592) | defp find_value_list([], default, _) do
method flat_map_list (line 4598) | defp flat_map_list([head | tail], fun) do
method flat_map_list (line 4608) | defp flat_map_list([], _fun) do
method intersperse_non_empty_list (line 4614) | defp intersperse_non_empty_list([head], _separator), do: [head]
method intersperse_non_empty_list (line 4616) | defp intersperse_non_empty_list([head | rest], separator) do
method join_list (line 4622) | defp join_list([], _joiner), do: ""
method join_list (line 4624) | defp join_list(list, joiner) do
method join_non_empty_list (line 4630) | defp join_non_empty_list([first], _joiner, acc), do: [entry_to_string(...
method join_non_empty_list (line 4632) | defp join_non_empty_list([first | rest], joiner, acc) do
method map_range (line 4644) | defp map_range(_first, _last, _step, _fun) do
method map_intersperse_list (line 4650) | defp map_intersperse_list([], _, _),
method map_intersperse_list (line 4653) | defp map_intersperse_list([last], _, mapper),
method map_intersperse_list (line 4656) | defp map_intersperse_list([head | rest], separator, mapper),
method reduce_range (line 4667) | defp reduce_range(_first, _last, _step, acc, _fun) do
method reduce_enumerable (line 4671) | defp reduce_enumerable(enumerable, acc, fun) do
method reject_list (line 4677) | defp reject_list([head | tail], fun) do
method reject_list (line 4685) | defp reject_list([], _fun) do
method reverse_slice (line 4691) | defp reverse_slice(rest, idx, idx, count, acc) do
method reverse_slice (line 4696) | defp reverse_slice([elem | rest], idx, start, count, acc) do
method head_slice (line 4700) | defp head_slice(rest, 0, acc), do: {acc, rest}
method head_slice (line 4702) | defp head_slice([elem | rest], count, acc) do
method scan_list (line 4708) | defp scan_list([], _acc, _fun), do: []
method scan_list (line 4710) | defp scan_list([elem | rest], acc, fun) do
method slice_forward (line 4735) | defp slice_forward(enumerable, start, amount, step) do
method slice_list (line 4768) | defp slice_list(list, start, amount, step) do
method slice_enum (line 4776) | defp slice_enum(enumerable, module, start, amount, 1) do
method slice_enum (line 4792) | defp slice_enum(enumerable, module, start, amount, step) do
method slice_count_and_fun (line 4819) | defp slice_count_and_fun(enumerable, step) do
method slice_exact (line 4859) | defp slice_exact(_list, _start, 0, _step, _), do: []
method slice_exact (line 4864) | defp slice_exact(list, start, amount, 1, _),
method slice_exact (line 4867) | defp slice_exact(list, start, amount, step, _),
method drop_exact (line 4870) | defp drop_exact(list, 0), do: list
method drop_exact (line 4871) | defp drop_exact([_ | tail], amount), do: drop_exact(tail, amount - 1)
method take_exact (line 4873) | defp take_exact(_list, 0), do: []
method take_exact (line 4874) | defp take_exact([head | tail], amount), do: [head | take_exact(tail, a...
method sort_reducer (line 4878) | defp sort_reducer(entry, {:split, y, x, r, rs, bool}, fun) do
method sort_reducer (line 4894) | defp sort_reducer(entry, {:pivot, y, x, r, rs, s, bool}, fun) do
method sort_reducer (line 4910) | defp sort_reducer(entry, [x], fun) do
method sort_reducer (line 4914) | defp sort_reducer(entry, acc, _fun) do
method sort_terminator (line 4918) | defp sort_terminator({:split, y, x, r, rs, bool}, fun) do
method sort_terminator (line 4922) | defp sort_terminator({:pivot, y, x, r, rs, s, bool}, fun) do
method sort_terminator (line 4926) | defp sort_terminator(acc, _fun) do
method sort_merge (line 4930) | defp sort_merge(list, fun, true), do: reverse_sort_merge(list, [], fun...
method sort_merge (line 4932) | defp sort_merge(list, fun, false), do: sort_merge(list, [], fun, false)
method sort_merge (line 4934) | defp sort_merge([t1, [h2 | t2] | l], acc, fun, true),
method sort_merge (line 4937) | defp sort_merge([[h2 | t2], t1 | l], acc, fun, false),
method sort_merge (line 4940) | defp sort_merge([l], [], _fun, _bool), do: l
method sort_merge (line 4942) | defp sort_merge([l], acc, fun, bool),
method sort_merge (line 4945) | defp sort_merge([], acc, fun, bool), do: reverse_sort_merge(acc, [], f...
method reverse_sort_merge (line 4947) | defp reverse_sort_merge([[h2 | t2], t1 | l], acc, fun, true),
method reverse_sort_merge (line 4950) | defp reverse_sort_merge([t1, [h2 | t2] | l], acc, fun, false),
method reverse_sort_merge (line 4953) | defp reverse_sort_merge([l], acc, fun, bool),
method reverse_sort_merge (line 4956) | defp reverse_sort_merge([], acc, fun, bool), do: sort_merge(acc, [], f...
method sort_merge1 (line 4958) | defp sort_merge1([h1 | t1], h2, t2, m, fun, bool) do
method sort_merge1 (line 4966) | defp sort_merge1([], h2, t2, m, _fun, _bool), do: :lists.reverse(t2, [...
method sort_merge2 (line 4968) | defp sort_merge2(h1, t1, [h2 | t2], m, fun, bool) do
method sort_merge2 (line 4976) | defp sort_merge2(h1, t1, [], m, _fun, _bool), do: :lists.reverse(t1, [...
method split_list (line 4984) | defp split_list(list, 0, acc) do
method split_list (line 4988) | defp split_list([], _, acc) do
method split_reverse_list (line 4996) | defp split_reverse_list(list, 0, acc) do
method split_reverse_list (line 5000) | defp split_reverse_list([], _, acc) do
method split_while_list (line 5006) | defp split_while_list([head | tail], fun, acc) do
method split_while_list (line 5014) | defp split_while_list([], _, acc) do
method sum_by_list (line 5020) | defp sum_by_list([], _, acc), do: acc
method sum_by_list (line 5021) | defp sum_by_list([h | t], mapper, acc), do: sum_by_list(t, mapper, acc...
method product_by_list (line 5025) | defp product_by_list([], _, acc), do: acc
method product_by_list (line 5026) | defp product_by_list([h | t], mapper, acc), do: product_by_list(t, map...
method take_list (line 5030) | defp take_list(_list, 0), do: []
method take_list (line 5031) | defp take_list([head | tail], counter), do: [head | take_list(tail, co...
method take_list (line 5032) | defp take_list([], _counter), do: []
method take_every_list (line 5034) | defp take_every_list([head | tail], to_drop),
method take_every_list (line 5037) | defp take_every_list([], _to_drop), do: []
method take_every_list (line 5039) | defp take_every_list(_list, 0, _to_drop), do: []
method take_every_list (line 5041) | defp take_every_list([head | tail], counter, to_drop),
method take_every_list (line 5044) | defp take_every_list([], _counter, _to_drop), do: []
method take_while_list (line 5048) | defp take_while_list([head | tail], fun) do
method take_while_list (line 5056) | defp take_while_list([], _) do
method uniq_list (line 5062) | defp uniq_list([head | tail], set, fun) do
method uniq_list (line 5071) | defp uniq_list([], _set, _fun) do
method with_index_list (line 5077) | defp with_index_list([head | tail], offset) do
method with_index_list (line 5081) | defp with_index_list([], _offset), do: []
method with_index_list (line 5083) | defp with_index_list([head | tail], offset, fun) do
method with_index_list (line 5087) | defp with_index_list([], _offset, _fun), do: []
method zip_list (line 5091) | defp zip_list([head1 | next1], [head2 | next2], acc) do
method zip_list (line 5095) | defp zip_list([], _, acc), do: :lists.reverse(acc)
method zip_list (line 5096) | defp zip_list(_, [], acc), do: :lists.reverse(acc)
method zip_with_list (line 5098) | defp zip_with_list([head1 | next1], [head2 | next2], fun) do
method zip_with_list (line 5102) | defp zip_with_list(_, [], _fun), do: []
method zip_with_list (line 5103) | defp zip_with_list([], _, _fun), do: []
method zip_reduce_list (line 5105) | defp zip_reduce_list([head1 | next1], [head2 | next2], acc, fun) do
method zip_reduce_list (line 5109) | defp zip_reduce_list(_, [], acc, _fun), do: acc
method zip_reduce_list (line 5110) | defp zip_reduce_list([], _, acc, _fun), do: acc
FILE: lib/elixir/lib/exception.ex
class Exception (line 5) | defmodule Exception
method format_error (line 73) | def format_error(%struct{} = exception, _stacktrace) do
method exception? (line 79) | def exception?(term)
method exception? (line 80) | def exception?(%_{__exception__: true}), do: true
method exception? (line 81) | def exception?(_), do: false
method message (line 92) | def message(%module{__exception__: true} = exception) do
method normalize (line 125) | def normalize(kind, payload, stacktrace \\ [])
method normalize (line 126) | def normalize(:error, %_{__exception__: true} = payload, _stacktrace),...
method normalize (line 127) | def normalize(:error, payload, stacktrace), do: ErlangError.normalize(...
method normalize (line 128) | def normalize(_kind, payload, _stacktrace), do: payload
method format_banner (line 141) | def format_banner(kind, exception, stacktrace \\ [])
method format_banner (line 143) | def format_banner(:error, exception, stacktrace) do
method format_banner (line 148) | def format_banner(:throw, reason, _stacktrace) do
method format_banner (line 152) | def format_banner(:exit, reason, _stacktrace) do
method format_banner (line 156) | def format_banner({:EXIT, pid}, reason, _stacktrace) do
method format (line 170) | def format(kind, payload, stacktrace \\ [])
method format (line 172) | def format({:EXIT, _} = kind, any, _) do
method format (line 176) | def format(kind, payload, stacktrace) do
method __format_message_with_term__ (line 186) | def __format_message_with_term__(message, term) do
method blame (line 216) | def blame(kind, error, stacktrace)
method blame (line 218) | def blame(:error, error, stacktrace) do
method blame (line 228) | def blame(_kind, reason, stacktrace) do
method blame_mfa (line 257) | defp blame_mfa(module, function, arity, call_args) do
method map_node? (line 290) | defp map_node?({:is_map, _, [_]}), do: true
method map_node? (line 291) | defp map_node?(_), do: false
method map_key_node? (line 292) | defp map_key_node?({:is_map_key, _, [_, _]}), do: true
method map_key_node? (line 293) | defp map_key_node?(_), do: false
method struct_validation_node? (line 295) | defp struct_validation_node?(
method struct_validation_node? (line 300) | defp struct_validation_node?(
method struct_validation_node? (line 305) | defp struct_validation_node?(_), do: false
method struct_macro? (line 307) | defp struct_macro?(
method struct_macro? (line 316) | defp struct_macro?(
method struct_macro? (line 333) | defp struct_macro?(_), do: false
method translate_guard (line 335) | defp translate_guard(guard) do
method undo_is_struct_guard (line 343) | defp undo_is_struct_guard({:and, meta, [_, %{node: {_, _, [{_, _, [_, ...
method blame_arg (line 353) | defp blame_arg({call_arg, ex_arg, erl_arg}, binding) do
method blame_arg (line 358) | defp blame_arg(erl_arg, call_arg, binding) do
method rewrite_arg (line 373) | defp rewrite_arg(arg) do
method blame_guard (line 399) | defp blame_guard(ex_guard, ann, scope, binding) do
method blame_guard? (line 405) | defp blame_guard?(ex_guard, binding, ann, scope) do
method evaluate_guard (line 413) | defp evaluate_guard(kernel_op, meta, guards = [_, _]) do
method evaluate_guard (line 425) | defp evaluate_guard(%{match?: value}), do: value
method rewrite_guard (line 428) | defp rewrite_guard(guard) do
method erl_to_ex (line 435) | defp erl_to_ex(mod, fun, args, meta) do
method blame_wrap (line 442) | defp blame_wrap(match?, ast), do: %{match?: match?, node: ast}
method format_exit (line 453) | def format_exit(reason) do
method format_exit (line 480) | defp format_exit({:shutdown, {:failed_to_start_child, child, {:EXIT, r...
method format_exit (line 486) | defp format_exit({:shutdown, {:failed_to_start_child, child, reason}},...
method format_exit (line 509) | defp format_exit(reason, _joiner) do
method format_exit_reason (line 513) | defp format_exit_reason(:normal), do: "normal"
method format_exit_reason (line 514) | defp format_exit_reason(:shutdown), do: "shutdown"
method format_exit_reason (line 516) | defp format_exit_reason({:shutdown, reason}) do
method format_exit_reason (line 520) | defp format_exit_reason(:calling_self), do: "process attempted to call...
method format_exit_reason (line 521) | defp format_exit_reason(:timeout), do: "time out"
method format_exit_reason (line 522) | defp format_exit_reason(:killed), do: "killed"
method format_exit_reason (line 523) | defp format_exit_reason(:noconnection), do: "no connection"
method format_exit_reason (line 525) | defp format_exit_reason(:noproc) do
method format_exit_reason (line 535) | defp format_exit_reason({:already_started, pid}) do
method format_exit_reason (line 539) | defp format_exit_reason({:bad_return_value, value}) do
method format_exit_reason (line 543) | defp format_exit_reason({:bad_call, request}) do
method format_exit_reason (line 547) | defp format_exit_reason({:bad_cast, request}) do
method format_exit_reason (line 559) | defp format_exit_reason({:bad_start_spec, start_spec}) do
method format_exit_reason (line 563) | defp format_exit_reason({:start_spec, start_spec}) do
method format_exit_reason (line 567) | defp format_exit_reason({:supervisor_data, data}) do
method format_exit_reason (line 571) | defp format_exit_reason(reason), do: inspect(reason)
method format_start_child (line 573) | defp format_start_child(child, reason, joiner) do
method format_sup_data (line 578) | defp format_sup_data({:invalid_type, type}) do
method format_sup_data (line 582) | defp format_sup_data({:invalid_strategy, strategy}) do
method format_sup_data (line 586) | defp format_sup_data({:invalid_intensity, intensity}) do
method format_sup_data (line 590) | defp format_sup_data({:invalid_period, period}) do
method format_sup_data (line 594) | defp format_sup_data({:invalid_max_children, max_children}) do
method format_sup_data (line 598) | defp format_sup_data({:invalid_extra_arguments, extra}) do
method format_sup_data (line 602) | defp format_sup_data(other), do: "got: #{inspect(other)}"
method format_sup_spec (line 604) | defp format_sup_spec({:duplicate_child_name, id}) do
method format_sup_spec (line 617) | defp format_sup_spec({:invalid_child_spec, child_spec}) do
method format_sup_spec (line 621) | defp format_sup_spec({:invalid_child_type, type}) do
method format_sup_spec (line 625) | defp format_sup_spec({:invalid_mfa, mfa}) do
method format_sup_spec (line 629) | defp format_sup_spec({:invalid_restart_type, restart}) do
method format_sup_spec (line 633) | defp format_sup_spec({:invalid_shutdown, shutdown}) do
method format_sup_spec (line 637) | defp format_sup_spec({:invalid_module, mod}) do
method format_sup_spec (line 641) | defp format_sup_spec({:invalid_modules, modules}) do
method format_sup_spec (line 645) | defp format_sup_spec(other), do: "got: #{inspect(other)}"
method format_stacktrace_entry (line 651) | def format_stacktrace_entry(entry)
method format_stacktrace_entry (line 654) | def format_stacktrace_entry({module, :__MODULE__, 0, location}) do
method format_stacktrace_entry (line 659) | def format_stacktrace_entry({_module, :__MODULE__, 1, location}) do
method format_stacktrace_entry (line 664) | def format_stacktrace_entry({_module, :__FILE__, 1, location}) do
method format_stacktrace_entry (line 668) | def format_stacktrace_entry({module, fun, arity, location}) do
method format_stacktrace_entry (line 672) | def format_stacktrace_entry({fun, arity, location}) do
method format_application (line 676) | defp format_application(module) do
method format_stacktrace (line 700) | def format_stacktrace(trace \\ nil) do
method format_file_line (line 792) | def format_file_line(file, line, suffix \\ "") do
method format_file_line_column (line 829) | def format_file_line_column(file, line, column, suffix \\ "") do
method format_delimiter (line 846) | def format_delimiter(delimiter) do
method line_padding (line 928) | defp line_padding(line_number, max_digits) do
method n_spaces (line 941) | defp n_spaces(n), do: String.duplicate(" ", n)
method digits (line 943) | defp digits(number, acc \\ 1)
method digits (line 945) | defp digits(number, acc), do: digits(div(number, 10), acc + 1)
method trimmed_inbetween_lines (line 947) | defp trimmed_inbetween_lines(
method line_range (line 970) | defp line_range(
method format_end_message (line 1014) | defp format_end_message(end_column, message),
method format_start_message (line 1020) | defp format_start_message(start_column, message),
method pad_message (line 1023) | defp pad_message(message, padding), do: String.replace(message, "\n", ...
method red (line 1025) | defp red(string) do
class RuntimeError (line 1039) | defmodule RuntimeError
class ArgumentError (line 1065) | defmodule ArgumentError
class ArithmeticError (line 1085) | defmodule ArithmeticError
method blame (line 1103) | def blame(%{message: message} = exception, [{:erlang, fun, args, _} | ...
method blame (line 1129) | def blame(exception, stacktrace) do
class SystemLimitError (line 1134) | defmodule SystemLimitError
class MismatchedDelimiterError (line 1147) | defmodule MismatchedDelimiterError
method message (line 1185) | def message(%{
method format_message (line 1217) | defp format_message(file, line, column, message) do
class SyntaxError (line 1223) | defmodule SyntaxError
method message (line 1260) | def message(%{
method format_message (line 1273) | defp format_message(file, line, column, message) do
class TokenMissingError (line 1279) | defmodule TokenMissingError
method message (line 1358) | def message(%{
method format_message (line 1371) | defp format_message(file, line, column, message) do
class CompileError (line 1377) | defmodule CompileError
method message (line 1399) | def message(%{file: file, line: line, description: description}) do
class Kernel.TypespecError (line 1407) | defmodule Kernel.TypespecError
method message (line 1429) | def message(%{file: file, line: line, description: description}) do
class BadFunctionError (line 1437) | defmodule BadFunctionError
method message (line 1455) | def message(exception) do
class BadMapError (line 1460) | defmodule BadMapError
method message (line 1475) | def message(exception) do
class BadBooleanError (line 1483) | defmodule BadBooleanError
method message (line 1497) | def message(exception) do
class MatchError (line 1505) | defmodule MatchError
method message (line 1524) | def message(exception) do
class CaseClauseError (line 1532) | defmodule CaseClauseError
method message (line 1554) | def message(exception) do
class WithClauseError (line 1562) | defmodule WithClauseError
method message (line 1588) | def message(exception) do
class CondClauseError (line 1596) | defmodule CondClauseError
method message (line 1612) | def message(_exception) do
class TryClauseError (line 1617) | defmodule TryClauseError
method message (line 1642) | def message(exception) do
class BadArityError (line 1650) | defmodule BadArityError
method message (line 1664) | def message(exception) do
method count (line 1672) | defp count(0, _insp), do: "no arguments"
method count (line 1673) | defp count(1, insp), do: "1 argument (#{insp})"
method count (line 1674) | defp count(x, insp), do: "#{x} arguments (#{insp})"
class UndefinedFunctionError (line 1677) | defmodule UndefinedFunctionError
method message (line 1699) | def message(%{message: nil} = exception) do
method message (line 1705) | def message(%{message: message}) do
method message (line 1709) | defp message(nil, module, function, arity) do
method message (line 1726) | defp message(:"module could not be loaded", module, function, arity) do
method message (line 1733) | defp message(:"function not exported", module, function, arity) do
method message (line 1738) | defp message(:"undefined local", nil, function, arity) do
method message (line 1742) | defp message(reason, module, function, arity) do
method blame (line 1748) | def blame(exception, stacktrace) do
method hint (line 1755) | defp hint(_, _, _, :no_hint), do: ""
method hint (line 1757) | defp hint(nil, _function, 0, _hint_type) do
method hint (line 1762) | defp hint(module, function, arity, :suggest_function) do
method hint (line 1767) | defp hint(module, function, arity, :suggest_module) do
method hint_for_missing_alias (line 1771) | defp hint_for_missing_alias(module) do
method hint_for_missing_module (line 1781) | def hint_for_missing_module(module, function, arity) do
method load_module (line 1808) | defp load_module({name, _path, _loaded?}) do
method downcase_module_name (line 1814) | defp downcase_module_name(module) do
method hint_for_loaded_module (line 1821) | def hint_for_loaded_module(module, function, arity) do
method otp_obsolete (line 1835) | defp otp_obsolete(module, function, arity) do
method hint_for_behaviour (line 1842) | defp hint_for_behaviour(module, function, arity) do
method behaviours_for (line 1858) | defp behaviours_for(module) do
method expects_callback? (line 1864) | defp expects_callback?(behaviour, function, arity) do
method did_you_mean (line 1873) | defp did_you_mean(module, function) do
method format_fa (line 1900) | defp format_fa({_dist, fun, arity}) do
method exports_for (line 1904) | defp exports_for(module) do
method deprecated_functions_for (line 1915) | defp deprecated_functions_for(module) do
class FunctionClauseError (line 1927) | defmodule FunctionClauseError
method message (line 1948) | def message(exception) do
method blame (line 1961) | def blame(%{module: module, function: function, arity: arity} = except...
method blame_match (line 1977) | defp blame_match(%{match?: true, node: node}), do: Macro.to_string(node)
method blame_match (line 1978) | defp blame_match(%{match?: false, node: node}), do: "-" <> Macro.to_st...
method blame (line 1981) | def blame(%{args: nil}, _, _) do
method blame (line 1985) | def blame(exception, inspect_fun, fun) do
method clause_to_string (line 2002) | defp clause_to_string({op, _, [left, right]} = node, fun, parent) do
method clause_to_string (line 2019) | defp clause_to_string(node, fun, _precedence), do: fun.(node)
method format_args (line 2021) | defp format_args(args, inspect_fun) do
method format_clauses (line 2029) | defp format_clauses(clauses, format_clause_fun, limit)
method format_clauses (line 2030) | defp format_clauses(nil, _, _), do: ""
method format_clauses (line 2031) | defp format_clauses([], _, _), do: ""
method format_clauses (line 2033) | defp format_clauses(clauses, format_clause_fun, limit) do
method non_visible_clauses (line 2048) | defp non_visible_clauses(1), do: [" ...\n (1 clause not shown)\n"]
method non_visible_clauses (line 2049) | defp non_visible_clauses(n), do: [" ...\n (#{n} clauses not show...
method pad (line 2051) | defp pad(string) do
class Code.LoadError (line 2056) | defmodule Code.LoadError
method exception (line 2073) | def exception(opts) do
class Protocol.UndefinedError (line 2081) | defmodule Protocol.UndefinedError
method message (line 2100) | def message(%{protocol: protocol, value: value, description: descripti...
method value_type (line 2120) | defp value_type(%{__struct__: struct}), do: "#{inspect(struct)} (a str...
method maybe_description (line 2133) | defp maybe_description(""), do: ""
method maybe_description (line 2134) | defp maybe_description(description), do: ", " <> description
method maybe_available (line 2136) | defp maybe_available(protocol) do
class KeyError (line 2151) | defmodule KeyError
method message (line 2172) | def message(exception = %{message: nil}), do: message(exception.key, e...
method message (line 2173) | def message(%{message: message}), do: message
method message (line 2175) | defp message(key, term) do
method blame (line 2200) | def blame(exception, stacktrace) do
method map_with_atom_keys_only? (line 2213) | defp map_with_atom_keys_only?(term) do
method did_you_mean (line 2222) | defp did_you_mean(missing_key, available_keys) do
method format_suggestions (line 2237) | defp format_suggestions(suggestions) do
class UnicodeConversionError (line 2246) | defmodule UnicodeConversionError
method exception (line 2258) | def exception(opts) do
method detail (line 2273) | defp detail([h | _]) do
class MissingApplicationsError (line 2278) | defmodule MissingApplicationsError
method message (line 2311) | def message(%__MODULE__{apps: apps, description: description}) do
class Enum.OutOfBoundsError (line 2328) | defmodule Enum.OutOfBoundsError
method message (line 2342) | def message(exception = %{message: nil}), do: message(exception.index,...
method message (line 2343) | def message(%{message: message}), do: message
method message (line 2345) | def message(index, enumerable) do
class Enum.EmptyError (line 2360) | defmodule Enum.EmptyError
class File.Error (line 2375) | defmodule File.Error
method message (line 2394) | def message(%{action: action, reason: reason, path: path}) do
class File.CopyError (line 2408) | defmodule File.CopyError
method message (line 2428) | def message(exception) do
class File.RenameError (line 2442) | defmodule File.RenameError
method message (line 2462) | def message(exception) do
class File.LinkError (line 2476) | defmodule File.LinkError
method message (line 2496) | def message(exception) do
class ErlangError (line 2504) | defmodule ErlangError
method message (line 2521) | def message(exception)
method message (line 2523) | def message(%__MODULE__{original: original, reason: nil}) do
method message (line 2527) | def message(%__MODULE__{original: original, reason: reason}) do
method normalize (line 2532) | def normalize(:badarg, stacktrace) do
method normalize (line 2569) | def normalize(:badarith, _stacktrace) do
method normalize (line 2573) | def normalize(:system_limit, stacktrace) do
method normalize (line 2582) | def normalize(:cond_clause, _stacktrace) do
method normalize (line 2586) | def normalize({:badarity, {fun, args}}, _stacktrace) do
method normalize (line 2590) | def normalize({:badfun, term}, _stacktrace) do
method normalize (line 2594) | def normalize({:badmatch, term}, _stacktrace) do
method normalize (line 2598) | def normalize({:badmap, term}, _stacktrace) do
method normalize (line 2602) | def normalize({:badbool, op, term}, _stacktrace) do
method normalize (line 2606) | def normalize({:badkey, key}, stacktrace) do
method normalize (line 2624) | def normalize({:badkey, key, term}, _stacktrace) do
method normalize (line 2633) | def normalize({:case_clause, term}, _stacktrace) do
method normalize (line 2638) | def normalize({:else_clause, term}, _stacktrace) do
method normalize (line 2642) | def normalize({:try_clause, term}, _stacktrace) do
method normalize (line 2646) | def normalize(:undef, stacktrace) do
method normalize (line 2651) | def normalize(:function_clause, stacktrace) do
method normalize (line 2656) | def normalize({:badarg, payload}, _stacktrace) do
method normalize (line 2660) | def normalize(other, stacktrace) do
method from_stacktrace (line 2671) | defp from_stacktrace([{module, function, arity, _} | _]) do
method from_stacktrace (line 2675) | defp from_stacktrace(_) do
method error_info (line 2679) | defp error_info(erl_exception, stacktrace, default_reason) do
method arg_error (line 2714) | defp arg_error({n, message}), do: " * #{nth(n)} argument: #{message}\n"
method nth (line 2716) | defp nth(1), do: "1st"
method nth (line 2717) | defp nth(2), do: "2nd"
method nth (line 2718) | defp nth(3), do: "3rd"
method nth (line 2719) | defp nth(n), do: "#{n}th"
FILE: lib/elixir/lib/file.ex
class File (line 5) | defmodule File
method regular? (line 180) | def regular?(path, opts \\ []) do
method dir? (line 217) | def dir?(path, opts \\ []) do
method exists? (line 248) | def exists?(path, opts \\ []) do
method mkdir (line 278) | def mkdir(path) do
method mkdir! (line 295) | def mkdir!(path) do
method mkdir_p (line 331) | def mkdir_p(path) do
method do_mkdir_p (line 335) | defp do_mkdir_p("/") do
method do_mkdir_p (line 339) | defp do_mkdir_p(path) do
method mkdir_p! (line 374) | def mkdir_p!(path) do
method read (line 421) | def read(path, opts \\ []) do
method read! (line 445) | def read!(path, opts \\ []) do
method stat (line 486) | def stat(path, opts \\ []) do
method stat! (line 511) | def stat!(path, opts \\ []) do
method lstat (line 555) | def lstat(path, opts \\ []) do
method lstat! (line 580) | def lstat!(path, opts \\ []) do
method read_link (line 617) | def read_link(path) do
method read_link! (line 638) | def read_link!(path) do
method write_stat (line 661) | def write_stat(path, stat, opts \\ []) do
method write_stat! (line 679) | def write_stat!(path, stat, opts \\ []) do
method touch (line 719) | def touch(path, time \\ System.os_time(:second))
method touch! (line 756) | def touch!(path, time \\ System.os_time(:second)) do
method ln (line 783) | def ln(existing, new) do
method ln! (line 801) | def ln!(existing, new) do
method ln_s (line 838) | def ln_s(existing, new) do
method ln_s! (line 856) | def ln_s!(existing, new) do
method copy (line 902) | def copy(source, destination, bytes_count \\ :infinity) do
method copy! (line 923) | def copy!(source, destination, bytes_count \\ :infinity) do
method rename (line 964) | def rename(source, destination) do
method rename! (line 984) | def rename!(source, destination) do
method cp (line 1040) | def cp(source_file, destination_file, options \\ [])
method path_differs? (line 1066) | defp path_differs?(path, path), do: false
method path_differs? (line 1068) | defp path_differs?(p1, p2) do
method cp! (line 1090) | def cp!(source_file, destination_file, options \\ []) do
method cp_r (line 1183) | def cp_r(source, destination, options \\ [])
method cp_r! (line 1246) | def cp_r!(source, destination, options \\ []) do
method do_cp_r (line 1332) | defp do_cp_r(_, _, _, _, acc) do
method copy_file_mode (line 1336) | defp copy_file_mode(src, dest) do
method do_cp_file (line 1344) | defp do_cp_file(src, dest, on_conflict, acc) do
method do_cp_link (line 1380) | defp do_cp_link(link, src, dest, on_conflict, acc) do
method write (line 1442) | def write(path, content, modes \\ []) do
method write! (line 1460) | def write!(path, content, modes \\ []) do
method rm (line 1498) | def rm(path) do
method change_mode_windows (line 1513) | defp change_mode_windows(path) do
method change_mode_windows (line 1525) | defp change_mode_windows(path, file_info) do
method rm! (line 1545) | def rm!(path) do
method rmdir (line 1573) | def rmdir(path) do
method rmdir! (line 1593) | def rmdir!(path) do
method rm_rf (line 1627) | def rm_rf(path) do
method do_rm_rf (line 1636) | defp do_rm_rf(path, acc, major) do
method do_rm_regular (line 1669) | defp do_rm_regular(path, acc) do
method do_rm_directory (line 1681) | defp do_rm_directory(path, acc) do
method safe_list_dir (line 1690) | defp safe_list_dir(path, major) do
method rm_rf! (line 1734) | def rm_rf!(path) do
method open (line 1840) | def open(path, modes_or_function \\ [])
method open! (line 1906) | def open!(path, modes_or_function \\ []) do
method open! (line 1932) | def open!(path, modes, function) do
method cwd (line 1960) | def cwd() do
method fix_drive_letter (line 1974) | defp fix_drive_letter(original), do: original
method cwd! (line 1985) | def cwd!() do
method cd (line 2015) | def cd(path) do
method cd! (line 2031) | def cd!(path) do
method cd! (line 2067) | def cd!(path, function) do
method ls (line 2098) | def ls(path \\ ".") do
method ls! (line 2117) | def ls!(path \\ ".") do
method close (line 2148) | def close(io_device) do
method stream! (line 2156) | def stream!(path, line_or_bytes_modes \\ [])
method stream! (line 2224) | def stream!(path, line_or_bytes, modes)
method stream! (line 2236) | def stream!(path, line_or_bytes, modes) do
method chmod (line 2276) | def chmod(path, mode) do
method chmod! (line 2293) | def chmod!(path, mode) do
method chgrp (line 2320) | def chgrp(path, gid) do
method chgrp! (line 2337) | def chgrp!(path, gid) do
method chown (line 2364) | def chown(path, uid) do
method chown! (line 2381) | def chown!(path, uid) do
method assert_no_null_byte! (line 2398) | defp assert_no_null_byte!(binary, operation) do
method normalize_modes (line 2409) | defp normalize_modes([:utf8 | rest], binary?) do
method normalize_modes (line 2413) | defp normalize_modes([:read_ahead | rest], binary?) do
method normalize_modes (line 2426) | defp normalize_modes([mode | rest], binary?) do
method normalize_modes (line 2430) | defp normalize_modes([], true), do: [:binary]
method normalize_modes (line 2431) | defp normalize_modes([], false), do: []
method normalize_path_or_io_device (line 2436) | defp normalize_path_or_io_device(io_device = {:file_descriptor, _, _})...
FILE: lib/elixir/lib/file/stat.ex
class File.Stat (line 7) | defmodule File.Stat
method to_record (line 86) | def to_record(%File.Stat{unquote_splicing(pairs)}) do
method from_record (line 94) | def from_record(file_info)
method from_record (line 96) | def from_record({:file_info, unquote_splicing(vals)}) do
FILE: lib/elixir/lib/file/stream.ex
class File.Stream (line 5) | defmodule File.Stream
method __build__ (line 24) | def __build__(path, line_or_bytes, modes) do
method __open__ (line 55) | def __open__(%File.Stream{path: path, node: node}, modes) do
FILE: lib/elixir/lib/float.ex
class Float (line 7) | defmodule Float
method max_finite (line 69) | def max_finite, do: @max_finite
method min_finite (line 81) | def min_finite, do: @min_finite
method parse (line 155) | def parse("-" <> binary) do
method parse (line 162) | def parse("+" <> binary) do
method parse (line 166) | def parse(binary) do
method parse_unsigned (line 191) | defp parse_unsigned(rest, dot?, _, acc) do
method add_dot (line 202) | defp add_dot(acc, true), do: acc
method add_dot (line 203) | defp add_dot(acc, false), do: [?0, ?. | acc]
method floor (line 239) | def floor(number, precision \\ 0)
method ceil (line 288) | def ceil(number, precision \\ 0)
method round (line 350) | def round(float, precision \\ 0)
method round (line 371) | defp round(float, precision, rounding) do
method decompose (line 430) | defp decompose(significant, initial) do
method decompose (line 434) | defp decompose(<<1::1, bits::bitstring>>, count, last_count, acc) do
method decompose (line 438) | defp decompose(<<0::1, bits::bitstring>>, count, last_count, acc) do
method decompose (line 442) | defp decompose(<<>>, _count, last_count, acc) do
method scale_up (line 447) | defp scale_up(num, boundary, exp), do: scale_up(num <<< 1, boundary, e...
method scale_down (line 449) | defp scale_down(num, den, exp) do
method decimal_to_float (line 459) | defp decimal_to_float(sign, num, den, exp) do
method rounding (line 476) | defp rounding(:floor, 1, _num, div), do: div + 1
method rounding (line 477) | defp rounding(:ceil, 0, _num, div), do: div + 1
method rounding (line 479) | defp rounding(:half_up, _sign, num, div) do
method rounding (line 486) | defp rounding(_, _, _, div), do: div
method root_factors (line 567) | defp root_factors(mantissa, count),
method sign (line 571) | defp sign(0, num), do: num
method sign (line 572) | defp sign(1, num), do: -num
method to_charlist (line 593) | def to_charlist(float) do
method to_string (line 622) | def to_string(float) do
method to_char_list (line 628) | def to_char_list(float), do: Float.to_charlist(float)
method to_char_list (line 632) | def to_char_list(float, options) do
method to_string (line 638) | def to_string(float, options) do
method invalid_precision_message (line 642) | defp invalid_precision_message(precision) do
method expand_compact (line 646) | defp expand_compact([{:compact, false} | t]), do: expand_compact(t)
method expand_compact (line 647) | defp expand_compact([{:compact, true} | t]), do: [:compact | expand_co...
method expand_compact (line 648) | defp expand_compact([h | t]), do: [h | expand_compact(t)]
method expand_compact (line 649) | defp expand_compact([]), do: []
FILE: lib/elixir/lib/function.ex
class Function (line 5) | defmodule Function
method capture (line 89) | def capture(module, function_name, arity) do
method info (line 150) | def info(fun), do: :erlang.fun_info(fun)
method info (line 188) | def info(fun, item), do: :erlang.fun_info(fun, item)
method identity (line 211) | def identity(value), do: value
FILE: lib/elixir/lib/gen_event.ex
class GenEvent (line 5) | defmodule GenEvent
method do_start (line 171) | defp do_start(mode, options) do
method stream (line 202) | def stream(manager, options \\ []) do
method add_handler (line 209) | def add_handler(manager, handler, args) do
method add_mon_handler (line 216) | def add_mon_handler(manager, handler, args) do
method notify (line 223) | def notify(manager, event)
method notify (line 225) | def notify({:global, name}, msg) do
method sync_notify (line 254) | def sync_notify(manager, event) do
method ack_notify (line 261) | def ack_notify(manager, event) do
method call (line 268) | def call(manager, handler, request, timeout \\ 5000) do
method remove_handler (line 282) | def remove_handler(manager, handler, args) do
method swap_handler (line 289) | def swap_handler(manager, handler1, args1, handler2, args2) do
method swap_mon_handler (line 296) | def swap_mon_handler(manager, handler1, args1, handler2, args2) do
method which_handlers (line 303) | def which_handlers(manager) do
method stop (line 310) | def stop(manager, reason \\ :normal, timeout \\ :infinity) do
method rpc (line 314) | defp rpc(module, cmd) do
method init_it (line 325) | def init_it(starter, :self, name, mod, args, options) do
method init_it (line 329) | def init_it(starter, parent, name, _mod, _args, options) do
method init_hib (line 337) | def init_hib(parent, name, handlers, debug) do
method name (line 341) | defp name({:local, name}), do: name
method name (line 342) | defp name({:global, name}), do: name
method name (line 343) | defp name({:via, _, name}), do: name
method loop (line 348) | defp loop(parent, name, handlers, debug, true) do
method loop (line 352) | defp loop(parent, name, handlers, debug, false) do
method fetch_msg (line 356) | defp fetch_msg(parent, name, handlers, debug, hib) do
method handle_msg (line 373) | defp handle_msg(msg, parent, name, handlers, debug) do
method system_continue (line 459) | def system_continue(parent, debug, [name, handlers, hib]) do
method system_terminate (line 464) | def system_terminate(reason, parent, _debug, [name, handlers, _hib]) do
method system_code_change (line 469) | def system_code_change([name, handlers, hib], module, old_vsn, extra) do
method system_get_state (line 484) | def system_get_state([_name, handlers, _hib]) do
method system_replace_state (line 494) | def system_replace_state(fun, [name, handlers, hib]) do
method format_status (line 517) | def format_status(opt, status_data) do
method print_event (line 546) | defp print_event(dev, {:in, msg}, name) do
method print_event (line 562) | defp print_event(dev, dbg, name) do
method server_add_handler (line 566) | defp server_add_handler({module, id}, args, handlers) do
method server_add_handler (line 571) | defp server_add_handler(module, args, handlers) do
method server_add_mon_handler (line 576) | defp server_add_mon_handler({module, id}, args, handlers, notify) do
method server_add_mon_handler (line 582) | defp server_add_mon_handler(module, args, handlers, notify) do
method server_add_process_handler (line 588) | defp server_add_process_handler(pid, handlers, notify) do
method server_remove_handler (line 594) | defp server_remove_handler(module, args, handlers, name) do
method server_swap_handler (line 598) | defp server_swap_handler(module1, args1, module2, args2, handlers, sup...
method server_info (line 609) | defp server_info(event, handlers, name) do
method server_event (line 614) | defp server_event(mode, event, handlers, name) do
method server_split_process_handlers (line 620) | defp server_split_process_handlers(mode, event, [handler | t], handler...
method server_split_process_handlers (line 631) | defp server_split_process_handlers(_mode, _event, [], handlers, stream...
method server_process_notify (line 635) | defp server_process_notify(mode, event, handler(state: {pid, ref})) do
method mode_to_tag (line 639) | defp mode_to_tag(:ack), do: :ack_notify
method mode_to_tag (line 640) | defp mode_to_tag(:sync), do: :sync_notify
method mode_to_tag (line 641) | defp mode_to_tag(:async), do: :notify
method server_notify (line 643) | defp server_notify(event, fun, [handler | t], name, handlers, acc, hib...
method server_notify (line 653) | defp server_notify(_, _, [], _, _, acc, hib) do
method server_update (line 657) | defp server_update(handler, fun, event, name, _handlers) do
method server_collect_process_handlers (line 685) | defp server_collect_process_handlers(:async, event, [handler | t], han...
method server_collect_process_handlers (line 708) | defp server_collect_process_handlers(_mode, _event, [], handlers, _nam...
method server_call (line 712) | defp server_call(module, query, handlers, name) do
method server_call_update (line 728) | defp server_call_update(handler, query, name, _handlers) do
method server_get_modules (line 756) | defp server_get_modules(handlers) do
method server_which_handlers (line 762) | defp server_which_handlers(handlers) do
method server_terminate (line 766) | defp server_terminate(reason, _parent, handlers, name) do
method reply (line 775) | defp reply({from, ref}, msg) do
method handle_down (line 779) | defp handle_down(ref, reason, handlers, name) do
method do_add_handler (line 790) | defp do_add_handler(module, handler, arg, handlers, succ) do
method do_take_handler (line 818) | defp do_take_handler(module, args, handlers, name, last_in, reason) do
method do_terminate (line 828) | defp do_terminate(handler, arg, last_in, name, reason) do
method do_handler (line 841) | defp do_handler(mod, fun, args) do
method report_terminate (line 853) | defp report_terminate(handler, reason, state, last_in, name) do
method report_error (line 865) | defp report_error(_handler, :normal, _, _, _), do: :ok
method report_error (line 866) | defp report_error(_handler, :shutdown, _, _, _), do: :ok
method report_error (line 867) | defp report_error(_handler, {:swapped, _, _}, _, _, _), do: :ok
method report_error (line 869) | defp report_error(handler, reason, state, last_in, name) do
method report_status (line 898) | defp report_status(handler(module: module), state) do
FILE: lib/elixir/lib/gen_event/stream.ex
class GenEvent.Stream (line 5) | defmodule GenEvent.Stream
method init (line 13) | def init({_pid, _ref} = state) do
method handle_event (line 18) | def handle_event(event, _state) do
method handle_call (line 27) | def handle_call(msg, _state) do
method handle_info (line 38) | def handle_info(_msg, state) do
method terminate (line 43) | def terminate(_reason, _state) do
method code_change (line 48) | def code_change(_old, state, _extra) do
FILE: lib/elixir/lib/gen_server.ex
class GenServer (line 5) | defmodule GenServer
method do_start (line 1088) | defp do_start(link, module, init_arg, options) do
method stop (line 1128) | def stop(server, reason \\ :normal, timeout \\ :infinity) do
method cast (line 1199) | def cast(server, request)
method cast (line 1201) | def cast({:global, name}, request) do
method cast (line 1210) | def cast({:via, mod, name}, request) do
method cast_msg (line 1240) | defp cast_msg(req) do
method do_send (line 1244) | defp do_send(dest, msg) do
method multi_call (line 1280) | def multi_call(nodes \\ [node() | Node.list()], name, request, timeout...
method reply (line 1315) | def reply(client, reply) do
method whereis (line 1336) | def whereis(server)
method whereis (line 1344) | def whereis({:global, name}) do
method whereis (line 1351) | def whereis({:via, mod, name}) do
method format_report (line 1367) | def format_report(%{
FILE: lib/elixir/lib/hash_dict.ex
class HashDict (line 5) | defmodule HashDict
method new (line 36) | def new do
method put (line 41) | def put(%HashDict{root: root, size: size}, key, value) do
method fetch (line 61) | def fetch(%HashDict{root: root}, key) do
method delete (line 66) | def delete(dict, key) do
method pop (line 74) | def pop(dict, key, default \\ nil) do
method size (line 82) | def size(%HashDict{size: size}) do
method reduce (line 88) | def reduce(%HashDict{root: root}, acc, fun) do
method dict_delete (line 99) | def dict_delete(%HashDict{root: root, size: size}, key) do
method do_fetch (line 108) | defp do_fetch(node, key, hash) do
method do_put (line 119) | defp do_put(node, key, value, hash) do
method do_update (line 142) | defp do_update(node, key, default, fun, hash) do
method do_delete (line 165) | defp do_delete(node, key, hash) do
method do_reduce_each (line 212) | defp do_reduce_each(_node, {:halt, acc}, _fun, _next) do
method do_reduce_each (line 216) | defp do_reduce_each(node, {:suspend, acc}, fun, next) do
method do_reduce_each (line 220) | defp do_reduce_each([], acc, _fun, next) do
method do_reduce_each (line 224) | defp do_reduce_each([k | v], {:cont, acc}, fun, next) do
method do_reduce_each (line 228) | defp do_reduce_each({k, v, n}, {:cont, acc}, fun, next) do
method do_reduce (line 241) | defp do_reduce(_node, acc, _fun, 0, next) do
method key_hash (line 249) | defp key_hash(key) do
method key_mask (line 253) | defp key_mask(hash) do
method key_shift (line 257) | defp key_shift(hash) do
FILE: lib/elixir/lib/hash_set.ex
class HashSet (line 5) | defmodule HashSet
method new (line 31) | def new do
method union (line 41) | def union(%HashSet{} = set1, %HashSet{} = set2) do
method intersection (line 46) | def intersection(%HashSet{} = set1, %HashSet{} = set2) do
method difference (line 53) | def difference(%HashSet{} = set1, %HashSet{} = set2) do
method to_list (line 58) | def to_list(set) do
method equal? (line 63) | def equal?(%HashSet{size: size1} = set1, %HashSet{size: size2} = set2) do
method subset? (line 71) | def subset?(%HashSet{} = set1, %HashSet{} = set2) do
method disjoint? (line 82) | def disjoint?(%HashSet{} = set1, %HashSet{} = set2) do
method member? (line 93) | def member?(%HashSet{root: root}, term) do
method put (line 98) | def put(%HashSet{root: root, size: size}, term) do
method delete (line 104) | def delete(%HashSet{root: root, size: size} = set, term) do
method reduce (line 112) | def reduce(%HashSet{root: root}, acc, fun) do
method size (line 121) | def size(%HashSet{size: size}) do
method set_fold (line 127) | defp set_fold(%HashSet{root: root}, acc, fun) do
method do_member? (line 133) | defp do_member?(node, term, hash) do
method do_put (line 144) | defp do_put(node, term, hash) do
method do_delete (line 164) | defp do_delete(node, term, hash) do
method do_fold_each (line 211) | defp do_fold_each([], acc, _fun), do: acc
method do_fold_each (line 212) | defp do_fold_each([t], acc, fun), do: fun.(t, acc)
method do_fold_each (line 213) | defp do_fold_each([t | n], acc, fun), do: do_fold(n, fun.(t, acc), fun...
method do_fold (line 220) | defp do_fold(_node, acc, _fun, 0) do
method do_reduce_each (line 226) | defp do_reduce_each(_node, {:halt, acc}, _fun, _next) do
method do_reduce_each (line 230) | defp do_reduce_each(node, {:suspend, acc}, fun, next) do
method do_reduce_each (line 234) | defp do_reduce_each([], acc, _fun, next) do
method do_reduce_each (line 238) | defp do_reduce_each([t], {:cont, acc}, fun, next) do
method do_reduce_each (line 242) | defp do_reduce_each([t | n], {:cont, acc}, fun, next) do
method do_reduce (line 255) | defp do_reduce(_node, acc, _fun, 0, next) do
method key_hash (line 263) | defp key_hash(key) do
method key_mask (line 267) | defp key_mask(hash) do
method key_shift (line 271) | defp key_shift(hash) do
FILE: lib/elixir/lib/inspect/algebra.ex
class Inspect.Opts (line 5) | defmodule Inspect.Opts
method new (line 140) | def new(opts) do
method default_inspect_fun (line 149) | def default_inspect_fun do
class Inspect.Algebra (line 191) | defmodule Inspect.Algebra
method to_doc (line 383) | def to_doc(term, opts) do
method to_doc_with_opts (line 396) | def to_doc_with_opts(term, opts)
method to_doc_with_opts (line 398) | def to_doc_with_opts(%_{} = struct, %Inspect.Opts{inspect_fun: fun} = ...
method to_doc_with_opts (line 452) | def to_doc_with_opts(arg, %Inspect.Opts{inspect_fun: fun} = opts) do
method valid_struct? (line 456) | defp valid_struct?(%module{} = struct) do
method valid_struct? (line 470) | defp valid_struct?([], _struct, 0),
method valid_struct? (line 473) | defp valid_struct?(_fields, _struct, _count),
method pack_opts (line 476) | defp pack_opts({_doc, %Inspect.Opts{}} = doc_opts, _opts), do: doc_opts
method pack_opts (line 477) | defp pack_opts(doc, opts), do: {doc, opts}
method container_doc (line 497) | def container_doc(left, collection, right, inspect_opts, fun, opts \\ ...
method container_each (line 581) | defp container_each([], opts, _fun, acc, simple?) do
method container_each (line 594) | defp container_each([left | right], opts, fun, acc, simple?) do
method call_container_fun (line 610) | defp call_container_fun(fun, term, %{limit: limit} = opts) do
method join (line 620) | defp join(doc_nil(), doc_nil(), _, _), do: doc_nil()
method join (line 621) | defp join(left, doc_nil(), _, _), do: left
method join (line 622) | defp join(doc_nil(), right, _, _), do: right
method join (line 623) | defp join(left, right, true, sep), do: flex_glue(concat(left, sep), ri...
method join (line 624) | defp join(left, right, false, sep), do: glue(concat(left, sep), right)
method simple? (line 626) | defp simple?(doc_cons(left, right)), do: simple?(left) and simple?(right)
method simple? (line 627) | defp simple?(doc_color(doc, _)), do: simple?(doc)
method simple? (line 628) | defp simple?(doc_string(_, _)), do: true
method simple? (line 629) | defp simple?(doc_nil()), do: true
method simple? (line 630) | defp simple?(other), do: is_binary(other)
method color (line 654) | def color(doc, key, opts) do
method ansi (line 672) | defp ansi(color) do
method empty (line 702) | def empty, do: doc_nil()
method no_limit (line 768) | def no_limit(doc) do
method nest (line 817) | def nest(doc, level, mode \\ :always)
method space (line 1077) | def space(doc1, doc2), do: concat(doc1, concat(" ", doc2))
method line (line 1100) | def line(), do: doc_line()
method line (line 1115) | def line(doc1, doc2), do: concat(doc1, concat(line(), doc2))
method fold_doc (line 1119) | def fold_doc(docs, folder_fun), do: fold(docs, folder_fun)
method fold (line 1141) | def fold(docs, folder_fun)
method fold (line 1143) | def fold([], _folder_fun), do: empty()
method fold (line 1144) | def fold([doc], _folder_fun), do: doc
method fits? (line 1203) | defp fits?(_, _, _, []), do: true
method fits? (line 1204) | defp fits?(w, k, _, {:tail, b?, t}), do: fits?(w, k, b?, t)
method fits? (line 1211) | defp fits?(_w, _k, b?, [:group_over | _]),
method fits? (line 1216) | defp fits?(w, k, b?, [{i, _, doc_fits(x, :disabled)} | t]),
method fits? (line 1219) | defp fits?(w, k, b?, [{i, :flat_no_break, doc_fits(x, _)} | t]),
method fits? (line 1222) | defp fits?(w, k, b?, [{i, _, doc_group(x, :pessimistic)} | t]),
method fits? (line 1225) | defp fits?(w, k, b?, [{i, :flat_no_break, doc_group(x, _)} | t]),
method fits? (line 1230) | defp fits?(w, k, b?, [{i, _, doc_fits(x, :enabled)} | t]),
method fits? (line 1233) | defp fits?(w, k, b?, [{i, _, doc_group(x, :optimistic)} | t]),
method fits? (line 1236) | defp fits?(w, k, b?, [{i, :break_no_flat, doc_force(x)} | t]),
method fits? (line 1239) | defp fits?(_, _, _, [{_, :break_no_flat, doc_break(_, _)} | _]), do: true
method fits? (line 1240) | defp fits?(_, _, _, [{_, :break_no_flat, doc_line()} | _]), do: true
method fits? (line 1244) | defp fits?(_, _, _, [{_, :break, doc_break(_, _)} | _]), do: true
method fits? (line 1245) | defp fits?(_, _, _, [{_, :break, doc_line()} | _]), do: true
method fits? (line 1247) | defp fits?(w, k, b?, [{i, :break, doc_group(x, _)} | t]),
method fits? (line 1252) | defp fits?(w, _, _, [{i, _, doc_line()} | t]), do: fits?(w, i, false, t)
method fits? (line 1253) | defp fits?(w, k, b?, [{_, _, doc_nil()} | t]), do: fits?(w, k, b?, t)
method fits? (line 1254) | defp fits?(w, _, b?, [{i, _, doc_collapse(_)} | t]), do: fits?(w, i, b...
method fits? (line 1255) | defp fits?(w, k, b?, [{i, m, doc_color(x, _)} | t]), do: fits?(w, k, b...
method fits? (line 1256) | defp fits?(w, k, b?, [{_, _, doc_string(_, l)} | t]), do: fits?(w, k +...
method fits? (line 1258) | defp fits?(_, _, _, [{_, _, doc_force(_)} | _]), do: false
method fits? (line 1259) | defp fits?(w, k, _, [{_, _, doc_break(s, _)} | t]), do: fits?(w, k + b...
method fits? (line 1260) | defp fits?(w, k, b?, [{i, m, doc_nest(x, _, :break)} | t]), do: fits?(...
method fits? (line 1262) | defp fits?(w, k, b?, [{i, m, doc_nest(x, j, _)} | t]),
method fits? (line 1265) | defp fits?(w, k, b?, [{i, m, doc_cons(x, y)} | t]),
method fits? (line 1268) | defp fits?(w, k, b?, [{i, m, doc_group(x, _)} | t]),
method fits? (line 1274) | defp fits?(_w, k, b?, [{i, m, doc_limit(x, w)} | t]),
method format (line 1283) | defp format(_, _, [], acc), do: acc
method format (line 1285) | defp format(w, k, [{_, _, doc_nil()} | t], acc),
method format (line 1288) | defp format(w, _, [{i, _, doc_line()} | t], acc),
method format (line 1291) | defp format(w, k, [{i, m, doc_cons(x, y)} | t], acc),
method format (line 1294) | defp format(w, k, [{i, m, doc_color(x, c)} | t], acc),
method format (line 1297) | defp format(w, k, [{_, _, doc_string(s, l)} | t], acc),
method format (line 1303) | defp format(w, k, [{i, m, doc_force(x)} | t], acc),
method format (line 1306) | defp format(w, k, [{i, m, doc_fits(x, _)} | t], acc),
method format (line 1309) | defp format(w, _, [{i, _, doc_collapse(max)} | t], acc),
method format (line 1313) | defp format(w, k, [{i, m, doc_break(s, :flex)} | t], acc) do
method format (line 1324) | defp format(w, k, [{i, mode, doc_break(s, :strict)} | t], acc) do
method format (line 1333) | defp format(w, k, [{i, mode, doc_nest(x, j, nest)} | t], acc) do
method format (line 1342) | defp format(w, k, [:group_over | t], acc) do
method format (line 1347) | defp format(w, k, [{i, :break, doc_group(x, :inherit)} | t], acc) do
method format (line 1351) | defp format(w, k, [{i, :flat, doc_group(x, :optimistic)} | t], acc) do
method format (line 1359) | defp format(w, k, [{i, _, doc_group(x, _)} | t], acc) do
method format (line 1372) | defp format(_w, k, [{i, m, doc_limit(x, w)} | t], acc) do
method collapse (line 1376) | defp collapse(["\n" <> rest | t], max, count, i) do
method collapse (line 1380) | defp collapse(["" | t], max, count, i) do
method collapse (line 1384) | defp collapse(t, max, count, i) do
method strip_whitespace (line 1388) | defp strip_whitespace(" " <> rest), do: strip_whitespace(rest)
method strip_whitespace (line 1389) | defp strip_whitespace(rest), do: rest
method apply_nesting (line 1391) | defp apply_nesting(_, k, :cursor), do: k
method apply_nesting (line 1392) | defp apply_nesting(_, _, :reset), do: 0
method apply_nesting (line 1393) | defp apply_nesting(i, _, j), do: i + j
method indent (line 1395) | defp indent(0), do: @newline
method indent (line 1396) | defp indent(i), do: @newline <> :binary.copy(" ", i)
FILE: lib/elixir/lib/inspect/error.ex
class Inspect.Error (line 4) | defmodule Inspect.Error
method message (line 28) | def message(%__MODULE__{
FILE: lib/elixir/lib/integer.ex
class Integer (line 5) | defmodule Integer
method popcount (line 57) | defp popcount(0, acc), do: acc
method popcount (line 58) | defp popcount(n, acc), do: popcount(n &&& n - 1, acc + 1)
method mod (line 172) | def mod(dividend, divisor) do
method floor_div (line 206) | def floor_div(dividend, divisor) do
method ceil_div (line 235) | def ceil_div(dividend, divisor) do
method digits (line 270) | defp digits(0, _base, acc), do: acc
method digits (line 272) | defp digits(integer, base, acc),
method undigits (line 298) | defp undigits([], _base, acc), do: acc
method parse (line 352) | def parse(binary, base \\ 10)
method count_digits (line 376) | defp count_digits(<<rest::bits>>, base) do
method count_digits_nosign (line 392) | defp count_digits_nosign(<<_::bits>>, _, count), do: count
method to_string (line 428) | def to_string(integer, base \\ 10) do
method to_charlist (line 466) | def to_charlist(integer, base \\ 10) do
method gcd_positive (line 505) | defp gcd_positive(0, integer2), do: integer2
method gcd_positive (line 506) | defp gcd_positive(integer1, 0), do: integer1
method gcd_positive (line 507) | defp gcd_positive(integer1, integer2), do: gcd_positive(integer2, rem(...
method extended_gcd (line 547) | def extended_gcd(0, 0), do: {0, 0, 0}
method extended_gcd (line 557) | defp extended_gcd(r1, r0, s1, s0, t1, t0) do
method to_char_list (line 569) | def to_char_list(integer), do: Integer.to_charlist(integer)
method to_char_list (line 573) | def to_char_list(integer, base), do: Integer.to_charlist(integer, base)
FILE: lib/elixir/lib/io.ex
class IO (line 5) | defmodule IO
method read (line 177) | def read(device \\ :stdio, line_or_chars)
method read (line 180) | def read(device, :all) do
method read (line 193) | def read(device, :eof) do
method read (line 197) | def read(device, :line) do
method binread (line 234) | def binread(device \\ :stdio, line_or_chars)
method binread (line 237) | def binread(device, :all) do
method binread (line 242) | def binread(device, :eof) do
method binread (line 246) | def binread(device, :line) do
method binread_eof (line 261) | defp binread_eof(mapped_dev, acc) do
method write (line 284) | def write(device \\ :stdio, chardata) do
method warn (line 370) | def warn(message, stacktrace_info)
method warn (line 372) | def warn(message, %Macro.Env{line: line, file: file} = env) do
method warn (line 380) | def warn(message, [{_, _} | _] = keyword) do
method warn (line 404) | def warn(message, []) do
method warn (line 409) | def warn(message, [{_, _, _, _} | _] = stacktrace) do
method warn_once (line 415) | def warn_once(key, message, stacktrace_drop_levels) do
method warn (line 444) | def warn(message) do
method inspect (line 503) | def inspect(item, opts \\ []) do
method getn (line 537) | def getn(prompt, count \\ 1)
method getn (line 539) | def getn(prompt, :eof) do
method getn (line 570) | def getn(device, prompt, :eof) do
method getn_eof (line 578) | defp getn_eof(device, prompt, acc) do
method wrap_eof (line 588) | defp wrap_eof([]), do: :eof
method gets (line 614) | def gets(device \\ :stdio, prompt) do
method stream (line 628) | def stream, do: stream(:stdio, :line)
method binstream (line 683) | def binstream, do: binstream(:stdio, :line)
method chardata_to_string (line 736) | def chardata_to_string(chardata)
method iodata_to_binary (line 776) | def iodata_to_binary(iodata) do
method iodata_length (line 795) | def iodata_length(iodata) do
method iodata_empty? (line 817) | def iodata_empty?(""), do: true
method iodata_empty? (line 818) | def iodata_empty?([]), do: true
method iodata_empty? (line 819) | def iodata_empty?([head | tail]), do: iodata_empty?(head) and iodata_e...
method iodata_empty? (line 820) | def iodata_empty?(_), do: false
method each_stream (line 823) | def each_stream(device, line_or_codepoints) do
method each_binstream (line 837) | def each_binstream(device, line_or_chars) do
method map_dev (line 853) | defp map_dev(:stdio), do: :standard_io
method map_dev (line 854) | defp map_dev(:stderr), do: :standard_error
method to_chardata (line 858) | defp to_chardata(other), do: to_string(other)
FILE: lib/elixir/lib/io/ansi.ex
class IO.ANSI (line 5) | defmodule IO.ANSI
method enabled? (line 53) | def enabled? do
method syntax_colors (line 81) | def syntax_colors do
method format_sequence (line 119) | defp format_sequence(unquote(name)) do
method format_sequence (line 262) | defp format_sequence(other) do
method do_format (line 313) | defp do_format([term | rest], rem, acc, emit?, append_reset) do
method do_format (line 330) | defp do_format([], [next | rest], acc, emit?, append_reset) do
method do_format (line 334) | defp do_format([], [], acc, true, true) do
method do_format (line 338) | defp do_format([], [], acc, _emit?, _append_reset) do
FILE: lib/elixir/lib/io/ansi/docs.ex
class IO.ANSI.Docs (line 5) | defmodule IO.ANSI.Docs
method default_options (line 48) | def default_options do
method print_headings (line 70) | def print_headings(headings, options \\ []) do
method print_each_metadata (line 102) | defp print_each_metadata(metadata, options) do
method metadata_label (line 123) | defp metadata_label(key, options) do
method print (line 133) | def print(doc, format, options \\ [])
method print_markdown (line 145) | def print_markdown(doc, options) do
method process (line 154) | defp process([], text, indent, options) do
method process (line 158) | defp process(["# " <> _ = heading | rest], text, indent, options) do
method process (line 162) | defp process(["## " <> _ = heading | rest], text, indent, options) do
method process (line 166) | defp process(["### " <> _ = heading | rest], text, indent, options) do
method process (line 170) | defp process(["#### " <> _ = heading | rest], text, indent, options) do
method process (line 174) | defp process(["##### " <> _ = heading | rest], text, indent, options) do
method process (line 178) | defp process(["###### " <> _ = heading | rest], text, indent, options) do
method process (line 182) | defp process([">" <> line | rest], text, indent, options) do
method process (line 187) | defp process(["" | rest], text, indent, options) do
method process (line 192) | defp process([" " <> line | rest], text, indent, options) do
method process (line 197) | defp process(["```mermaid" <> _line | rest], text, indent, options) do
method process (line 206) | defp process(["```" <> _line | rest], text, indent, options) do
method process (line 210) | defp process(["<!--" <> line | rest], text, indent, options) do
method process (line 214) | defp process(all = [line | rest], text, indent, options) do
method write_heading (line 233) | defp write_heading(heading, rest, text, indent, options) do
method process_quote (line 242) | defp process_quote([">", ">" <> line | rest], lines, indent, options) do
method process_quote (line 248) | defp process_quote([">" <> line | rest], lines, indent, options) do
method process_quote (line 252) | defp process_quote(rest, lines, indent, options) do
method write_quote (line 257) | defp write_quote(lines, indent, options, no_wrap) do
method write_empty_quote_line (line 269) | defp write_empty_quote_line(options) do
method process_rest (line 277) | defp process_rest(stripped, rest, count, text, indent, options) do
method process_list (line 296) | defp process_list(entry, line, rest, count, indent, options) do
method process_list_next (line 310) | defp process_list_next([line | rest], count, max, acc) do
method process_list_next (line 320) | defp process_list_next([], _count, _max, acc) do
method process_list_next_kind (line 324) | defp process_list_next_kind(stripped, rest, count, next_count) do
method write_text (line 349) | defp write_text(text, indent, options) do
method write_text (line 356) | defp write_text([], _indent, _options, _no_wrap) do
method write_text (line 360) | defp write_text(lines, indent, options, no_wrap) do
method write_lines (line 364) | defp write_lines(lines, indent, options, no_wrap, prefix) do
method format_text (line 374) | defp format_text(text, options) do
method process_code (line 383) | defp process_code(["", " " <> line | rest], code, indent, options) do
method process_code (line 387) | defp process_code([" " <> line | rest], code, indent, options) do
method process_code (line 391) | defp process_code(rest, code, indent, options) do
method process_fenced_code_block (line 396) | defp process_fenced_code_block(rest, text, indent, options, delimiter) do
method process_fenced_code (line 401) | defp process_fenced_code([], code, indent, options, _delimiter) do
method process_fenced_code (line 405) | defp process_fenced_code([line | rest], code, indent, options, delimit...
method write_code (line 413) | defp write_code(code, indent, options) do
method process_table (line 420) | defp process_table(lines, indent, options) do
method table_lines (line 427) | defp table_lines(lines, options) do
method split_into_columns (line 445) | defp split_into_columns(line, options) do
method render_column (line 453) | defp render_column(col, options) do
method pad_to_number_of_columns (line 464) | defp pad_to_number_of_columns(cols, col_count),
method max_column_widths (line 467) | defp max_column_widths(cols, widths),
method render_table (line 471) | defp render_table([first, second | rest], widths, options) do
method render_table (line 485) | defp render_table([first | rest], widths, options) do
method render_table (line 491) | defp render_table([], _, _), do: nil
method column_alignment (line 493) | defp column_alignment({line, _}) do
method table_header? (line 501) | defp table_header?(line) do
method table_header_column? (line 505) | defp table_header_column?(":" <> rest), do: table_header_contents?(rest)
method table_header_column? (line 506) | defp table_header_column?(col), do: table_header_contents?(col)
method table_header_contents? (line 508) | defp table_header_contents?("-" <> rest
Copy disabled (too large)
Download .json
Condensed preview — 770 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (14,245K chars).
[
{
"path": ".formatter.exs",
"chars": 502,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": ".gitattributes",
"chars": 216,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 448,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\n---\nblank_issues_enabled: true\n\nco"
},
{
"path": ".github/ISSUE_TEMPLATE/issue.yml",
"chars": 1609,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\n---\nname: Report an issue\ndescript"
},
{
"path": ".github/dependabot.yml",
"chars": 240,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nversion: 2\nupdates:\n - package-ec"
},
{
"path": ".github/workflows/ci.yml",
"chars": 4202,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": ".github/workflows/codeql.yml",
"chars": 1512,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2026 The Elixir Team\n\nname: \"CodeQL Advanced\"\n\non:\n pus"
},
{
"path": ".github/workflows/license_compliance.yml",
"chars": 933,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nname: License Compliance\n\non:\n pu"
},
{
"path": ".github/workflows/markdown.yml",
"chars": 778,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nname: Markdown Content\n\non:\n push"
},
{
"path": ".github/workflows/notify.exs",
"chars": 2081,
"preview": "# #!/usr/bin/env elixir\n\n# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\n[tag] = S"
},
{
"path": ".github/workflows/ort/action.yml",
"chars": 4223,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nname: \"Run OSS Review Toolkit\"\ndes"
},
{
"path": ".github/workflows/posix_compliance.yml",
"chars": 1130,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": ".github/workflows/release.yml",
"chars": 15901,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nname: Releases\n\non:\n push:\n br"
},
{
"path": ".github/workflows/release_notifications.yml",
"chars": 817,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nname: Release Notifications\n\non:\n "
},
{
"path": ".github/workflows/release_pre_built/action.yml",
"chars": 2400,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nname: Release Pre-build\ndescriptio"
},
{
"path": ".gitignore",
"chars": 339,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": ".markdownlint-cli2.jsonc",
"chars": 1650,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// SPDX-FileCopyrightText: 2021 The Elixir Team\n{\n \"globs\": [\n \"**/*.md\"\n ],"
},
{
"path": ".ort/config/config.yml",
"chars": 515,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nort:\n enableRepositoryPackageCura"
},
{
"path": ".ort/config/evaluator.rules.kts",
"chars": 2987,
"preview": "/*\n * Copyright (C) 2019 The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>)\n * C"
},
{
"path": ".ort/package-configurations/eex.yml",
"chars": 451,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nid: \"SpdxDocumentFile:The Elixir T"
},
{
"path": ".ort/package-configurations/elixir.yml",
"chars": 2026,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nid: \"SpdxDocumentFile:The Elixir T"
},
{
"path": ".ort/package-configurations/ex_unit.yml",
"chars": 551,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nid: \"SpdxDocumentFile:The Elixir T"
},
{
"path": ".ort/package-configurations/logger.yml",
"chars": 227,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nid: \"SpdxDocumentFile:The Elixir T"
},
{
"path": ".ort/package-configurations/mix.yml",
"chars": 451,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nid: \"SpdxDocumentFile:The Elixir T"
},
{
"path": ".ort.yml",
"chars": 3961,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\nexcludes:\n paths:\n - pattern: "
},
{
"path": "CHANGELOG.md",
"chars": 11593,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n SPDX-FileCopyrightText: 2012"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 4602,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n SPDX-FileCopyrightText: 2012"
},
{
"path": "CONTRIBUTING.md",
"chars": 8206,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n SPDX-FileCopyrightText: 2012"
},
{
"path": "LICENSE",
"chars": 10173,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "LICENSES/Apache-2.0.txt",
"chars": 10280,
"preview": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AN"
},
{
"path": "LICENSES/LicenseRef-elixir-trademark-policy.txt",
"chars": 4434,
"preview": "ELIXIR TEAM TRADEMARKS POLICY\n\nThis document outlines the policy for allowed usage of the “Elixir” word and the\nElixir l"
},
{
"path": "LICENSES/LicenseRef-scancode-unicode.txt",
"chars": 3012,
"preview": "UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE\n\nUnicode Data Files include all data files under the directori"
},
{
"path": "Makefile",
"chars": 12608,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "OPEN_SOURCE_POLICY.md",
"chars": 6940,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Open Source Policy\n\n## "
},
{
"path": "README.md",
"chars": 6574,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n SPDX-FileCopyrightText: 2012"
},
{
"path": "RELEASE.md",
"chars": 1677,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n SPDX-FileCopyrightText: 2012"
},
{
"path": "SECURITY.md",
"chars": 1351,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n SPDX-FileCopyrightText: 2012"
},
{
"path": "VERSION",
"chars": 12,
"preview": "1.20.0-rc.3\n"
},
{
"path": "bin/elixir",
"chars": 6663,
"preview": "#!/bin/sh\n\n# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText"
},
{
"path": "bin/elixir.bat",
"chars": 6712,
"preview": "@echo off\n\n:: SPDX-License-Identifier: Apache-2.0\n:: SPDX-FileCopyrightText: 2021 The Elixir Team\n:: SPDX-FileCopyrightT"
},
{
"path": "bin/elixirc",
"chars": 1471,
"preview": "#!/bin/sh\n\n# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText"
},
{
"path": "bin/elixirc.bat",
"chars": 1498,
"preview": "@echo off\n\n:: SPDX-License-Identifier: Apache-2.0\n:: SPDX-FileCopyrightText: 2021 The Elixir Team\n:: SPDX-FileCopyrightT"
},
{
"path": "bin/iex",
"chars": 1077,
"preview": "#!/bin/sh\n\n# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText"
},
{
"path": "bin/iex.bat",
"chars": 1011,
"preview": "@echo off\n\n:: SPDX-License-Identifier: Apache-2.0\n:: SPDX-FileCopyrightText: 2021 The Elixir Team\n:: SPDX-FileCopyrightT"
},
{
"path": "bin/mix",
"chars": 169,
"preview": "#!/usr/bin/env elixir\n\n# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileC"
},
{
"path": "bin/mix.bat",
"chars": 184,
"preview": "@echo off\n\n:: SPDX-License-Identifier: Apache-2.0\n:: SPDX-FileCopyrightText: 2021 The Elixir Team\n:: SPDX-FileCopyrightT"
},
{
"path": "bin/mix.ps1",
"chars": 706,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/eex/lib/eex/compiler.ex",
"chars": 17381,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/eex/lib/eex/engine.ex",
"chars": 5972,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/eex/lib/eex/smart_engine.ex",
"chars": 1464,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/eex/lib/eex.ex",
"chars": 12813,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/eex/mix.exs",
"chars": 302,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/eex/test/eex/smart_engine_test.exs",
"chars": 1428,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/eex/test/eex/tokenizer_test.exs",
"chars": 11821,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/eex/test/eex_test.exs",
"chars": 26379,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/eex/test/fixtures/eex_template.eex",
"chars": 35,
"preview": "foo <%= if true do %>bar.<% end %>\n"
},
{
"path": "lib/eex/test/fixtures/eex_template_with_bindings.eex",
"chars": 15,
"preview": "foo <%= bar %>\n"
},
{
"path": "lib/eex/test/fixtures/eex_template_with_syntax_error.eex",
"chars": 12,
"preview": "foo <%= bar\n"
},
{
"path": "lib/eex/test/test_helper.exs",
"chars": 607,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/Emakefile",
"chars": 475,
"preview": "%% SPDX-License-Identifier: Apache-2.0\n%% SPDX-FileCopyrightText: 2021 The Elixir Team\n%% SPDX-FileCopyrightText: 2012 P"
},
{
"path": "lib/elixir/lib/access.ex",
"chars": 40190,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/agent/server.ex",
"chars": 1303,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/agent.ex",
"chars": 17398,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/application.ex",
"chars": 41656,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/atom.ex",
"chars": 1845,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/base.ex",
"chars": 51614,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/behaviour.ex",
"chars": 3699,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/bitwise.ex",
"chars": 4717,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/calendar/date.ex",
"chars": 35823,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/calendar/date_range.ex",
"chars": 7109,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/calendar/datetime.ex",
"chars": 75636,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/calendar/duration.ex",
"chars": 18620,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\ndefmodule Duration do\n @moduledoc"
},
{
"path": "lib/elixir/lib/calendar/iso.ex",
"chars": 67234,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/calendar/naive_datetime.ex",
"chars": 47622,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/calendar/time.ex",
"chars": 29325,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/calendar/time_zone_database.ex",
"chars": 4217,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/calendar.ex",
"chars": 37372,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/code/formatter.ex",
"chars": 80113,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/code/fragment.ex",
"chars": 50110,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\ndefmodule Code.Fragment do\n @modu"
},
{
"path": "lib/elixir/lib/code/identifier.ex",
"chars": 6122,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/code/normalizer.ex",
"chars": 17200,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\ndefmodule Code.Normalizer do\n @mo"
},
{
"path": "lib/elixir/lib/code/typespec.ex",
"chars": 12657,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/code.ex",
"chars": 85572,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/collectable.ex",
"chars": 5735,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/config/provider.ex",
"chars": 14178,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/config/reader.ex",
"chars": 4309,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/config.ex",
"chars": 11940,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/dict.ex",
"chars": 10981,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/dynamic_supervisor.ex",
"chars": 35868,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/enum.ex",
"chars": 154274,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/exception.ex",
"chars": 81040,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/file/stat.ex",
"chars": 3450,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/file/stream.ex",
"chars": 7503,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/file.ex",
"chars": 73315,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/float.ex",
"chars": 19077,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/function.ex",
"chars": 6105,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/gen_event/stream.ex",
"chars": 4587,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/gen_event.ex",
"chars": 27490,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/gen_server.ex",
"chars": 50353,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/hash_dict.ex",
"chars": 7675,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/hash_set.ex",
"chars": 7711,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/inspect/algebra.ex",
"chars": 46059,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/inspect/error.ex",
"chars": 2196,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\ndefmodule Inspect.Error do\n @modu"
},
{
"path": "lib/elixir/lib/inspect.ex",
"chars": 22199,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/integer.ex",
"chars": 13745,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/io/ansi/docs.ex",
"chars": 25417,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/io/ansi.ex",
"chars": 10623,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/io/stream.ex",
"chars": 2056,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/io.ex",
"chars": 26677,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/json.ex",
"chars": 15939,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\ndefprotocol JSON.Encoder do\n @mod"
},
{
"path": "lib/elixir/lib/kernel/cli.ex",
"chars": 16653,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/kernel/error_handler.ex",
"chars": 1755,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/kernel/lexical_tracker.ex",
"chars": 8371,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/kernel/parallel_compiler.ex",
"chars": 41168,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/kernel/parallel_require.ex",
"chars": 678,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/kernel/special_forms.ex",
"chars": 71780,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/kernel/typespec.ex",
"chars": 35956,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/kernel/utils.ex",
"chars": 12314,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/kernel.ex",
"chars": 195620,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/keyword.ex",
"chars": 44534,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/list/chars.ex",
"chars": 1427,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/list.ex",
"chars": 39740,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/macro/env.ex",
"chars": 22773,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/macro.ex",
"chars": 96604,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/map.ex",
"chars": 33986,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/map_set.ex",
"chars": 12926,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/module/behaviour.ex",
"chars": 13192,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\ndefmodule Module.Behaviour do\n # "
},
{
"path": "lib/elixir/lib/module/parallel_checker.ex",
"chars": 19442,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/module/types/apply.ex",
"chars": 73173,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/module/types/descr.ex",
"chars": 213052,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\ndefmodule Module.Types.Descr do\n "
},
{
"path": "lib/elixir/lib/module/types/expr.ex",
"chars": 32542,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/module/types/helpers.ex",
"chars": 15987,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/module/types/of.ex",
"chars": 27645,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/module/types/pattern.ex",
"chars": 56926,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/module/types/traverse.ex",
"chars": 6417,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\ndefmodule Module.Types.Traverse do"
},
{
"path": "lib/elixir/lib/module/types.ex",
"chars": 17927,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/module.ex",
"chars": 81159,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/node.ex",
"chars": 10665,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/option_parser.ex",
"chars": 32233,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/partition_supervisor.ex",
"chars": 18435,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n\ndefmodule PartitionSupervisor do\n "
},
{
"path": "lib/elixir/lib/path.ex",
"chars": 28220,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/port.ex",
"chars": 12176,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/process.ex",
"chars": 30405,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/protocol.ex",
"chars": 38962,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/range.ex",
"chars": 14104,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/record/extractor.ex",
"chars": 3577,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/record.ex",
"chars": 17057,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/regex.ex",
"chars": 35590,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/registry.ex",
"chars": 65001,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/set.ex",
"chars": 3435,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/stream/reducers.ex",
"chars": 10561,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/stream.ex",
"chars": 55821,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/string/chars.ex",
"chars": 1476,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/string.ex",
"chars": 97814,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/string_io.ex",
"chars": 14130,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/supervisor/default.ex",
"chars": 222,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/supervisor/spec.ex",
"chars": 9720,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/supervisor.ex",
"chars": 44298,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/system.ex",
"chars": 46190,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/task/supervised.ex",
"chars": 22644,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/task/supervisor.ex",
"chars": 23191,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/task.ex",
"chars": 52283,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/tuple.ex",
"chars": 4652,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/uri.ex",
"chars": 33647,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/lib/version.ex",
"chars": 21574,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/mix.exs",
"chars": 308,
"preview": "# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2021 The Elixir Team\n# SPDX-FileCopyrightText: 2012 Plat"
},
{
"path": "lib/elixir/pages/anti-patterns/code-anti-patterns.md",
"chars": 29678,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Code-related anti-patte"
},
{
"path": "lib/elixir/pages/anti-patterns/design-anti-patterns.md",
"chars": 21706,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Design-related anti-pat"
},
{
"path": "lib/elixir/pages/anti-patterns/macro-anti-patterns.md",
"chars": 14605,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Meta-programming anti-p"
},
{
"path": "lib/elixir/pages/anti-patterns/process-anti-patterns.md",
"chars": 12097,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Process-related anti-pa"
},
{
"path": "lib/elixir/pages/anti-patterns/what-anti-patterns.md",
"chars": 2542,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# What are anti-patterns?"
},
{
"path": "lib/elixir/pages/cheatsheets/enum-cheat.cheatmd",
"chars": 19978,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Enum cheatsheet\n\nA quic"
},
{
"path": "lib/elixir/pages/cheatsheets/types-cheat.cheatmd",
"chars": 2778,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2025 The Elixir Team\n-->\n\n# Set-theoretic types che"
},
{
"path": "lib/elixir/pages/getting-started/alias-require-and-import.md",
"chars": 6443,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# alias, require, import,"
},
{
"path": "lib/elixir/pages/getting-started/anonymous-functions.md",
"chars": 7145,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Anonymous functions\n\nAn"
},
{
"path": "lib/elixir/pages/getting-started/basic-types.md",
"chars": 7716,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Basic types\n\nIn this ch"
},
{
"path": "lib/elixir/pages/getting-started/binaries-strings-and-charlists.md",
"chars": 11592,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Binaries, strings, and "
},
{
"path": "lib/elixir/pages/getting-started/case-cond-and-if.md",
"chars": 6107,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# case, cond, and if\n\nIn "
},
{
"path": "lib/elixir/pages/getting-started/comprehensions.md",
"chars": 4923,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Comprehensions\n\nIn Elix"
},
{
"path": "lib/elixir/pages/getting-started/debugging.md",
"chars": 8043,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Debugging\n\nThere are a "
},
{
"path": "lib/elixir/pages/getting-started/enumerable-and-streams.md",
"chars": 6034,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Enumerables and Streams"
},
{
"path": "lib/elixir/pages/getting-started/erlang-libraries.md",
"chars": 7900,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Erlang libraries\n\nElixi"
},
{
"path": "lib/elixir/pages/getting-started/introduction.md",
"chars": 2616,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Introduction\n\nWelcome!\n"
},
{
"path": "lib/elixir/pages/getting-started/io-and-the-file-system.md",
"chars": 10133,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# IO and the file system\n"
},
{
"path": "lib/elixir/pages/getting-started/keywords-and-maps.md",
"chars": 11602,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Keyword lists and maps\n"
},
{
"path": "lib/elixir/pages/getting-started/lists-and-tuples.md",
"chars": 8250,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Lists and tuples\n\nIn th"
},
{
"path": "lib/elixir/pages/getting-started/module-attributes.md",
"chars": 7919,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Module attributes\n\nModu"
},
{
"path": "lib/elixir/pages/getting-started/modules-and-functions.md",
"chars": 7118,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Modules and functions\n\n"
},
{
"path": "lib/elixir/pages/getting-started/optional-syntax.md",
"chars": 3694,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Optional syntax sheet\n\n"
},
{
"path": "lib/elixir/pages/getting-started/pattern-matching.md",
"chars": 5478,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Pattern matching\n\nIn th"
},
{
"path": "lib/elixir/pages/getting-started/processes.md",
"chars": 10574,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Processes\n\nIn Elixir, a"
},
{
"path": "lib/elixir/pages/getting-started/protocols.md",
"chars": 10280,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Protocols\n\nProtocols ar"
},
{
"path": "lib/elixir/pages/getting-started/recursion.md",
"chars": 5431,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Recursion\n\nElixir does "
},
{
"path": "lib/elixir/pages/getting-started/sigils.md",
"chars": 7867,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Sigils\n\nElixir provides"
},
{
"path": "lib/elixir/pages/getting-started/structs.md",
"chars": 5324,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Structs\n\nWe learned abo"
},
{
"path": "lib/elixir/pages/getting-started/try-catch-and-rescue.md",
"chars": 12679,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# try, catch, and rescue\n"
},
{
"path": "lib/elixir/pages/getting-started/writing-documentation.md",
"chars": 9033,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n SPDX-FileCopyrightText: 2012"
},
{
"path": "lib/elixir/pages/meta-programming/domain-specific-languages.md",
"chars": 7426,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Domain-Specific Languag"
},
{
"path": "lib/elixir/pages/meta-programming/macros.md",
"chars": 11457,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Macros\n\nEven though Eli"
},
{
"path": "lib/elixir/pages/meta-programming/quote-and-unquote.md",
"chars": 6541,
"preview": "<!--\n SPDX-License-Identifier: Apache-2.0\n SPDX-FileCopyrightText: 2021 The Elixir Team\n-->\n\n# Quote and unquote\n\nThis"
}
]
// ... and 570 more files (download for full content)
About this extraction
This page contains the full source code of the elixir-lang/elixir GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 770 files (13.0 MB), approximately 3.5M tokens, and a symbol index with 10028 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.