Added Haskell library for building/emitting instances; fixes to toString() function.