Added documentation

Used haddock for haskell documentation and doxygen for
C documentation.  Typo fix in Emit.hs as well as change name
of emit_expr to emitExpr.