This is a simple four function calculator using FParsec. It would be easy to replace the FParsec combinators with simple parsing combinators to produce the same results, but without the nice error messages produced by FParsec.
2 people like thisPosted: 9 years ago by Vesa Karvonen
A colleague recently mentioned the problem of not having MonadFix in a strict language. Here is my 2 hour potential approach to implementing it in ML. Let me know if I got something totally wrong!
3 people like thisPosted: 9 years ago by Vesa Karvonen
Work in progress example on lenses and traversals.
4 people like thisPosted: 8 years ago by Vesa Karvonen
The extra type variables can be packed to obj/unpacked from obj so that the type of Optic would have just the 's, 'a, 'b and 't type variables, but I leave that and other further developments out from this example.
3 people like thisPosted: 7 years ago by Vesa Karvonen
This is a toy implementation of GMap using the Infers library and could be improved in several significant ways. For example, Infers is more than powerful enough that GMap could be optimized to generate functions that do not traverse parts of the datatype that do not contain values to map.
2 people like thisPosted: 9 years ago by Vesa Karvonen
Two encodings of van Laarhoven style lenses allowing polymorphic updates
3 people like thisPosted: 8 years ago by Vesa Karvonen
A simple example of using datatype generic JSON operations from Infers.Toys.
4 people like thisPosted: 8 years ago by Vesa Karvonen
Sketch of a Zio like monad in F# for computations with extensible environment, extensible error handling, and asynchronicity.
1 people like thisPosted: 3 years ago by Vesa Karvonen