Packages

Static type system for BEAM. Crystal is Elixir wrapper around Gradualizer.

Current section

Files

Jump to
crystal lib crystal.ex
Raw

lib/crystal.ex

defmodule Crystal do
@doc """
Checks types in given module.
## Example
```
iex> Crystal.type_check_module(Elixir.CrystalTest.Support.FactorialFail)
:nok
iex> Crystal.type_check_module(Elixir.CrystalTest.Support.FactorialPass)
:ok
```
"""
@spec type_check_module(atom) :: :ok | :nok
def type_check_module(module) when is_atom(module) do
:gradualizer.type_check_module(module)
end
end