A port of johntyree/traduisons to Haskell