HaskellBidirectionalization for Free!

This tool allows you to experiment with the method described in the paper “Bidirectionalization for Free!” (POPL'09) by Janis Voigtländer.

You may also want to try another tool applying different bidirectionalization methods side by side: (Combining) Syntactic and Semantic Bidirectionalization.

Enter the Haskell function definitions or load an example. You need to define source and get. The code is evaluated inside a let block, so you can define functions by pattern matching, but you cannot define new data types. The type classes required by the bidirectionalization functions are defined for Maybe, [], and this simple tree type:

data Tree a = Leaf a | Node (Tree a) (Tree a)

halve flatten rmdups top3 tail sieve doubleList tail/rmdups

Your definitions have the following types:

get :: [a] -> [a]
source :: (Num t) => [t]
Therefore, an updater can be derived by bff, bff_Eq, and bff_Ord.

You can use get source to calculate a view which you can then modify. If you have defined view, then you can use the bidirectionalizer to calculate the updated source. The result will be shown in the code edit frame above.


The source code of this application and the underlying library can be found here.

© 2008 Joachim Breitner <mail@joachim-breitner.de>