MinnieML: A statically typed language with an minimal ML resemblance.

It is an experiment and a learning tool for the author; it will try to be as low level as possible while providing a modern typesystem and secure access to raw memory.

Some of the planned features, none of which exists anywhere but on the author's mind:

  • Compiles to native code via llvm. (Where native is defined by the target, one could compile to JS via emscripten, etc)

  • Libs can be distributed in native form or in pods (more flexible, must compile).

  • Functional with support for imperative blocks ( see monadic notation ).

  • HDM based type inference.

  • Unboxed primitives.

  • Product and sum types.

  • Parametric polymorphism.

  • Protocols (a form of typeclass-like construct). Some protocols are fundamental and are known and used by the compiler; see below.

  • Module system. Higher Order Modules; modules are values and can be parameterized by other values and types.

  • Modules have explicit export lists. Exports must be fully type annotated.

  • Pattern matching. With protocol based extension mechanism.

  • Composites: Inheritance that is not subtyping. Subtyping can be encoded with protocols.

  • Structural types without subtyping. (This might go away, protocols may be enough)

  • No automatic or implicit casting whatsoever; protocols are enough.

  • Effects system: functions and procs are not the same.

  • Monadic sugar. Begin/End and Do/End blocks provide imperative like sequencing capabilities. Begin/End produces a thunk with the computation. Do/End executes immediately.

  • Ownership protocol. Fundamental protocol that allows control of linear and or unique usage.

  • Memory allocation inference. Region based memory allocation Programmer can interact/modify declaratively at type, function and module level.

  • MutableCell. Type that allows mutation of its contained value. Unique ownership, can't be closed over.

  • MemoryChunk, ForeignType and related types and protocols for unmanaged memory management and easy and secure ffi.

  • Type driven CodeGen. Flexible type level notation to generate types and skeleton implementations. Think deriving keyword that can infer some implementations or be given rules for codegen.

  • Type rules. A constraints system that allows to inspect and influence the static environment. A mini prolog in the typesystem.

  • Type tags: User can tag a value. Tags are first class types.