| Copyright | (c) 2014 Edwin Westbrook |
|---|---|
| License | BSD3 |
| Maintainer | emw4@rice.edu |
| Stability | experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell2010 |
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
- class NuMatching a => Liftable a where
- mbList :: NuMatching a => Mb c [a] -> [Mb c a]
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
Instances
| Liftable Bool Source # | |
| Liftable Char Source # | |
| Liftable Int Source # | |
| Liftable Integer Source # | |
| Liftable Natural Source # | |
| Liftable () Source # | |
| Liftable a => Liftable [a] Source # | |
| Liftable a => Liftable (Maybe a) Source # | |
| (Integral a, Liftable a) => Liftable (Ratio a) Source # | |
| Liftable (Closed a) Source # | |
| (Liftable a, Liftable b) => Liftable (Either a b) Source # | |
| (Liftable a, Liftable b) => Liftable (a, b) Source # | |
| Liftable (Proxy a) Source # | |
| Liftable (a :~: b) Source # | |
| Liftable (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