compdata-0.13.1: Compositional Data Types
Copyright(c) 2010-2011 Patrick Bahr
LicenseBSD3
MaintainerPatrick Bahr <paba@diku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Comp.Decompose

Description

This module implements the decomposition of terms into function symbols and arguments resp. variables.

Synopsis

Documentation

data Decomp f v a Source #

This type represents decompositions of functorial values.

Constructors

Var v 
Fun (Const f) [a] 

type DecompTerm f v = Decomp f v (Term f) Source #

This type represents decompositions of terms.

type Decompose f v = (HasVars f v, Functor f, Foldable f) Source #

This class specifies the decomposability of a functorial value.

decomp :: Decompose f v => f a -> Decomp f v a Source #

structure :: Functor f => f a -> Const f Source #

This function computes the structure of a functorial value.

arguments :: Foldable f => f a -> [a] Source #

This function computes the arguments of a functorial value.

decompose :: Decompose f v => Term f -> DecompTerm f v Source #

This function decomposes a term.