Abstract
The state of a system is expressed using PFL, a process functional language, in an easily understandable manner. The paper presents PFL environment variable – our basic concept for the state manipulation in the process functional language. Then we introduce the style in which stateful systems are described using monads and state transformers in pure lazy functional language Haskell. Finally, we describe our approach to lazy state manipulation in PFL and correspondence between state manipulation in PFL and the one in a pure lazy functional language Haskell. The proposed translation from eager PFL to a lazy Haskell provides an opportunity to exploit laziness for process functional programs and furthermore for imperative programs. The approach described in this paper was used in implemented PFL to Haskell code generator.
Keywords
- Process functional language
- imperative functional programming
- lazy state evaluation
- environment variables
- monads
- state transformers
- Haskell
Cite this article
@article{cai-1511,
author = {Ján Kollár and Jaroslav Porubän and Peter Václavík},
title = {From Eager PFL},
journal = {Computing and Informatics},
volume = {25},
number = {1},
pages = {61--80},
year = {2006},
issn = {1335-9150},
url = {https://cai.type.sk/content/2006/1/from-eager-pfl/}
}
TY - JOUR AU - Ján Kollár AU - Jaroslav Porubän AU - Peter Václavík TI - From Eager PFL JO - Computing and Informatics VL - 25 IS - 1 SP - 61 EP - 80 PY - 2006 SN - 1335-9150 UR - https://cai.type.sk/content/2006/1/from-eager-pfl/ KW - Process functional language KW - imperative functional programming KW - lazy state evaluation KW - environment variables KW - monads KW - state transformers KW - Haskell ER -
Kollár, J., Porubän, J., & Václavík, P. (2006). From Eager PFL. Computing and Informatics, 25(1), 61–80. https://cai.type.sk/content/2006/1/from-eager-pfl/