File:Paper-v5.sxw

From HaskellWiki
Jump to navigation Jump to search

Paper-v5.sxw(file size: 328 KB, MIME type: application/zip)

Warning: This file type may contain malicious code. By executing it, your system may be compromised.

Direct Modular Evaluation of Expressions Using The Monads and Type Classes in Haskell.

DAN POPA University of Bacau, Bacau, 600114, Romania, danvpopa At ub Dot ro Ro/Haskell Group, popavdan@yahoo.com

Abstract

During last decade, the expression evaluators and the list monad had attracted both mathematicians (especially from the field of Category Theory) and computer scientists. For the last group, the main kind of applications comes from the field of DSL interpretation. As a consequence of our research, we are able to introduce a new kind of modular tree-less expression evaluator, which can be build by importing modular components into a main Haskell program. In order to keep the parser of the DSL modular, parser combinators from ParseLib [Hutton G., Meijer E., (1998) ] was used. In order to keep the source and the implicit syntax tree modular we have replace the data constructors by regular functions over the list monad, inspired by an idea from Haskell Report [Peyton Jones S. (editor) (2002)]: data constructors are in fact just simple functions. This gave us the idea of the replacement of data constructors with functions over monadic actions called by us pseudoconstructors. The modular evaluator was written in do-notation, on the idea that expressions should evaluate them-self nor by the help of an interpret-function as in some papers like [Sheard T.; Benaissa Z. ; Pasalic E. (1999)] and others. As a consequence, the useful data declarations which usually appears in DSL implementations are completely missing, shortening the source and reducing the work of the programmer. A new vision of monadic semantics is now introduced. The semantics is not a function:interp :: Term -> Environment -> Monad but more likely a sort of Monad -> Monad -> ...Monad specification in contrast with the papers [Wadler P. (1992-1995)] . Let's note the idea and definition of pseudoconstructors functions over monadic actions. The pseudoconstructors are replacing the data values constructors from the right side of a data declaration.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current08:40, 10 January 2009 (328 KB)Ha$kell (talk | contribs)Direct Modular Evaluation of Expressions Using The Monads and Type Classes in Haskell. DAN POPA University of Bacau, Bacau, 600114, Romania, danvpopa At ub Dot ro Ro/Haskell Group, popavdan@yahoo.com Abstract During last decade, the expression evalua

There are no pages that use this file.