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

PortabilityGHC
Stabilityexperimental
Maintaineremw4@rice.edu
Safe HaskellNone

Data.Binding.Hobbits.Liftable

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 Liftable a whereSource

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.

Methods

mbLift :: Mb ctx a -> aSource

class Liftable1 f whereSource

The class Liftable1 f gives a lifting function for each type f a when a itself is Liftable.

Methods

mbLift1 :: Liftable a => Mb ctx (f a) -> f aSource

Instances

Liftable1 [] 
(Liftable2 f, Liftable a) => Liftable1 (f a) 

class Liftable2 f whereSource

The class Liftable2 f gives a lifting function for each type f a b when a and b are Liftable.

Methods

mbLift2 :: (Liftable a, Liftable b) => Mb ctx (f a b) -> f a bSource

Instances

mbList :: Mb c [a] -> [Mb c a]Source

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