mint-lang v0.7.0 Release Notes

Release Date: 2019-12-09 // almost 2 years ago
  • Global components

    ๐Ÿ›  Components can be prefixed with the global keyword, this will add them to the DOM automatically and it's methods can be called the same way as a store or module.

    It is useful for components that only need one instance in the application,
    like modals and notifications:

    global component AlertModal {
      state shown : Bool = false
      fun open : Promise(Never, Void) {
        next { shown = true }
      fun close : Promise(Never, Void) {
        next { shown = flase }
      style base {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
      fun render : Html {
        if (shown) {
              Are you sure?
            <button onClick={close}>
        } else {
    /* Later on somewhere else */

    Statically compiled components / HTML

    ๐Ÿš€ In this release the compiler will detect components and HTML fragments that are essentially static, meaning that subsequent renders would always result in the same virtual DOM structure.

    These fragments and components will be cached so to speak, they will only rendered once and get reused after that.

    To give you an example, the following component will only be rendered once and is reused after that:

    component Icons.Checkmark {
      fun render : Html {
          /* The svg data */
    component Main {
      fun render : Html {

    ๐Ÿ†• New Features

    • ๐Ÿ‘ Allow omitting else branch of if in HTML
    • โž• Added command to generate the documentation in JSON format
    • ๐Ÿ‘ Allow "&" for attributes and classes (CSS)
    • ๐Ÿ‘ Allow embedding the Main component without taking over the body


    • ๐Ÿ“š Updated documentation of some functions

    ๐Ÿ›  Bugfixes:

    • ๐Ÿ›  Fix compiling of multiple sytles with parameters.
    • ๐Ÿ›  Fix compiling of interpolations in css values
    • ๐Ÿ’… Properly merge ifs and cases in a style and preseve their order
    • ๐Ÿ‘ Allow creating records for nested records in encode
    • Don't catch and unbox values from the last returning result in a try expression.
    • ๐Ÿ‘‰ Make sure we scope to the entities correctly.