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

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

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.

Methods

mbLift :: Mb ctx a -> a Source #

Instances
Liftable Bool Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

mbLift :: Mb ctx Bool -> Bool Source #

Liftable Char Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

mbLift :: Mb ctx Char -> Char Source #

Liftable Int Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

mbLift :: Mb ctx Int -> Int Source #

Liftable Integer Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

mbLift :: Mb ctx Integer -> Integer Source #

Liftable Natural Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

mbLift :: Mb ctx Natural -> Natural Source #

Liftable () Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

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

Liftable a => Liftable [a] Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

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

Liftable a => Liftable (Maybe a) Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

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

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

Defined in Data.Binding.Hobbits.Liftable

Methods

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

Liftable (Closed a) Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

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

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

Defined in Data.Binding.Hobbits.Liftable

Methods

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

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

Defined in Data.Binding.Hobbits.Liftable

Methods

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

Liftable (Proxy a) Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

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

Liftable (a :~: b) Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

Methods

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

Liftable (Member c a) Source # 
Instance details

Defined in Data.Binding.Hobbits.Liftable

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

(Integral a, NuMatching a) => NuMatching (Ratio a) Source # 
Instance details

Eq a => Eq (Mb ctx a) Source # 
Instance details

Methods

(==) :: Mb ctx a -> Mb ctx a -> Bool #

(/=) :: Mb ctx a -> Mb ctx a -> Bool #