sai-shape-syb-0.2.1: Obtain homogeneous values from arbitrary values, tramsforming or culling data

Portabilitynon-portable (uses Data.Generics.Basics)
Stabilityexperimental
Maintainerrasfar@gmail.com
Safe HaskellNone

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. One you have a Homo r, Hetero, or Bi r, the rest of the API in Shape.SYB and Shape.SYB.Filter is applicable.

Synopsis

Staged shape functions

ghomStaged :: forall r d. Data d => Stage -> r -> GenericQ r -> d -> Homo rSource

ghomStagedK :: forall r d. Data d => Stage -> r -> (r -> r -> r) -> GenericQ r -> d -> Homo rSource

ghomDynStaged :: forall d. Data d => Stage -> d -> HeteroSource

Uses Data.Dynamic to support mutiple types homogeneously.

ghomBiStaged :: forall r d. Data d => Stage -> r -> GenericQ r -> d -> Bi rSource

shapeOfStaged :: forall d. Data d => Stage -> d -> ShapeSource

shapeOfStaged_ :: forall d. Data d => Stage -> d -> ShapeSource

sizeOfStaged :: forall d. Data d => Stage -> d -> IntSource

symmorphicStaged :: forall d1 d2. (Data d1, Data d2) => Stage -> d1 -> d2 -> BoolSource

Compare two rose trees for shape equality.

weightedShapeOfStaged :: forall d. Data d => Stage -> d -> Homo IntSource

Re-exported from the ghc-syb-utils package

data Stage

Ghc Ast types tend to have undefined holes, to be filled by later compiler phases. We tag Asts with their source, so that we can avoid such holes based on who generated the Asts.

Constructors

Parser 
Renamer 
TypeChecker 

Instances