Hello everyone, I am excited to announce the release of my first OPAM package liquid_ml. Shopify’s Liquid Templating language for OCaml. Check it out here: https://github.com/benfaerber/liquid-ml
Learn Liquid syntax here: https://shopify.github.io/liquid/
The Liquid templating language is used all over including Shopify and Github pages. The Rust port of the language is very popular for static site and documentation generation. If anyone has any suggestions or wants to help improve the project I welcome pull requests!
14 Likes
Really appreciate you releasing this. Excellent!
One thing I noticed in the README was the use of Obj.t
below:
type value =
| Bool of bool
| String of string
| Number of float
| Var of string list
| List of value list
| Date of Date.t
| Object of liquid_object
| Nil
and liquid_object = value Obj.t (* <--- HERE *)
I associate Obj.t
with “unsafe”, and it took me a while of digging to see that liquid_ml
shadows the built-in module Obj
with its own module Obj = Stdlib.Map.Make(LiquidObject)
.
If it makes sense to you, could the module Obj
be renamed Object
? That would make it symmetric with | Date of Date.t
and it would help people like me who pay extra scrutiny to code that uses Obj
. I would send a PR myself, but I won’t be able to get to it for a few weeks, and this is one of those API things that is better changed early rather than late.
3 Likes
Sounds good! I wasn’t aware of that module. I just submitted a pull request for version 0.1.2 of the library which fixes this.
2 Likes