Coder Social home page Coder Social logo

metaocaml-opam's Introduction

A repository of MetaOCaml packages

A repository of OPAM packages for BER MetaOCaml.

BER N111 Ubuntu status BER N111 macOS status
BER N114 Ubuntu status BER N114 macOS status

Setting up

opam update
opam switch create 4.14.1+BER
opam remote add metaocaml git+https://github.com/metaocaml/metaocaml-opam.git

Current packages:

  • asp, typed, algebraic, staged parser combinators
  • flap, a deterministic parser with fused lexing
  • charmatch, for generating efficient matches over characters
  • reex, for staged regular expression matching
  • frex, for multi-stage programming with algebras
  • letrec, for generating mutually-recursive definitions
  • staged-streams, for stream computations with fusion (old POPL17 design)
  • strymonas, for stream computations with fusion

metaocaml-opam's People

Contributors

rr0gi avatar yallop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

yallop ahrefs

metaocaml-opam's Issues

`Lifts` not included when running `dune runtest`

Hi! Maybe lifts is not pulled into the metaocaml package? For me, dune build works, but dune runtest fails with:

File "_none_", line 1:
Error: No implementations provided for the following modules:
         Lifts referenced from lib/ocannl.cmxa(Ocannl__Shape),
           lib/ocannl.cmxa(Ocannl__Ndarray)

(where my project is called ocannl and has the modules Shape, Ndarray in lib/ using Lifts).
I solved this problem by copying lifts.ml into my lib/.

Extension points `ppx_metaocaml`

Maybe someone finds this useful: extension points behave a bit better than the original MetaOCaml syntax wrt. editor integration. Example content of ppx_metaocaml.ml:

open Ppxlib

let meta_bracket ~loc ~path:_ (expr: expression) =
   {expr with pexp_attributes=({attr_name={txt="metaocaml.bracket"; loc=loc};
                                attr_loc=loc; attr_payload= PStr []}::expr.pexp_attributes)}
let meta_escape ~loc ~path:_ expr =
   {expr with pexp_attributes=({attr_name={txt="metaocaml.escape"; loc=loc};
                                attr_loc=loc; attr_payload= PStr []}::expr.pexp_attributes)}

let expr_rule name extender =
  Context_free.Rule.extension  @@
  Extension.declare name Extension.Context.expression Ast_pattern.(single_expr_payload __) extender
let rules = [expr_rule "c" meta_bracket; expr_rule "e" meta_escape]

let () =
  Driver.register_transformation
    ~rules
    "ppx_metaocaml"

Dune file:

(library
 (name ppx_metaocaml)
 (kind ppx_rewriter)
 (modules ppx_metaocaml)
 (libraries ppxlib))

Usage e.g. let sum = [%c [%e a_code] + [%e b_code]]
Dune use sites:

(library
 ...
 (preprocess (pps ppx_metaocaml ...))
 ...)

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.