Merging partial values
Last year I stumbled across a simple representation for partial information about values, and wrote about it in two posts, A type for partial values and Implementing a type for partial values. Of particular interest is the ability to combine two partial values into one, combining the information present in each one.
More recently, I played with unambiguous choice, described in the previous post.
This post combines these two ideas. It describes how to work with partial values in Haskell natively, i.e., without using any special representation and without the use restrictions of unambiguous choice. I got inspired to try removing those restrictions during stimulating discussions with Thomas Davie, Russell O’Connor others in the #haskell gang.
You can download and play with the library shown described here. There are links and a bit more info on the lub wiki page.
Edits:
- 2008-11-22: Fixed link: Implementing a type for partial values
- 2008-11-22: Tidied introduction