Today at the Haskell Exchange 2014, Peter Marks and I presented “Structural Typing for Structural Products” (slides available here). In the talk, we walk through the motivation that led us towards using row-polymorphism and extensible records/cases in our DSL, Lucid, for describing financial products and trading strategies. We have also begun to utilize row-polymorphism for effects tracking, as Lucid makes heavy use of side-effects for user convenience. The implementation of row-polymorphism we arrived at uses simple “lacks constraints” on row type variables and can be easily retrofitted into the basic Hindley-Milner inferencer, Algorithm W. I’ve posted some example toy implementations on github for both records and effect-tracking here.


duck typing done right

UPDATE: For a more extensive example of row-polymorphism, be sure to take a look at the Expresso project here.



comments powered by Disqus