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

Copyright(c) Andrew Seniuk, 2014
LicenseBSD-style (see the LICENSE file)
Maintainerrasfar@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. 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 r Source

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

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

Uses Data.Dynamic to support mutiple types homogeneously.

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

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

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

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

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

Compare two rose trees for shape equality.

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

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