Paraphrase of the introduction of Haskell in the literature review part

According to the Haskell 2010 language report [58], Haskell is a general purpose, statically typed, purely functional programming language with non-strict semantics. The most famous and widely-used Haskell implementation is the Glasgow Haskell Compiler (GHC) [59].

The term “functional programming” indicates that a function is a first-class citizen in Haskell and compared with other programming languages, Haskell emphasises the composition of functions and the use of higher order functions.

Haskell is a pure language. Purity means that side effects, such as internal state, file input/output and variable mutation, are strictly constrained in Haskell. With purity, the expressions in Haskell have the property of referential transparency [77], which means that an expression is completely interchangeable with the values it evaluates to. Referential transparency makes it easier to reason about a Haskell program [55]. But sometimes, side effects, or the simulations of side effects, are expected in a practical program. In this case, Haskell uses monads to encapsulate side effects and make sure that they are all under control [55].

Haskell is a statically strongly typed language, which means that type-checking happens at compile time and no implicit type conversion is allowed. Besides, Haskell provides parametric polymorphism and ad hoc polymorphism (type classes) [55, 66], allowing more abstract and flexible definitions. Thanks to type inference, with all the benefits (error detection at compile-time, high level abstractions, etc.) of such a type system, there is even no need to write type signatures in most cases. As a rapidly developing type-system laboratory [55], the type system of Haskell is too powerful to be covered with a brief introduction here.

Haskell has non-strict semantics which is implemented with lazy evaluation in GHC [55]. Lazy evaluation means that in Haskell, the evaluation of an expression will be delayed until its result is needed. Lazy evaluation can help avoid unnecessarycomputations and allow the existence of some useful constructions such as infinite lists, but it can also lead to performance issues and cause space leaks [55]. Thus, Haskell provides programmers with various tools (seq, lazy patterns, etc.) to control laziness on a finer scale.

Solution

This question has been answered.

Order Now
Scroll to Top