ermine-0.6: Ermine

Copyright(c) Edward Kmett 2012
LicenseBSD3
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Ermine.Syntax

Contents

Description

 

Synopsis

Variables

class Variable t where Source

Discriminable pure.

Minimal complete definition

Nothing

Methods

_Var :: Prism' (t a) a Source

If t is also Applicative, then it should satisfy these laws:

pure a '^?' _VarJust a
purereview _Var

Application

class App t where Source

Discriminable App

This prism provides ad hoc overloading of construction and pattern matching on App.

Minimal complete definition

Nothing

Methods

_App :: Prism' (t a) (t a, t a) Source

Instances

App (Type k) 
AsConvention b => App (Core b) 
App (Term t) 
(Variable t, App t) => App (Scope b t) 

apps :: App t => t a -> [t a] -> t a Source

Fold a series of applications.

(##) :: App t => t a -> t a -> t a infixl 9 Source

Convenient infix application operator.

Strict Unboxed Application

class AppHash t where Source

Minimal complete definition

Nothing

Methods

_AppHash :: Prism' (t a) (t a, t a) Source

Instances

AsConvention t => AppHash (Core t) 
(Variable t, AppHash t) => AppHash (Scope b t) 

appHashes :: AppHash t => t a -> [t a] -> t a Source

Fold a series of unboxed applications.

Dictionary Application

class AppDict c where Source

AppDict provides strict application for dictionary manipulation

Minimal complete definition

Nothing

Methods

_AppDict :: Prism' (c a) (c a, c a) Source

Instances

AsConvention t => AppDict (Core t) 
(Variable t, AppDict t) => AppDict (Scope b t) 

appDicts :: AppDict t => t a -> [t a] -> t a Source

Apply several dictionaries.

Fun

class Fun t where Source

Discriminable syntactic arrows.

Minimal complete definition

Nothing

Methods

_Fun :: Prism' (t a) (t a, t a) Source

Instances

(~>) :: Fun t => t a -> t a -> t a infixr 0 Source

Provide ad hoc overloading of function arrows.

Tup

class (Reviewable p, Functor f) => Tup p f t where Source

(Possibly) Discriminable tupling.

Minimal complete definition

Nothing

Methods

_Tup :: Optic' p f t [t] Source

Instances

(Bifunctor p, Choice p, Applicative f) => Tup p f (Pattern t) 
((~) (* -> * -> *) p (Tagged *), (~) (* -> *) f Identity) => Tup p f (Type k t) 
((~) (* -> * -> *) p (Tagged *), (~) (* -> *) f Identity, Tup (Tagged *) Identity t) => Tup p f (Binder v t) 
((~) (* -> * -> *) p (Tagged *), (~) (* -> *) f Identity) => Tup p f (Term t a) 

tup :: Tup Tagged Identity t => [t] -> t Source

tup' :: Tup Tagged Identity t => [t] -> t Source