A compiler for SPL in Haskell