Define polymorphic lenses and compile the runtime library

This commit is contained in:
milner committed 2019-02-11 13:34:00 +00:00
commit d30dc5d519
9 files changed
+61

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
open Fieldglass
let sample : (string * bool, string) lens' =
lens ~view:fst ~set:(fun value (_, other) -> value, other)
let () = assert (view sample ("colour", true) = "colour")