Back to directory

mlx

A syntax dialect that adds JSX-style expressions to OCaml, compiling them into plain OCaml function calls through a preprocessor.

mlx

mlx extends OCaml's syntax with JSX-like markup, letting a function build a tree of elements with tag-like syntax instead of nested function calls. A preprocessor, mlx-pp, transforms .mlx files into ordinary OCaml source, which a runtime library or a ppx then turns into the desired output, for example HTML generation or a UI framework's element tree.

Dune projects opt in by declaring an mlx dialect that routes .mlx files through the preprocessor and configures Merlin so editor tooling still works. Editor support is available for VS Code, Neovim and Emacs, with syntax highlighting and, in VS Code, the same language-server features as ordinary .ml files.

The project is written in OCaml and distributed as opam packages.

More in Languages

See all 48
  • QBasic Web Editor

    vahidyousefzadeh.com

    A browser-based QBasic 1.1 editor and interpreter that runs classic QBasic programs with DOSBox-accurate behavior, including text-mode graphics commands such as PRINT, COLOR and LOCATE, with sample programs and keyboard shortcuts to run and save.

  • A Brainfuck-inspired esoteric programming language adding absolute memory navigation, multiplier arithmetic, non-destructive inspection and inline conditionals, with its own interpreter.

  • C3 Playground

    play.c3-lang.org

    An in-browser playground that compiles and runs the C3 programming language entirely in WebAssembly, with no backend server, alongside its standard library and documentation.