Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Language.Sexp.Located
Synopsis
- decode :: ByteString -> Either String Sexp
- parseSexp :: FilePath -> ByteString -> Either String Sexp
- parseSexps :: FilePath -> ByteString -> Either String [Sexp]
- parseSexpWithPos :: Position -> ByteString -> Either String Sexp
- parseSexpsWithPos :: Position -> ByteString -> Either String [Sexp]
- encode :: Sexp -> ByteString
- format :: Sexp -> ByteString
- type Sexp = Fix (Compose (LocatedBy Position) SexpF)
- pattern Atom :: Atom -> Sexp
- pattern Number :: Scientific -> Sexp
- pattern Symbol :: Text -> Sexp
- pattern String :: Text -> Sexp
- pattern ParenList :: [Sexp] -> Sexp
- pattern BracketList :: [Sexp] -> Sexp
- pattern BraceList :: [Sexp] -> Sexp
- pattern Modified :: Prefix -> Sexp -> Sexp
- data SexpF e
- = AtomF !Atom
- | ParenListF [e]
- | BracketListF [e]
- | BraceListF [e]
- | ModifiedF !Prefix e
- data Atom
- = AtomNumber !Scientific
- | AtomString !Text
- | AtomSymbol !Text
- data Prefix
- data LocatedBy a e = !a :< e
- data Position = Position FilePath !Int !Int
- newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) = Compose {
- getCompose :: f (g a)
- newtype Fix (f :: Type -> Type) = Fix {}
- dummyPos :: Position
- fromSimple :: Fix SexpF -> Fix (Compose (LocatedBy Position) SexpF)
- toSimple :: Fix (Compose (LocatedBy Position) SexpF) -> Fix SexpF
Parse and print
parseSexps :: FilePath -> ByteString -> Either String [Sexp] Source #
Parse multiple Sexp
from a string.
parseSexpWithPos :: Position -> ByteString -> Either String Sexp Source #
Parse a Sexp
from a string, starting from a given
position. Useful for embedding into other parsers.
parseSexpsWithPos :: Position -> ByteString -> Either String [Sexp] Source #
Parse multiple Sexp
from a string, starting from a given
position. Useful for embedding into other parsers.
Type
type Sexp = Fix (Compose (LocatedBy Position) SexpF) Source #
S-expression type annotated with positions. Useful for further parsing.
pattern Number :: Scientific -> Sexp Source #
pattern BracketList :: [Sexp] -> Sexp Source #
Internal types
S-expression functor
Constructors
AtomF !Atom | |
ParenListF [e] | |
BracketListF [e] | |
BraceListF [e] | |
ModifiedF !Prefix e |
Instances
S-expression atom type
Constructors
AtomNumber !Scientific | |
AtomString !Text | |
AtomSymbol !Text |
Instances
NFData Atom Source # | |||||
Defined in Language.Sexp.Types | |||||
Generic Atom Source # | |||||
Defined in Language.Sexp.Types Associated Types
| |||||
Show Atom Source # | |||||
Eq Atom Source # | |||||
Ord Atom Source # | |||||
Pretty Atom Source # | |||||
Defined in Language.Sexp.Pretty | |||||
type Rep Atom Source # | |||||
Defined in Language.Sexp.Types type Rep Atom = D1 ('MetaData "Atom" "Language.Sexp.Types" "sexp-grammar-2.3.4.2-5YLyUsQcyfS2jlTuu16KZA" 'False) (C1 ('MetaCons "AtomNumber" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Scientific)) :+: (C1 ('MetaCons "AtomString" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "AtomSymbol" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text)))) |
S-expression quotation type
Instances
NFData Prefix Source # | |||||
Defined in Language.Sexp.Types | |||||
Generic Prefix Source # | |||||
Defined in Language.Sexp.Types Associated Types
| |||||
Show Prefix Source # | |||||
Eq Prefix Source # | |||||
Ord Prefix Source # | |||||
type Rep Prefix Source # | |||||
Defined in Language.Sexp.Types type Rep Prefix = D1 ('MetaData "Prefix" "Language.Sexp.Types" "sexp-grammar-2.3.4.2-5YLyUsQcyfS2jlTuu16KZA" 'False) ((C1 ('MetaCons "Quote" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Backtick" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Comma" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CommaAt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Hash" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Annotation functor for positions
Constructors
!a :< e |
Instances
Bifunctor LocatedBy Source # | |||||
Show Sexp Source # | |||||
Eq p => Eq1 (LocatedBy p) Source # | |||||
NFData p => NFData1 (LocatedBy p) Source # | |||||
Defined in Language.Sexp.Types | |||||
Functor (LocatedBy a) Source # | |||||
Foldable (LocatedBy a) Source # | |||||
Defined in Language.Sexp.Types Methods fold :: Monoid m => LocatedBy a m -> m # foldMap :: Monoid m => (a0 -> m) -> LocatedBy a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> LocatedBy a a0 -> m # foldr :: (a0 -> b -> b) -> b -> LocatedBy a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> LocatedBy a a0 -> b # foldl :: (b -> a0 -> b) -> b -> LocatedBy a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> LocatedBy a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> LocatedBy a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> LocatedBy a a0 -> a0 # toList :: LocatedBy a a0 -> [a0] # null :: LocatedBy a a0 -> Bool # length :: LocatedBy a a0 -> Int # elem :: Eq a0 => a0 -> LocatedBy a a0 -> Bool # maximum :: Ord a0 => LocatedBy a a0 -> a0 # minimum :: Ord a0 => LocatedBy a a0 -> a0 # | |||||
Traversable (LocatedBy a) Source # | |||||
Defined in Language.Sexp.Types | |||||
(NFData p, NFData e) => NFData (LocatedBy p e) Source # | |||||
Defined in Language.Sexp.Types | |||||
Generic (LocatedBy a e) Source # | |||||
Defined in Language.Sexp.Types Associated Types
| |||||
(Show a, Show e) => Show (LocatedBy a e) Source # | |||||
(Eq a, Eq e) => Eq (LocatedBy a e) Source # | |||||
(Ord a, Ord e) => Ord (LocatedBy a e) Source # | |||||
Defined in Language.Sexp.Types Methods compare :: LocatedBy a e -> LocatedBy a e -> Ordering # (<) :: LocatedBy a e -> LocatedBy a e -> Bool # (<=) :: LocatedBy a e -> LocatedBy a e -> Bool # (>) :: LocatedBy a e -> LocatedBy a e -> Bool # (>=) :: LocatedBy a e -> LocatedBy a e -> Bool # | |||||
type Rep (LocatedBy a e) Source # | |||||
Defined in Language.Sexp.Types type Rep (LocatedBy a e) = D1 ('MetaData "LocatedBy" "Language.Sexp.Types" "sexp-grammar-2.3.4.2-5YLyUsQcyfS2jlTuu16KZA" 'False) (C1 ('MetaCons ":<" ('InfixI 'LeftAssociative 9) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e))) |
Position: file name, line number, column number
Instances
NFData Position Source # | |||||
Defined in Language.Sexp.Types | |||||
Generic Position Source # | |||||
Defined in Language.Sexp.Types Associated Types
| |||||
Show Sexp Source # | |||||
Show Position Source # | |||||
Eq Position Source # | |||||
Ord Position Source # | |||||
Defined in Language.Sexp.Types | |||||
Pretty Position Source # | |||||
Defined in Language.Sexp.Types | |||||
type Rep Position Source # | |||||
Defined in Language.Sexp.Types type Rep Position = D1 ('MetaData "Position" "Language.Sexp.Types" "sexp-grammar-2.3.4.2-5YLyUsQcyfS2jlTuu16KZA" 'False) (C1 ('MetaCons "Position" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)))) |
newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) infixr 9 #
Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.
Examples
>>>
fmap (subtract 1) (Compose (Just [1, 2, 3]))
Compose (Just [0,1,2])
>>>
Compose (Just [1, 2, 3]) <> Compose Nothing
Compose (Just [1,2,3])
>>>
Compose (Just [(++ "World"), (++ "Haskell")]) <*> Compose (Just ["Hello, "])
Compose (Just ["Hello, World","Hello, Haskell"])
Constructors
Compose infixr 9 | |
Fields
|
Instances
Show Sexp Source # | |||||
TestEquality f => TestEquality (Compose f g :: k2 -> Type) | The deduction (via generativity) that if Since: base-4.14.0.0 | ||||
Defined in Data.Functor.Compose | |||||
Functor f => Generic1 (Compose f g :: k -> Type) | |||||
Defined in Data.Functor.Compose Associated Types
| |||||
(Foldable1 f, Foldable1 g) => Foldable1 (Compose f g) | Since: base-4.18.0.0 | ||||
Defined in Data.Foldable1 Methods fold1 :: Semigroup m => Compose f g m -> m # foldMap1 :: Semigroup m => (a -> m) -> Compose f g a -> m # foldMap1' :: Semigroup m => (a -> m) -> Compose f g a -> m # toNonEmpty :: Compose f g a -> NonEmpty a # maximum :: Ord a => Compose f g a -> a # minimum :: Ord a => Compose f g a -> a # foldrMap1 :: (a -> b) -> (a -> b -> b) -> Compose f g a -> b # foldlMap1' :: (a -> b) -> (b -> a -> b) -> Compose f g a -> b # foldlMap1 :: (a -> b) -> (b -> a -> b) -> Compose f g a -> b # foldrMap1' :: (a -> b) -> (a -> b -> b) -> Compose f g a -> b # | |||||
(Eq1 f, Eq1 g) => Eq1 (Compose f g) | Since: base-4.9.0.0 | ||||
(Ord1 f, Ord1 g) => Ord1 (Compose f g) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Compose | |||||
(Read1 f, Read1 g) => Read1 (Compose f g) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Compose Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Compose f g a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Compose f g a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Compose f g a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Compose f g a] # | |||||
(Show1 f, Show1 g) => Show1 (Compose f g) | Since: base-4.9.0.0 | ||||
(Functor f, Contravariant g) => Contravariant (Compose f g) | |||||
(NFData1 f, NFData1 g) => NFData1 (Compose f g) | Since: deepseq-1.4.3.0 | ||||
Defined in Control.DeepSeq | |||||
(Alternative f, Applicative g) => Alternative (Compose f g) | Since: base-4.9.0.0 | ||||
(Applicative f, Applicative g) => Applicative (Compose f g) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Compose | |||||
(Functor f, Functor g) => Functor (Compose f g) | Since: base-4.9.0.0 | ||||
(Foldable f, Foldable g) => Foldable (Compose f g) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Compose Methods fold :: Monoid m => Compose f g m -> m # foldMap :: Monoid m => (a -> m) -> Compose f g a -> m # foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m # foldr :: (a -> b -> b) -> b -> Compose f g a -> b # foldr' :: (a -> b -> b) -> b -> Compose f g a -> b # foldl :: (b -> a -> b) -> b -> Compose f g a -> b # foldl' :: (b -> a -> b) -> b -> Compose f g a -> b # foldr1 :: (a -> a -> a) -> Compose f g a -> a # foldl1 :: (a -> a -> a) -> Compose f g a -> a # toList :: Compose f g a -> [a] # null :: Compose f g a -> Bool # length :: Compose f g a -> Int # elem :: Eq a => a -> Compose f g a -> Bool # maximum :: Ord a => Compose f g a -> a # minimum :: Ord a => Compose f g a -> a # | |||||
(Traversable f, Traversable g) => Traversable (Compose f g) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Compose | |||||
(Hashable1 f, Hashable1 g) => Hashable1 (Compose f g) | |||||
Defined in Data.Hashable.Class | |||||
NFData (f (g a)) => NFData (Compose f g a) | Note: in Since: deepseq-1.4.3.0 | ||||
Defined in Control.DeepSeq | |||||
Monoid (f (g a)) => Monoid (Compose f g a) | Since: base-4.16.0.0 | ||||
Semigroup (f (g a)) => Semigroup (Compose f g a) | Since: base-4.16.0.0 | ||||
(Typeable a, Typeable f, Typeable g, Typeable k1, Typeable k2, Data (f (g a))) => Data (Compose f g a) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Compose Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Compose f g a -> c (Compose f g a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Compose f g a) # toConstr :: Compose f g a -> Constr # dataTypeOf :: Compose f g a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Compose f g a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Compose f g a)) # gmapT :: (forall b. Data b => b -> b) -> Compose f g a -> Compose f g a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r # gmapQ :: (forall d. Data d => d -> u) -> Compose f g a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Compose f g a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) # | |||||
Bounded (f (g a)) => Bounded (Compose f g a) | Since: base-4.19.0.0 | ||||
Enum (f (g a)) => Enum (Compose f g a) | Since: base-4.19.0.0 | ||||
Defined in Data.Functor.Compose Methods succ :: Compose f g a -> Compose f g a # pred :: Compose f g a -> Compose f g a # toEnum :: Int -> Compose f g a # fromEnum :: Compose f g a -> Int # enumFrom :: Compose f g a -> [Compose f g a] # enumFromThen :: Compose f g a -> Compose f g a -> [Compose f g a] # enumFromTo :: Compose f g a -> Compose f g a -> [Compose f g a] # enumFromThenTo :: Compose f g a -> Compose f g a -> Compose f g a -> [Compose f g a] # | |||||
Floating (f (g a)) => Floating (Compose f g a) | Since: base-4.20.0.0 | ||||
Defined in Data.Functor.Compose Methods exp :: Compose f g a -> Compose f g a # log :: Compose f g a -> Compose f g a # sqrt :: Compose f g a -> Compose f g a # (**) :: Compose f g a -> Compose f g a -> Compose f g a # logBase :: Compose f g a -> Compose f g a -> Compose f g a # sin :: Compose f g a -> Compose f g a # cos :: Compose f g a -> Compose f g a # tan :: Compose f g a -> Compose f g a # asin :: Compose f g a -> Compose f g a # acos :: Compose f g a -> Compose f g a # atan :: Compose f g a -> Compose f g a # sinh :: Compose f g a -> Compose f g a # cosh :: Compose f g a -> Compose f g a # tanh :: Compose f g a -> Compose f g a # asinh :: Compose f g a -> Compose f g a # acosh :: Compose f g a -> Compose f g a # atanh :: Compose f g a -> Compose f g a # log1p :: Compose f g a -> Compose f g a # expm1 :: Compose f g a -> Compose f g a # | |||||
RealFloat (f (g a)) => RealFloat (Compose f g a) | Since: base-4.20.0.0 | ||||
Defined in Data.Functor.Compose Methods floatRadix :: Compose f g a -> Integer # floatDigits :: Compose f g a -> Int # floatRange :: Compose f g a -> (Int, Int) # decodeFloat :: Compose f g a -> (Integer, Int) # encodeFloat :: Integer -> Int -> Compose f g a # exponent :: Compose f g a -> Int # significand :: Compose f g a -> Compose f g a # scaleFloat :: Int -> Compose f g a -> Compose f g a # isNaN :: Compose f g a -> Bool # isInfinite :: Compose f g a -> Bool # isDenormalized :: Compose f g a -> Bool # isNegativeZero :: Compose f g a -> Bool # | |||||
Generic (Compose f g a) | |||||
Defined in Data.Functor.Compose Associated Types
| |||||
Num (f (g a)) => Num (Compose f g a) | Since: base-4.19.0.0 | ||||
Defined in Data.Functor.Compose Methods (+) :: Compose f g a -> Compose f g a -> Compose f g a # (-) :: Compose f g a -> Compose f g a -> Compose f g a # (*) :: Compose f g a -> Compose f g a -> Compose f g a # negate :: Compose f g a -> Compose f g a # abs :: Compose f g a -> Compose f g a # signum :: Compose f g a -> Compose f g a # fromInteger :: Integer -> Compose f g a # | |||||
Read (f (g a)) => Read (Compose f g a) | Since: base-4.18.0.0 | ||||
Fractional (f (g a)) => Fractional (Compose f g a) | Since: base-4.20.0.0 | ||||
Integral (f (g a)) => Integral (Compose f g a) | Since: base-4.19.0.0 | ||||
Defined in Data.Functor.Compose Methods quot :: Compose f g a -> Compose f g a -> Compose f g a # rem :: Compose f g a -> Compose f g a -> Compose f g a # div :: Compose f g a -> Compose f g a -> Compose f g a # mod :: Compose f g a -> Compose f g a -> Compose f g a # quotRem :: Compose f g a -> Compose f g a -> (Compose f g a, Compose f g a) # divMod :: Compose f g a -> Compose f g a -> (Compose f g a, Compose f g a) # | |||||
Real (f (g a)) => Real (Compose f g a) | Since: base-4.19.0.0 | ||||
Defined in Data.Functor.Compose Methods toRational :: Compose f g a -> Rational # | |||||
RealFrac (f (g a)) => RealFrac (Compose f g a) | Since: base-4.20.0.0 | ||||
Show (f (g a)) => Show (Compose f g a) | Since: base-4.18.0.0 | ||||
Eq (f (g a)) => Eq (Compose f g a) | Since: base-4.18.0.0 | ||||
Ord (f (g a)) => Ord (Compose f g a) | Since: base-4.18.0.0 | ||||
Defined in Data.Functor.Compose Methods compare :: Compose f g a -> Compose f g a -> Ordering # (<) :: Compose f g a -> Compose f g a -> Bool # (<=) :: Compose f g a -> Compose f g a -> Bool # (>) :: Compose f g a -> Compose f g a -> Bool # (>=) :: Compose f g a -> Compose f g a -> Bool # | |||||
Hashable (f (g a)) => Hashable (Compose f g a) | |||||
Defined in Data.Hashable.Class | |||||
type Rep1 (Compose f g :: k -> Type) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Compose | |||||
type Rep (Compose f g a) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Compose |
newtype Fix (f :: Type -> Type) #
A fix-point type.
Instances
Show Sexp Source # | |
Show Sexp Source # | |
NFData1 f => NFData (Fix f) | |
(Typeable f, Data (f (Fix f))) => Data (Fix f) | |
Defined in Data.Fix Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fix f -> c (Fix f) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Fix f) # dataTypeOf :: Fix f -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Fix f)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Fix f)) # gmapT :: (forall b. Data b => b -> b) -> Fix f -> Fix f # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fix f -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fix f -> r # gmapQ :: (forall d. Data d => d -> u) -> Fix f -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fix f -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fix f -> m (Fix f) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fix f -> m (Fix f) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fix f -> m (Fix f) # | |
Generic (Fix f) | |
Read1 f => Read (Fix f) | |
Show1 f => Show (Fix f) | |
Eq1 f => Eq (Fix f) | |
Ord1 f => Ord (Fix f) | |
Hashable1 f => Hashable (Fix f) | |
Pretty (Fix SexpF) Source # | |
Functor f => Corecursive (Fix f) | |
Defined in Data.Functor.Foldable Methods embed :: Base (Fix f) (Fix f) -> Fix f # ana :: (a -> Base (Fix f) a) -> a -> Fix f # apo :: (a -> Base (Fix f) (Either (Fix f) a)) -> a -> Fix f # postpro :: Recursive (Fix f) => (forall b. Base (Fix f) b -> Base (Fix f) b) -> (a -> Base (Fix f) a) -> a -> Fix f # gpostpro :: (Recursive (Fix f), Monad m) => (forall b. m (Base (Fix f) b) -> Base (Fix f) (m b)) -> (forall c. Base (Fix f) c -> Base (Fix f) c) -> (a -> Base (Fix f) (m a)) -> a -> Fix f # | |
Functor f => Recursive (Fix f) | |
Defined in Data.Functor.Foldable Methods project :: Fix f -> Base (Fix f) (Fix f) # cata :: (Base (Fix f) a -> a) -> Fix f -> a # para :: (Base (Fix f) (Fix f, a) -> a) -> Fix f -> a # gpara :: (Corecursive (Fix f), Comonad w) => (forall b. Base (Fix f) (w b) -> w (Base (Fix f) b)) -> (Base (Fix f) (EnvT (Fix f) w a) -> a) -> Fix f -> a # prepro :: Corecursive (Fix f) => (forall b. Base (Fix f) b -> Base (Fix f) b) -> (Base (Fix f) a -> a) -> Fix f -> a # gprepro :: (Corecursive (Fix f), Comonad w) => (forall b. Base (Fix f) (w b) -> w (Base (Fix f) b)) -> (forall c. Base (Fix f) c -> Base (Fix f) c) -> (Base (Fix f) (w a) -> a) -> Fix f -> a # | |
type Rep (Fix f) | |
type Base (Fix f) | |
Defined in Data.Functor.Foldable |