About: Purely functional programming is a research topic. Over the lifetime, 81 publications have been published within this topic receiving 1902 citations. The topic is also known as: pure functional programming.
TL;DR: A new extension to the purely functional programming language Haskell that supports compile-time meta-programming and the ability to generate code at compile time allows the programmer to implement such features as polytypic programs, macro-like expansion, user directed optimization, and the generation of supporting data structures and functions from existing data structure and functions.
Abstract: We propose a new extension to the purely functional programming language Haskell that supports compile-time meta-programming. The purpose of the system is to support the algorithmic construction of programs at compile-time.The ability to generate code at compile time allows the programmer to implement such features as polytypic programs, macro-like expansion, user directed optimization (such as inlining), and the generation of supporting data structures and functions from existing data structures and functions.Our design is being implemented in the Glasgow Haskell Compiler, ghc.
TL;DR: A new language feature is described that is a hybrid of labels and procedures that can be added to a “purely-functional” (“non-imperative”) system (such as LISP without pseudo-functions or program feature).
Abstract: This paper describes a new language feature that is a hybrid of labels and procedures. It is closely related to jumping out of a functional subroutine, and includes conventional labels and jumping as a special, but probably not most useful, case. It is independent of assignment, ie., it can be added to a “purely-functional” (“non-imperative”) system (such as LISP without pseudo-functions or program feature). Experiments in purely functional programming suggest that its main use will be in success/failure situations, and failure actions. This innovation is incorporated in the projected experimental system, ISWIM.
TL;DR: This book is aimed at people who have experience programming in imperative languagessuch as C++, Java, and Python and now want to try out Haskell, but even if you dont have any significant programming experience, a smart person like you will be able to follow along and learn Haskell.
Abstract: It's all in the name: Learn You a Haskell for Great Good! is a hilarious, illustrated guide to this complex functional language. Packed with the author's original artwork, pop culture references, and most importantly, useful example code, this book teaches functional fundamentals in a way you never thought possible.You'll start with the kid stuff: basic syntax, recursion, types and type classes. Then once you've got the basics down, the real black belt master-class begins: you'll learn to use applicative functors, monads, zippers, and all the other mythical Haskell constructs you've only read about in storybooks.As you work your way through the author's imaginative (and occasionally insane) examples, you'll learn to: Laugh in the face of side effects as you wield purely functional programming techniques Use the magic of Haskell's "laziness" to play with infinite sets of data Organize your programs by creating your own types, type classes, and modules Use Haskell's elegant input/output system to share the genius of your programs with the outside world Short of eating the author's brain, you will not find a better way to learn this powerful language than reading Learn You a Haskell for Great Good! Excerpt from the Introduction Haskell is fun, and thats what its all about! This book is aimed at people who have experience programming in imperative languagessuch as C++, Java, and Pythonand now want to try out Haskell. But even if you dont have any significant programming experience, Ill bet a smart person like you will be able to follow along and learn Haskell. My first reaction to Haskell was that the language was just too weird. But after getting over that initial hurdle, it was smooth sailing. Even if Haskell seems strange to you at first, dont give up. Learning Haskell is almost like learning to program for the first time all over again. Its fun, and it forces you to think differently. NOTE If you ever get really stuck, the IRC channel #haskell on the freenode network is a great place to ask questions. The people there tend to be nice, patient, and understanding. Theyre a great resource for Haskell newbies. So, What's Haskell? Haskell is a purely functional programming language. In imperative programming languages, you give the computer a sequence of tasks, which it then executes. While executing them, the computer can change state. For instance, you can set the variable a to 5 and then do some stuff that might change the value of a. There are also flow-control structures for executing instructions several times, such as for and while loops. Purely functional programming is different. You dont tell the computer what to doyou tell it what stuff is. For instance, you can tell the computer that the factorial of a number is the product of every integer from 1 to that number or that the sum of a list of numbers is the first number plus the sum of the remaining numbers. You can express both of these operations as functions. Read the Introduction (PDF) in its entirety.
TL;DR: The semantics and implementations of Yampa and Fruit are presented, and it is shown how they can be used to write concise executable specifications of common GUI programming idioms and complete GUI programs.
Abstract: It is widely recognized that programs with Graphical User Interfaces (GUIs) are difficult to design and implement. One possible reason for this difficulty is the lack of any clear formal basis for GUI programming. GUI toolkit libraries are typically described only informally, in terms of implementation artifacts such as objects, imperative state and I/O systems.
In this thesis, we develop Fruit, a Functional Reactive User Interface Toolkit. Fruit is based on Yampa, an adaptation of Functional Reactive Programming (FRP) to the Arrows computational framework. Yampa has a clear, simple formal semantics based on a synchronous dataflow model of computation. GUIs in Fruit are defined compositionally using only the Yampa model and formally tractable mouse, keyboard and picture types. Fruit and Yampa have been implemented as libraries for Haskell, a purely functional programming language.
This thesis presents the semantics and implementations of Yampa and Fruit, and shows how they can be used to write concise executable specifications of common GUI programming idioms and complete GUI programs.
TL;DR: This work proposes a new mechanism for efficiently reclaiming memory used by nonshared values, reducing stress on the global memory allocator and describes an approach for minimizing the number of reference counts updates using borrowed references and a heuristic for automatically inferring borrow annotations.
Abstract: Most functional languages rely on some kind of garbage collection for automatic memory management. They usually eschew reference counting in favor of a tracing garbage collector, which has less bookkeeping overhead at runtime. On the other hand, having an exact reference count of each value can enable optimizations such as destructive updates. We explore these optimization opportunities in the context of an eager, purely functional programming language. We propose a new mechanism for efficiently reclaiming memory used by nonshared values, reducing stress on the global memory allocator. We describe an approach for minimizing the number of reference counts updates using borrowed references and a heuristic for automatically inferring borrow annotations. We implemented all these techniques in a new compiler for an eager and purely functional programming language with support for multi-threading. Our preliminary experimental results demonstrate our approach is competitive and often outperforms state-of-the-art compilers.