19 research outputs found

    Polymonad programming in Haskell

    Get PDF
    Polymonads were recently introduced by Hicks et al. as a unified approach to programming with different notions of monads. Their work was mainly focussed on foundational aspects of the approach. In this article, we show how to incorporate the notion of polymonads into Haskell, which is the first time this has been done in a full-scale language. In particular, we show how polymonads can be represented in Haskell, give a justification of the representation through proofs in Agda, and provide a plugin for the Glasgow Haskell Compiler (GHC) that enables their use in practice. Finally, we demonstrate the utility of our system by means of examples concerned with session types and the parameterized effect monad. This work provides a common representation of a number of existing approaches to generalized monads in Haskell

    Polymonad programming in Haskell

    Get PDF
    Polymonads were recently introduced by Hicks et al. as a unified approach to programming with different notions of monads. Their work was mainly focussed on foundational aspects of the approach. In this article, we show how to incorporate the notion of polymonads into Haskell, which is the first time this has been done in a full-scale language. In particular, we show how polymonads can be represented in Haskell, give a justification of the representation through proofs in Agda, and provide a plugin for the Glasgow Haskell Compiler (GHC) that enables their use in practice. Finally, we demonstrate the utility of our system by means of examples concerned with session types and the parameterized effect monad. This work provides a common representation of a number of existing approaches to generalized monads in Haskell

    Unified notions of generalised monads and applicative functors

    Get PDF
    Monads and applicative functors are staple design patterns to handle effects in pure functional programming, especially in Haskell with its built-in syntactic support. Over the last decade, however, practical needs and theoretical research have given rise to generalisations of monads and applicative functors. Examples are graded, indexed and constrained monads. The problem with these generalisations is that no unified representation of standard and generalised monads or applicatives exists in theory or practice. As a result, in Haskell, each generalisation has its own representation and library of functions. Hence, interoperability among the different notions is hampered and code is duplicated. To solve the above issues, I first survey the three most wide-spread generalisations of monads and applicatives: their graded, indexed and constrained variations. I then examine two approaches to give them a unified representation in Haskell: polymonads and supermonads. Both approaches are embodied in plugins for the Haskell compiler GHC that address most of the identified concerns. Finally, I examine category theory and propose unifying categorical models that encompass the three discussed generalisations together with the standard notions of monad and applicative

    Electrostatic Levitation for Studies of Materials for Additive and In-Space Manufacturing

    Get PDF
    The electrostatic levitation (ESL) laboratory at NASA's Marshall Space Flight Center (MSFC) is a unique facility for investigators studying high-temperature materials. Electrostatic levitation minimizes gravitational effects and allows materials to be studied without contact with a container or instrumentation

    The constrained-monad problem

    Get PDF
    In Haskell, there are many data types that would form monads were it not for the presence of type-class constraints on the operations onthat data type. This is a frustrating problem in practice, because there is a considerable amount of support and infrastructure for monads that these data types cannot use. Using several examples,we show that a monadic computation can be restructured into a normal form such that the standard monad class can be used. The technique is not specific to monads, and we show how it can also be applied to other structures, such as applicative functors. One significant use case for this technique is domain-specific languages,where it is often desirable to compile a deep embedding of a computation to some other language, which requires restricting the types that can appear in that computation

    Unified notions of generalised monads and applicative functors

    No full text
    Monads and applicative functors are staple design patterns to handle effects in pure functional programming, especially in Haskell with its built-in syntactic support. Over the last decade, however, practical needs and theoretical research have given rise to generalisations of monads and applicative functors. Examples are graded, indexed and constrained monads. The problem with these generalisations is that no unified representation of standard and generalised monads or applicatives exists in theory or practice. As a result, in Haskell, each generalisation has its own representation and library of functions. Hence, interoperability among the different notions is hampered and code is duplicated. To solve the above issues, I first survey the three most wide-spread generalisations of monads and applicatives: their graded, indexed and constrained variations. I then examine two approaches to give them a unified representation in Haskell: polymonads and supermonads. Both approaches are embodied in plugins for the Haskell compiler GHC that address most of the identified concerns. Finally, I examine category theory and propose unifying categorical models that encompass the three discussed generalisations together with the standard notions of monad and applicative

    Supermonads: one notion to bind them all

    No full text
    Several popular generalizations of monads have been implemented in Haskell. Unfortunately, because the shape of the associated type constructors do not match the standard Haskell monad interface, each such implementation provides its own type class and versions of associated library functions. Furthermore, simultaneous use of different monadic notions can be cumbersome as it in general is necessary to be explicit about which notion is used where. In this paper we introduce supermonads: an encoding of monadic notions that captures several different generalizations along with a version of the standard library of monadic functions that work uniformly with all of them. As standard Haskell type inference does not work for supermonads due to their generality, our supermonad implementation is accompanied with a language extension, in the form of a plugin for the Glasgow Haskell Compiler (GHC), that allows type inference for supermonads, obviating the need for manual annotations

    Stringent regulation of DNA repair during human hematopoietic differentiation: a gene expression and functional analysis.

    No full text
    Contains fulltext : 49693.pdf (publisher's version ) (Closed access)For the lymphohematopoietic system, maturation-dependent alterations in DNA repair function have been demonstrated. Because little information is available on the regulatory mechanisms underlying these changes, we have correlated the expression of DNA damage response genes and the functional repair capacity of cells at distinct stages of human hematopoietic differentiation. Comparing fractions of mature (CD34-), progenitor (CD34+ 38+), and stem cells (CD34+ 38-) isolated from umbilical cord blood, we observed: 1) stringently regulated differentiation-dependent shifts in both the cellular processing of DNA lesions and the expression profiles of related genes and 2) considerable interindividual variability of DNA repair at transcriptional and functional levels. The respective repair phenotype was found to be constitutively regulated and not dominated by adaptive response to acute DNA damage. During blood cell development, the removal of DNA adducts, the resealing of repair gaps, the resistance to DNA-reactive drugs clearly increased in stem or mature compared with progenitor cells of the same individual. On the other hand, the vast majority of differentially expressed repair genes was consistently upregulated in the progenitor fraction. A positive correlation of repair function and transcript levels was found for a small number of genes such as RAD23 or ATM, which may serve as key regulators for DNA damage processing via specific pathways. These data indicate that the organism might aim to protect the small number of valuable slow dividing stem cells by extensive DNA repair, whereas fast-proliferating progenitor cells, once damaged, are rather eliminated by apoptosis
    corecore