Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.1 - Standard Library on the BEAM #8

Closed
100 tasks done
leostera opened this issue Oct 9, 2020 · 1 comment
Closed
100 tasks done

v0.1 - Standard Library on the BEAM #8

leostera opened this issue Oct 9, 2020 · 1 comment
Assignees
Labels
stdlib Related to the Standard Library shipped with Caramel tracking

Comments

@leostera
Copy link
Owner

leostera commented Oct 9, 2020

Summary

While #6 is about getting support for a set of OCaml language features, this issue is about putting together a standard library that can be used to interface with the Erlang standard library in a more-or-less idiomatic way.

This likely means 2 things: FFIs and a small runtime library. Some modules might be a combination of both.

Checklist

FFIs

In any case, some of these modules will have to break direct compatibility with their Erlang equivalents due to their APIs being uncomfortably unidiomatic OCaml or untypeable in OCaml.

  • Binary
    • at/2
    • bin_to_list/1
    • copy/2
    • decode_unsigned/2
    • encode_unsigned/2
    • first/1
    • last/1
    • list_to_bin/1
    • replace/4
    • split/2
  • Calendar
    • local_time/0
    • universal_time/0
  • Erlang -- this is actually an ERTS preloaded module
    • is_atom/1
    • is_binary/1
    • is_bitstring/1
    • is_boolean/1
    • is_float/1
    • is_integer/1
    • is_list/1
    • is_map/1
    • is_number/1
    • is_pid/1
    • is_port/1
    • is_process_alive/1
    • is_reference/1
    • is_tuple/1
    • length/1
    • self/0
    • send/2
    • spawn/1
    • throw/1
  • Ets
    • foldl/3
    • foldr/3
    • insert/2
    • lookup/2
    • new/2
  • Io
    • format/2
  • Lists
    • all/2
    • any/2
    • append/1
    • concat/1
    • delete/2
    • droplast/1
    • dropwhile/2
    • duplicate/2
    • filter/2
    • flatmap/2
    • flatten/1
    • foldl/3
    • foldr/3
    • foreach/2
    • join/2
    • last/1
    • map/2
    • max/1
    • member/2
    • min/1
    • partition/2
    • reverse/1
    • seq/3
    • sort/2
    • split/2
    • splitwith/3
    • sublist/2
    • subtract/2
    • sum/1
    • takewhile/2
    • unzip/1
    • zip/2
    • zipwith/3
  • Maps
    • filter/2
    • find/2
    • fold/3
    • from_list/1
    • get/3
    • is_key/2
    • keys/1
    • map/2
    • merge/2
    • new/0
    • put/2
    • size/1
    • to_list/1
    • update/2
    • values/1
    • with/2
    • without/2
  • Timer
    • sleep/1

Runtime

These are libraries that actually need the runtime overhead to satisfy some of the type-level constraints.

  • Process -- as per the experiments i've done on typing message passing, it's likely that we'll need a way to constrain the process types and expose a receive function as a stand in for receive expressions. This module would implement that runtime overhead.
    • spawn/2
    • contramap/2
    • send/2
@leostera leostera added the stdlib Related to the Standard Library shipped with Caramel label Oct 9, 2020
@leostera leostera added this to the v0.1 milestone Oct 9, 2020
@leostera leostera self-assigned this Oct 9, 2020
leostera added a commit that referenced this issue Oct 14, 2020
leostera added a commit that referenced this issue Oct 14, 2020
@leostera
Copy link
Owner Author

This seems good as it is right now. We'll open a new issue to collect missing FFIs before we tag v0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Related to the Standard Library shipped with Caramel tracking
Projects
None yet
Development

No branches or pull requests

1 participant