ityonemo

ityonemo

Mavis - Typing Library for elixir

Introducing Mavis, a comprehensive Typing Library for Elixir:

Mavis fully utilizes Elixir’s Protocol system to create a fluent and composable type analysis library for erlang and Elixir’s types. The type analysis logic is hand-crafted to fit the pragmatic choices that were made when the BEAM was designed (and extended, e.g. with the map type), and does not attempt to square the BEAM’s types to a preexisting type-theoretical framework. Because of the operations that it supports, I expect it to be able to be more powerful than Dialyzer or Gradualyzer.

Hex:
https://hexdocs.pm/mavis/Type.html

Github:

This is the first stage in my “Selectrix” project which is a shot at bringing compile-time type analysis to Elixir as an optional add-in library.

I’d love it if the community could play around with the library to get a sense of what it can do (and hopefully also find bugs!)

Most Liked

ityonemo

ityonemo

Updated Mavis to 0.0.5, with support for two new types (not yet? supported by dialyzer) that I’ve discovered in the BEAM. Made a couple of videos explaining these types:

top-arity functions:

min-arity tuples:

ityonemo

ityonemo

Updated to 0.0.6, with support for pinned types in tuples, refactored way of specifying types that match typespecs E.G. (Type.integer(), Type.nonempty_maybe_improper_list()) and Type.normalize/1 which will take Mavis’ opinionated types and downconvert them to Elixir/Erlang standard types.

Qqwy

Qqwy

TypeCheck Core Team

The primary goals of both libraries are different and do not fully align:
Mavis’ goal is to be the foundation of a compile-time static type analysis engine.
TypeCheck’s goal is to be a fast and flexible run-time type checking tool focusing on readable error messages and re-using type specifications for type-checking, proptest-generating and documentation.

When both mature it is possible that some kind of bridge between them is created, but I do not think that it is useful for one to depend on the other at this time.

Where Next?

Popular in Libraries Top

mhanberg
I just released the first version of Temple: an HTML DSL for Elixir and Phoenix! You can read this blog post or the docs for more info...
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
574 16576 179
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
arkgil
Hi all! I’m happy to announce that Telemetry v0.3.0 is out! This release marks the conversion from Elixir to Erlang so that all the libr...
New
tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highl...
New
Eiji
ExApi is a library that I’m developing now and hope release soon This library will allow to: list all apis list all api implementation...
New
wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
tmbb
I’ve decided to create this topic to discuss optimization possibilities for something like Phoenix LiveView. I’ve created this topic unde...
New
gjaldon
As the title states, EctoEnum has just been updated after some time of hardly any activity in the repo. Here’s the latest release: https:...
New
mplatts
With HEEX released we decided to start a components library using Tailwind CSS - check it out here: Petal Components. We also have a boi...
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Sub Categories:

We're in Beta

About us Mission Statement