Comments (3)
erlando_type error_m
-erlando_type(error_m, [error_m/2]).
-export_type([error_m/2, ok/1, error/1]).
-type error_m(E, A) :: ok(A) | error(E).
-type ok(A) :: ok | {ok, A}.
-type error(E) :: {error, E}.
convert to erl_types
{c,union,
[{c,atom,[ok],unknown},
none,none,none,none,none,
{c,tuple_set,
[{2,
[{c,tuple,
[{c,atom,[error],unknown},any],
{2,{c,atom,[error],unknown}}},
{c,tuple,
[{c,atom,[ok],unknown},any],
{2,{c,atom,[ok],unknown}}}]}],
unknown},
none,none,none],
unknown}
generates pattern
type({ok, _}) ->
error_m;
type({error, _}) ->
error_m;
type(ok) ->
error_m
erlando_type state_t
-erlando_type({state_t, [state_t/3]}).
-export_type([state_t/3]).
-type state_t(S, M, A) :: {state_t, inner_t(S, M, A)}.
-type inner_t(S, M, A) :: fun((S) -> monad:m(M, {A, S})).
converted to erl_types
{c,tuple,
[{c,atom,[state_t],unknown},
{c,function,
[{c,product,[{c,var,'S',unknown}],unknown},any],
unknown}],
{2,{c,atom,[state_t],unknown}}}
generates pattern
type({state_t, Args1}) when is_function(Args1) ->
state_t
from erlando.
move to branch type_by_erlang
request erlang R20 or higher
from erlando.
support R19 by moving dialyzer_utils.erl and erl_types.erl to this project from erlang otp R20
from erlando.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erlando.