package ppx_matches
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
A syntax extension for Rust's `matches!` in OCaml ๐ช
Install
dune-project
Dependency
Authors
Maintainers
Sources
ppx_matches-0.2.0.tbz
sha256=9d9630cd912e2483af1bae545f9bec53aa926be894667e43406b105bed1d60ae
sha512=542e838ca4a6c9045bc6574cdecb4a21cc444f248172ca9b7429b775c28019a358218a93fce2341a389a3d230c5b3e5f369dd2be7870c9900839a6001fc1fc03
Description
Added to opam-repository:
README
๐ฅ ppx-matches
Install
This library has not yet been released to opam. To install it, first
opam install ppx_matchesUsers of dune can then use this PPX on their libraries and executables by adding the appropriate stanza field:
(library
...
(preprocess (pps ppx_matches)))Syntax
In short:
[%matches? pat [when cond]]expands tofunction | pat [when cond] -> true | _ -> false[%matches? pat [when cond]] matcheeexpands to the inlined version:match matchee with | pat [when cond] -> true | _ -> false
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page