You are here

Declarative Scripting in Haskell

TitleDeclarative Scripting in Haskell
Publication TypeConference Paper
Year of Publication2009
AuthorsBauer, T., and M. Erwig
Conference NameSoftware Language Engineering, Second International Conference, SLE 2009
Date Published10/2009
Conference LocationDenver, CO

We present a domain-specific language embedded within the Haskell programming language to build scripts in a declarative and type-safe manner. We can categorize script components into various orthogonal dimensions, or concerns, such as IO interaction, configuration, or error handling. In particular, we provide special support for two dimensions that are often neglected in scripting languages, namely creating deadlines for computations and tagging and tracing of computations. Arbitrary computations may be annotated with a textual tag explaining its purpose. Upon failure a detailed context for that error is automatically produced. The deadline combinator allows one to set a timeout on an operation. If it fails to complete within that amount of time, the computation is aborted. Moreover, this combinator works with the tag combinator so as to produce a contextual trace.