Giter VIP home page Giter VIP logo

broom-lang / broom Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 1.0 2.29 MB

A programming language with first-class modules and algebraic effects.

Home Page: https://broom.readthedocs.io

License: BSD 3-Clause "New" or "Revised" License

OCaml 91.58% Makefile 0.44% TeX 5.23% Rust 2.40% Shell 0.13% Vim Script 0.21%
algebraic-effects broom compiler generalized-algebraic-data-type implicit modules programming-language row-polymorphism type-class type-inference

broom's People

Contributors

nilern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dorstm

broom's Issues

'Zero-cost' functor fixpointing support

I.e. the box trickery from "A Type System for Well-Founded Recursion", except that we would only use it for functor parameters (and not local recursion as that paper does also).

Polymorphic intrinsics

(Parametrically) polymorphic intrinsics for e.g. arrays.

  • Higher-kinded primitive array type
  • Array ops (new, length, index, initialize)
  • Array type op
  • Evaluation

Clarify (and extend) record (type) constructs' syntax and implementations

Empty, extension (with), update (where), restriction (without) for records, modules, record types, interfaces. Also field access and patterns for records and modules.

  • Spec
  • with and where for records
  • with and where for record types
  • extends and override syntax for modules and interfaces
  • without for records and record types, exclude for modules and interfaces

Modular implicits

The 'anti-modularity' of type classes is even more awkward with first-class modules than regular ones. Plus we don't have generalization so type class parameters can't be inferred any more than implicit parameters. Obviously the challenge with implicits is that implicit search must be exhaustive, which is potentially very slow.

  • Enable backtracking wrt. unification variables
  • Match implicit fn codomains before domains in subtyping and unification
  • Schedule resolutions for when unification variables go out of scope
  • Ensure termination of resolution

Convenient variable representation for FAst

Some sort of use-def/def-use pointers and stuff like in the imperative version of "Shrinking Lambda Expressions in Linear Time" and "Shrinking Reductions in SML.NET" would be convenient for optimization. Alphatization is not as convenient and mangles the names, which is bad for debugging and especially error messages.

E.g. ATM the well-foundedness analysis must construct scope trees to deal properly with scoping without mangling the names (to keep error messages intelligible).

Custom infix operators

Much as in Haskell, except we need to deal with more advanced modules which I've heard can get tedious.

Vim mode

We do have some rudimentary highlighting support in /vim.

Build on sml/nj

NJ uses its own CM format instead of MLB files. For extra points, generate the CM and MLB from the same source with cm2mlb or similar.

"Marketing" documentation

Add some exposition of goals/features/syntax so that people can decide whether they want to contribute to or (eventually) use this.

Effect rows and handlers

ATM we just have the pure/impure distinction of 1ML. I would like something like Koka or Multicore OCaml. There will be nontrivial interactions with 'large' (higher-rank etc.) types and functor generativity.

`do` vs. `begin`/`module` distinction

  • begin and module (and toplevel) contain recursive, unique definitions. Runtime effects are forbidden because of the continuation capturing variable initialization trainwreck, but it also makes sense on a higher level to demand purity. The 'dynamically determined implementation of static type' effect should be allowed though. Could even ban expression-statements here is since they are useless anyway.
  • do contains sequential statements that can have side effects and shadow names.
  • Change do -> begin
  • Add sequential do
  • Ban effects in recursive contexts

Trivial contification

Obviously local functions should not cause closure allocation. With a bit more effort this can also subsume conversion of (self) tail recursion to loops.

Complect lambdas

Fn and TFn should be fused as in 1ML so that type lambdas have no runtime component that the compiler needs to reason about (closures, passing continuation to calls etc.).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.