hobbits-1.2.4: A library for canonically representing terms with binding

Copyright(c) 2014 Edwin Westbrook
LicenseBSD3
Maintaineremw4@rice.edu
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell98

Data.Binding.Hobbits.Liftable

Contents

Description

This module defines the type-class Liftable for lifting non-binding-related data out of name-bindings. Note that this code is not "trusted", i.e., it is not part of the name-binding abstraction: instead, it is all written using the primitives exported by the Mb

Synopsis

Documentation

class NuMatching a => Liftable a where Source #

The class Liftable a gives a "lifting function" for a, which can take any data of type a out of a multi-binding of type Mb ctx a.

Minimal complete definition

mbLift

Methods

mbLift :: Mb ctx a -> a Source #

Instances

Liftable Bool Source # 

Methods

mbLift :: Mb ctx Bool -> Bool Source #

Liftable Char Source # 

Methods

mbLift :: Mb ctx Char -> Char Source #

Liftable Int Source # 

Methods

mbLift :: Mb ctx Int -> Int Source #

Liftable Integer Source # 

Methods

mbLift :: Mb ctx Integer -> Integer Source #

Liftable () Source # 

Methods

mbLift :: Mb ctx () -> () Source #

Liftable a => Liftable [a] Source # 

Methods

mbLift :: Mb ctx [a] -> [a] Source #

Liftable a => Liftable (Maybe a) Source # 

Methods

mbLift :: Mb ctx (Maybe a) -> Maybe a Source #

(Integral a, Liftable a) => Liftable (Ratio a) Source # 

Methods

mbLift :: Mb ctx (Ratio a) -> Ratio a Source #

Liftable (Closed a) Source # 

Methods

mbLift :: Mb ctx (Closed a) -> Closed a Source #

(Liftable a, Liftable b) => Liftable (Either a b) Source # 

Methods

mbLift :: Mb ctx (Either a b) -> Either a b Source #

(Liftable a, Liftable b) => Liftable (a, b) Source # 

Methods

mbLift :: Mb ctx (a, b) -> (a, b) Source #

Liftable (Member c a) Source # 

Methods

mbLift :: Mb ctx (Member c a) -> Member c a Source #

Lifting instances that must be defined inside the library abstraction boundary

Lifting instances and related functions that could be defined outside the library

mbList :: NuMatching a => Mb c [a] -> [Mb c a] Source #

Lift a list (but not its elements) out of a multi-binding

Orphan instances