invertible-syntax-poly-0.1.0.1: Extends invertible-syntax library capable to use parameterized token type.

CopyrightKei Hibino 2012
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe
LanguageHaskell98

Control.Isomorphism.Partial.Ext.Prim

Description

This module contains utility combinators for Control.Isomorphism.Partial.

Synopsis

Documentation

iso :: (a -> b) -> (b -> a) -> Iso a b Source

Define a isomorphism from two pure functions.

apply' :: Iso alpha beta -> alpha -> Maybe beta Source

strict version of apply

unapply' :: Iso alpha beta -> beta -> Maybe alpha Source

strict version of unapply

mayAppend' :: Iso (a, b) c -> Iso a c -> Iso (a, Maybe b) c Source

May construct or destruct with postfix term.

(||?) :: Iso (a, b) c -> Iso a c -> Iso (a, Maybe b) c infixr 6 Source

Operator version of mayAppend'.

mayAppend :: Iso (a, b) a -> Iso (a, Maybe b) a Source

Restricted version of mayAppend'.

mayPrepend' :: Iso (a, b) c -> Iso b c -> Iso (Maybe a, b) c Source

May construct or destruct with prefix term.

(?||) :: Iso (a, b) c -> Iso b c -> Iso (Maybe a, b) c infixl 6 Source

Operator version of mayPrepend'.

mayPrepend :: Iso (a, b) b -> Iso (Maybe a, b) b Source

Restricted version of mayPrepend'.