Copyright | Andrew G. Seniuk 2014-2015 |
---|---|
License | BSD-style (see the LICENSE file) |
Maintainer | Andrew Seniuk <rasfar@gmail.com> |
Stability | experimental |
Portability | non-portable (uses Data.Generics.Basics) |
Safe Haskell | None |
Language | Haskell2010 |
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
rHetero
, or
, the rest of
the API in Shape.SYB and Shape.SYB.Filter is applicable.Bi
r
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.
- ghom_Staged :: forall r d. Data d => Stage -> r -> GenericQ r -> d -> Homo r
- ghomK_Staged :: forall r d. Data d => Stage -> r -> (r -> r -> r) -> GenericQ r -> d -> Homo r
- ghomP_Staged :: forall r s d. Data d => Stage -> r -> GenericQ Bool -> GenericQ r -> d -> Homo r
- ghomE_Staged :: forall r s d. Data d => Stage -> r -> GenericQ Bool -> GenericQ r -> GenericQ s -> d -> Homo (Either r s)
- ghomDyn_Staged :: forall d. Data d => Stage -> d -> Hetero
- ghomBi_Staged :: forall r d. Data d => Stage -> r -> GenericQ r -> d -> Bi r
- shapeOf_Staged :: forall d. Data d => Stage -> d -> Shape
- shapeOf_Staged_ :: forall d. Data d => Stage -> d -> Shape
- sizeOf_Staged :: forall d. Data d => Stage -> d -> Int
- symmorphic_Staged :: forall d1 d2. (Data d1, Data d2) => Stage -> d1 -> d2 -> Bool
- weightedShapeOf_Staged :: forall d. Data d => Stage -> d -> Homo Int
- weightedShapeOf_Staged_ :: forall d. Data d => Stage -> d -> Homo Int
Staged shape functions
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
ghomBi_Staged
s f x =zipRose
(ghomDyn_Staged
s x) (ghom_Staged
s f x)
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
Treat String
and FastString
as atomic values.