scispace - formally typeset
Search or ask a question
JournalISSN: 0956-7968

Journal of Functional Programming 

Cambridge University Press
About: Journal of Functional Programming is an academic journal published by Cambridge University Press. The journal publishes majorly in the area(s): Functional programming & Haskell. It has an ISSN identifier of 0956-7968. Over the lifetime, 839 publications have been published receiving 26149 citations.


Papers
More filters
Journal ArticleDOI
TL;DR: An actor language is presented which is an extension of a simple functional language, and an operational semantics for this extension is provided, and it is shown that the three forms of equivalence, namely, convex, must, and may equivalences, collapse to two in the presence of fairness.
Abstract: We present an actor language which is an extension of a simple functional language, and provide an operational semantics for this extension. Actor configurations represent open distributed systems, by which we mean that the specification of an actor system explicitly takes into account the interface with external components. We study the composability of such systems. We define and study various notions of testing equivalence on actor expressions and configurations. The model we develop provides fairness. An important result is that the three forms of equivalence, namely, convex, must, and may equivalences, collapse to two in the presence of fairness. We further develop methods for proving laws of equivalence and provide example proofs to illustrate our methodology.

482 citations

Journal ArticleDOI
TL;DR: An abstract characterisation of an applicative style of effectful programming, weaker than Monads and hence more widespread, is introduced and a bracket notation is introduced that interprets the normal application syntax in the idiom of an Applicative functor.
Abstract: In this article, we introduce Applicative functors – an abstract characterisation of an applicative style of effectful programming, weaker than Monads and hence more widespread. Indeed, it is the ubiquity of this programming pattern that drew us to the abstraction. We retrace our steps in this article, introducing the applicative pattern by diverse examples, then abstracting it to define the Applicative type class and introducing a bracket notation that interprets the normal application syntax in the idiom of an Applicative functor. Furthermore, we develop the properties of applicative functors and the generic operations they support. We close by identifying the categorical structure of applicative functors and examining their relationship both with Monads and with Arrow.

415 citations

Journal ArticleDOI
TL;DR: The Spineless Tagless G-machine is an abstract machine designed to support non-strict higher-order functional languages, and the STG language is an austere but recognizably-functional language, which as well as a denotational meaning has a well-defined operational semantics.
Abstract: The Spineless Tagless G-machine is an abstract machine designed to support non-strict higher-order functional languages. This presentation of the machine falls into three parts. Firstly, we give a general discussion of the design issues involved in implementing non-strict functional languages. Next, we present the STG language, an austere but recognizably-functional language, which as well as a denotational meaning has a well-defined operational semantics. The STG language is the ‘abstract machine code’ for the Spineless Tagless G-machine. Lastly, we discuss the mapping of the STG language onto stock hardware. The success of an abstract machine model depends largely on how efficient this mapping can be made, though this topic is often relegated to a short section. Instead, we give a detailed discussion of the design issues and the choices we have made. Our principal target is the C language, treating the C compiler as a portable assembler.

371 citations

Journal ArticleDOI
TL;DR: This paper contributes a new programming notation for type theory which elaborates the notion of pattern matching in various ways, and develops enough syntax and semantics to account for this high-level style of programming in dependent type theory.
Abstract: Pattern matching has proved an extremely powerful and durable notion in functional programming. This paper contributes a new programming notation for type theory which elaborates the notion in various ways. First, as is by now quite well-known in the type theory community, definition by pattern matching becomes a more discriminating tool in the presence of dependent types, since it refines the explanation of types as well as values. This becomes all the more true in the presence of the rich class of datatypes known as inductive families (Dybjer, 1991). Secondly, as proposed by Peyton Jones (1997) for Haskell, and independently rediscovered by us, subsidiary case analyses on the results of intermediate computations, which commonly take place on the right-hand side of definitions by pattern matching, should rather be handled on the left. In simply-typed languages, this subsumes the trivial case of Boolean guards; in our setting it becomes yet more powerful. Thirdly, elementary pattern matching decompositions have a well-defined interface given by a dependent type; they correspond to the statement of an induction principle for the datatype. More general, user-definable decompositions may be defined which also have types of the same general form. Elementary pattern matching may therefore be recast in abstract form, with a semantics given by translation. Such abstract decompositions of data generalize Wadler's (1987) notion of ‘view’. The programmer wishing to introduce a new view of a type $\mathit{T}$, and exploit it directly in pattern matching, may do so via a standard programming idiom. The type theorist, looking through the Curry–Howard lens, may see this as proving a theorem, one which establishes the validity of a new induction principle for $\mathit{T}$. We develop enough syntax and semantics to account for this high-level style of programming in dependent type theory. We close with the development of a typechecker for the simply-typed lambda calculus, which furnishes a view of raw terms as either being well-typed, or containing an error. The implementation of this view is ipso facto a proof that typechecking is decidable.

311 citations

Journal ArticleDOI
TL;DR: This paper describes the implementation of Idris, a new dependently typed functional programming language, and presents a tactic-based method for elaborating concrete high-level syntax with implicit arguments and type classes into a fully explicit type theory.
Abstract: Many components of a dependently-typed programming language are by now well understood, for example the underlying type theory, type checking, unification and evaluation. How to combine these components into a realistic and usable high-level language is, however, folklore, discovered anew by successive language implementators. In this paper, I describe the implementation of IDRIS, a new dependently-typed functional programming language. IDRIS is intended to be a general purpose programming language and as such provides high-level concepts such as implicit syntax, type classes and do notation. I describe the high-level language and the underlying type theory, and present a tactic-based method for elaborating concrete high-level syntax with implicit arguments and type classes into a fully explicit type theory. Furthermore, I show how this method facilitates the implementation of new high-level language constructs.

299 citations

Performance
Metrics
No. of papers from the Journal in previous years
YearPapers
20237
202222
202135
202056
201919
201826