retrie-1.2.2: A powerful, easy-to-use codemodding tool for Haskell.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Retrie.CPP

Contents

- Internal interface exported for tests

Synopsis

- data CPP a
  - = NoCPP a
  - | CPP Text [AnnotatedImports] [a]
- addImportsCPP :: [AnnotatedImports] -> CPP AnnotatedModule -> CPP AnnotatedModule
- parseCPPFile :: (FilePath -> String -> IO AnnotatedModule) -> FilePath -> IO (CPP AnnotatedModule)
- parseCPP :: Monad m => (String -> m AnnotatedModule) -> Text -> m (CPP AnnotatedModule)
- printCPP :: [Replacement] -> CPP AnnotatedModule -> String
- cppFork :: Text -> [Text]

# Documentation

data CPP a #

Constructors

NoCPP a |
CPP Text [AnnotatedImports] [a] |

#### Instances

Instances details

Foldable CPP # |

Instance details

Defined in Retrie.CPP

Methods

fold :: Monoid m => CPP m -> m

foldMap :: Monoid m => (a -> m) -> CPP a -> m

foldMap' :: Monoid m => (a -> m) -> CPP a -> m

foldr :: (a -> b -> b) -> b -> CPP a -> b

foldr' :: (a -> b -> b) -> b -> CPP a -> b

foldl :: (b -> a -> b) -> b -> CPP a -> b

foldl' :: (b -> a -> b) -> b -> CPP a -> b

foldr1 :: (a -> a -> a) -> CPP a -> a

foldl1 :: (a -> a -> a) -> CPP a -> a

toList :: CPP a -> [a]

null :: CPP a -> Bool

length :: CPP a -> Int

elem :: Eq a => a -> CPP a -> Bool

maximum :: Ord a => CPP a -> a

minimum :: Ord a => CPP a -> a

sum :: Num a => CPP a -> a

product :: Num a => CPP a -> a

Traversable CPP # |
Instance details Defined in Retrie.CPP Methods traverse :: Applicative f => (a -> f b) -> CPP a -> f (CPP b) sequenceA :: Applicative f => CPP (f a) -> f (CPP a) mapM :: Monad m => (a -> m b) -> CPP a -> m (CPP b) sequence :: Monad m => CPP (m a) -> m (CPP a)
Functor CPP # |
Instance details Defined in Retrie.CPP Methods fmap :: (a -> b) -> CPP a -> CPP b # (<$) :: a -> CPP b -> CPP a #

addImportsCPP :: [AnnotatedImports] -> CPP AnnotatedModule -> CPP AnnotatedModule #

parseCPPFile :: (FilePath -> String -> IO AnnotatedModule) -> FilePath -> IO (CPP AnnotatedModule) #

parseCPP :: Monad m => (String -> m AnnotatedModule) -> Text -> m (CPP AnnotatedModule) #

printCPP :: [Replacement] -> CPP AnnotatedModule -> String #

## Internal interface exported for tests

cppFork :: Text -> [Text] #