Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
ppx_viewpattern
Transformation for view patterns in OCaml. Attempts to imitate Haskell view patterns.
Installation
opam install ppx_viewpattern
Usage
In dune:
(preprocess (pps ppx_viewpattern))
Syntax
Use [%view? pat when exp] as a pattern to apply exp to whatever the pattern is matching and match the result of the exp application against pat. Analogous to the Haskell view pattern exp -> pat.