sai-shape-syb-0.3.4: Obtain homogeneous values from arbitrary values, transforming or culling data

CopyrightAndrew G. Seniuk 2014-2015
LicenseBSD-style (see the LICENSE file)
MaintainerAndrew Seniuk <rasfar@gmail.com>
Stabilityexperimental
Portabilitynon-portable (uses Data.Generics.Basics)
Safe HaskellNone
LanguageHaskell2010

SAI.Data.Generics.Shape.SYB.GHC

Contents

Description

This package provides SYB shape support: generic mapping to homogeneous types, and related features. Complements existing Uniplate and TH shape libraries. See http://www.fremissant.net/shape-syb for more information.

The present module provides support for staged GHC AST types. Once you have a Homo r, Hetero, or Bi r, the rest of the API in Shape.SYB and Shape.SYB.Filter is applicable.

Please refer to Shape.SYB for descriptions of these functions. Here, in addition to the extra Stage argument, most of the ghom combinator functions also take an extra argument of type r, the default value to use wherever staging holes are encountered.

Synopsis

Staged shape functions

ghom_Staged :: forall r d. Data d => Stage -> r -> GenericQ r -> d -> Homo r Source

ghomK_Staged :: forall r d. Data d => Stage -> r -> (r -> r -> r) -> GenericQ r -> d -> Homo r Source

ghomP_Staged :: forall r s d. Data d => Stage -> r -> GenericQ Bool -> GenericQ r -> d -> Homo r Source

ghomE_Staged :: forall r s d. Data d => Stage -> r -> GenericQ Bool -> GenericQ r -> GenericQ s -> d -> Homo (Either r s) Source

ghomDyn_Staged :: forall d. Data d => Stage -> d -> Hetero Source

Uses Data.Dynamic to support mutiple types homogeneously.

ghomBi_Staged :: forall r d. Data d => Stage -> r -> GenericQ r -> d -> Bi r Source

shapeOf_Staged :: forall d. Data d => Stage -> d -> Shape Source

shapeOf_Staged_ :: forall d. Data d => Stage -> d -> Shape Source

Treat String and FastString as atomic values.

sizeOf_Staged :: forall d. Data d => Stage -> d -> Int Source

symmorphic_Staged :: forall d1 d2. (Data d1, Data d2) => Stage -> d1 -> d2 -> Bool Source

Compare two GHC ASTs for shape equality.

weightedShapeOf_Staged :: forall d. Data d => Stage -> d -> Homo Int Source

weightedShapeOf_Staged_ :: forall d. Data d => Stage -> d -> Homo Int Source

Treat String and FastString as atomic values.