diff options
| author | Gaëtan Gilbert | 2018-10-09 15:27:01 +0200 |
|---|---|---|
| committer | Gaëtan Gilbert | 2018-11-02 13:26:16 +0100 |
| commit | 5c9e05a36fc27413579c49df4994def20811cdff (patch) | |
| tree | 45d78981997737f424af7353df31b1a94cac7447 /dev/tools | |
| parent | cc95e2f89f88a6e37f1d98ce55e479491c40145a (diff) | |
Generalize attributes further to get a monad (mostly for [map])
Having [map] means we can structure attributes when combining them, eg
get an attribute for [type universe_data = { poly : bool option; template : bool
option }] from 2 [bool option] attributes.
Using the previous representation we would have had to provide the
inverse function [universe_data -> bool option * bool option] as well.
An alternate way to get (++) is
let (++) (x:'a t) (y:'b t) : ('a*'b) t =
x >>= fun xv ->
y >>= fun yv ->
return (xv,yv)
Not sure if that would be cleaner.
Diffstat (limited to 'dev/tools')
0 files changed, 0 insertions, 0 deletions
