sexp-grammar-2.3.0: Invertible grammar combinators for S-expressions
Safe HaskellTrustworthy
LanguageHaskell2010

Language.Sexp.Located

Synopsis

Parse and print

decode :: ByteString -> Either String Sexp Source #

Deserialise a Sexp from a string

parseSexp :: FilePath -> ByteString -> Either String Sexp Source #

Parse a Sexp from a string.

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.

encode :: Sexp -> ByteString Source #

Serialise a Sexp into a compact string

format :: Sexp -> ByteString Source #

Serialise a Sexp into a pretty-printed string

Type

type Sexp = Fix (Compose (LocatedBy Position) SexpF) Source #

S-expression type annotated with positions. Useful for further parsing.

pattern Atom :: Atom -> Sexp Source #

pattern Number :: Scientific -> Sexp Source #

pattern Symbol :: Text -> Sexp Source #

pattern String :: Text -> Sexp Source #

pattern ParenList :: [Sexp] -> Sexp Source #

pattern BracketList :: [Sexp] -> Sexp Source #

pattern BraceList :: [Sexp] -> Sexp Source #

pattern Modified :: Prefix -> Sexp -> Sexp Source #

Internal types

data SexpF e Source #

S-expression functor

Constructors

AtomF !Atom 
ParenListF [e] 
BracketListF [e] 
BraceListF [e] 
ModifiedF !Prefix e 

Instances

Instances details
Functor SexpF Source # 
Instance details

Defined in Language.Sexp.Types

Methods

fmap :: (a -> b) -> SexpF a -> SexpF b #

(<$) :: a -> SexpF b -> SexpF a #

Show Sexp Source # 
Instance details

Defined in Language.Sexp.Located

Methods

showsPrec :: Int -> Sexp -> ShowS #

show :: Sexp -> String #

showList :: [Sexp] -> ShowS #

Show Sexp Source # 
Instance details

Defined in Language.Sexp

Methods

showsPrec :: Int -> Sexp -> ShowS #

show :: Sexp -> String #

showList :: [Sexp] -> ShowS #

Foldable SexpF Source # 
Instance details

Defined in Language.Sexp.Types

Methods

fold :: Monoid m => SexpF m -> m #

foldMap :: Monoid m => (a -> m) -> SexpF a -> m #

foldMap' :: Monoid m => (a -> m) -> SexpF a -> m #

foldr :: (a -> b -> b) -> b -> SexpF a -> b #

foldr' :: (a -> b -> b) -> b -> SexpF a -> b #

foldl :: (b -> a -> b) -> b -> SexpF a -> b #

foldl' :: (b -> a -> b) -> b -> SexpF a -> b #

foldr1 :: (a -> a -> a) -> SexpF a -> a #

foldl1 :: (a -> a -> a) -> SexpF a -> a #

toList :: SexpF a -> [a] #

null :: SexpF a -> Bool #

length :: SexpF a -> Int #

elem :: Eq a => a -> SexpF a -> Bool #

maximum :: Ord a => SexpF a -> a #

minimum :: Ord a => SexpF a -> a #

sum :: Num a => SexpF a -> a #

product :: Num a => SexpF a -> a #

Traversable SexpF Source # 
Instance details

Defined in Language.Sexp.Types

Methods

traverse :: Applicative f => (a -> f b) -> SexpF a -> f (SexpF b) #

sequenceA :: Applicative f => SexpF (f a) -> f (SexpF a) #

mapM :: Monad m => (a -> m b) -> SexpF a -> m (SexpF b) #

sequence :: Monad m => SexpF (m a) -> m (SexpF a) #

Eq1 SexpF Source # 
Instance details

Defined in Language.Sexp.Types

Methods

liftEq :: (a -> b -> Bool) -> SexpF a -> SexpF b -> Bool #

NFData1 SexpF Source # 
Instance details

Defined in Language.Sexp.Types

Methods

liftRnf :: (a -> ()) -> SexpF a -> () #

Generic (SexpF e) Source # 
Instance details

Defined in Language.Sexp.Types

Associated Types

type Rep (SexpF e) :: Type -> Type #

Methods

from :: SexpF e -> Rep (SexpF e) x #

to :: Rep (SexpF e) x -> SexpF e #

Pretty (Fix SexpF) Source # 
Instance details

Defined in Language.Sexp.Pretty

Methods

pretty :: Fix SexpF -> Doc ann #

prettyList :: [Fix SexpF] -> Doc ann #

NFData1 (Compose (LocatedBy Position) SexpF) Source # 
Instance details

Defined in Language.Sexp.Types

Methods

liftRnf :: (a -> ()) -> Compose (LocatedBy Position) SexpF a -> () #

type Rep (SexpF e) Source # 
Instance details

Defined in Language.Sexp.Types

data Atom Source #

S-expression atom type

Instances

Instances details
Eq Atom Source # 
Instance details

Defined in Language.Sexp.Types

Methods

(==) :: Atom -> Atom -> Bool #

(/=) :: Atom -> Atom -> Bool #

Ord Atom Source # 
Instance details

Defined in Language.Sexp.Types

Methods

compare :: Atom -> Atom -> Ordering #

(<) :: Atom -> Atom -> Bool #

(<=) :: Atom -> Atom -> Bool #

(>) :: Atom -> Atom -> Bool #

(>=) :: Atom -> Atom -> Bool #

max :: Atom -> Atom -> Atom #

min :: Atom -> Atom -> Atom #

Show Atom Source # 
Instance details

Defined in Language.Sexp.Types

Methods

showsPrec :: Int -> Atom -> ShowS #

show :: Atom -> String #

showList :: [Atom] -> ShowS #

Generic Atom Source # 
Instance details

Defined in Language.Sexp.Types

Associated Types

type Rep Atom :: Type -> Type #

Methods

from :: Atom -> Rep Atom x #

to :: Rep Atom x -> Atom #

NFData Atom Source # 
Instance details

Defined in Language.Sexp.Types

Methods

rnf :: Atom -> () #

Pretty Atom Source # 
Instance details

Defined in Language.Sexp.Pretty

Methods

pretty :: Atom -> Doc ann #

prettyList :: [Atom] -> Doc ann #

type Rep Atom Source # 
Instance details

Defined in Language.Sexp.Types

type Rep Atom = D1 ('MetaData "Atom" "Language.Sexp.Types" "sexp-grammar-2.3.0-JCnumEn9wOUGbR0nPzOSB9" '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))))

data Prefix Source #

S-expression quotation type

Constructors

Quote 
Backtick 
Comma 
CommaAt 
Hash 

Instances

Instances details
Eq Prefix Source # 
Instance details

Defined in Language.Sexp.Types

Methods

(==) :: Prefix -> Prefix -> Bool #

(/=) :: Prefix -> Prefix -> Bool #

Ord Prefix Source # 
Instance details

Defined in Language.Sexp.Types

Show Prefix Source # 
Instance details

Defined in Language.Sexp.Types

Generic Prefix Source # 
Instance details

Defined in Language.Sexp.Types

Associated Types

type Rep Prefix :: Type -> Type #

Methods

from :: Prefix -> Rep Prefix x #

to :: Rep Prefix x -> Prefix #

NFData Prefix Source # 
Instance details

Defined in Language.Sexp.Types

Methods

rnf :: Prefix -> () #

type Rep Prefix Source # 
Instance details

Defined in Language.Sexp.Types

type Rep Prefix = D1 ('MetaData "Prefix" "Language.Sexp.Types" "sexp-grammar-2.3.0-JCnumEn9wOUGbR0nPzOSB9" '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))))

data LocatedBy a e Source #

Annotation functor for positions

Constructors

!a :< e 

Instances

Instances details
Show Sexp Source # 
Instance details

Defined in Language.Sexp.Located

Methods

showsPrec :: Int -> Sexp -> ShowS #

show :: Sexp -> String #

showList :: [Sexp] -> ShowS #

Bifunctor LocatedBy Source # 
Instance details

Defined in Language.Sexp.Types

Methods

bimap :: (a -> b) -> (c -> d) -> LocatedBy a c -> LocatedBy b d #

first :: (a -> b) -> LocatedBy a c -> LocatedBy b c #

second :: (b -> c) -> LocatedBy a b -> LocatedBy a c #

Functor (LocatedBy a) Source # 
Instance details

Defined in Language.Sexp.Types

Methods

fmap :: (a0 -> b) -> LocatedBy a a0 -> LocatedBy a b #

(<$) :: a0 -> LocatedBy a b -> LocatedBy a a0 #

Foldable (LocatedBy a) Source # 
Instance details

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 #

sum :: Num a0 => LocatedBy a a0 -> a0 #

product :: Num a0 => LocatedBy a a0 -> a0 #

Traversable (LocatedBy a) Source # 
Instance details

Defined in Language.Sexp.Types

Methods

traverse :: Applicative f => (a0 -> f b) -> LocatedBy a a0 -> f (LocatedBy a b) #

sequenceA :: Applicative f => LocatedBy a (f a0) -> f (LocatedBy a a0) #

mapM :: Monad m => (a0 -> m b) -> LocatedBy a a0 -> m (LocatedBy a b) #

sequence :: Monad m => LocatedBy a (m a0) -> m (LocatedBy a a0) #

Eq p => Eq1 (LocatedBy p) Source # 
Instance details

Defined in Language.Sexp.Types

Methods

liftEq :: (a -> b -> Bool) -> LocatedBy p a -> LocatedBy p b -> Bool #

(Eq a, Eq e) => Eq (LocatedBy a e) Source # 
Instance details

Defined in Language.Sexp.Types

Methods

(==) :: LocatedBy a e -> LocatedBy a e -> Bool #

(/=) :: LocatedBy a e -> LocatedBy a e -> Bool #

(Ord a, Ord e) => Ord (LocatedBy a e) Source # 
Instance details

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 #

max :: LocatedBy a e -> LocatedBy a e -> LocatedBy a e #

min :: LocatedBy a e -> LocatedBy a e -> LocatedBy a e #

(Show a, Show e) => Show (LocatedBy a e) Source # 
Instance details

Defined in Language.Sexp.Types

Methods

showsPrec :: Int -> LocatedBy a e -> ShowS #

show :: LocatedBy a e -> String #

showList :: [LocatedBy a e] -> ShowS #

Generic (LocatedBy a e) Source # 
Instance details

Defined in Language.Sexp.Types

Associated Types

type Rep (LocatedBy a e) :: Type -> Type #

Methods

from :: LocatedBy a e -> Rep (LocatedBy a e) x #

to :: Rep (LocatedBy a e) x -> LocatedBy a e #

NFData1 (Compose (LocatedBy Position) SexpF) Source # 
Instance details

Defined in Language.Sexp.Types

Methods

liftRnf :: (a -> ()) -> Compose (LocatedBy Position) SexpF a -> () #

type Rep (LocatedBy a e) Source # 
Instance details

Defined in Language.Sexp.Types

type Rep (LocatedBy a e) = D1 ('MetaData "LocatedBy" "Language.Sexp.Types" "sexp-grammar-2.3.0-JCnumEn9wOUGbR0nPzOSB9" '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)))

data Position Source #

Position: file name, line number, column number

Constructors

Position FilePath !Int !Int 

Instances

Instances details
Eq Position Source # 
Instance details

Defined in Language.Sexp.Types

Ord Position Source # 
Instance details

Defined in Language.Sexp.Types

Show Position Source # 
Instance details

Defined in Language.Sexp.Types

Show Sexp Source # 
Instance details

Defined in Language.Sexp.Located

Methods

showsPrec :: Int -> Sexp -> ShowS #

show :: Sexp -> String #

showList :: [Sexp] -> ShowS #

Generic Position Source # 
Instance details

Defined in Language.Sexp.Types

Associated Types

type Rep Position :: Type -> Type #

Methods

from :: Position -> Rep Position x #

to :: Rep Position x -> Position #

NFData Position Source # 
Instance details

Defined in Language.Sexp.Types

Methods

rnf :: Position -> () #

Pretty Position Source # 
Instance details

Defined in Language.Sexp.Types

Methods

pretty :: Position -> Doc ann #

prettyList :: [Position] -> Doc ann #

NFData1 (Compose (LocatedBy Position) SexpF) Source # 
Instance details

Defined in Language.Sexp.Types

Methods

liftRnf :: (a -> ()) -> Compose (LocatedBy Position) SexpF a -> () #

type Rep Position Source # 
Instance details

Defined in Language.Sexp.Types

type Rep Position = D1 ('MetaData "Position" "Language.Sexp.Types" "sexp-grammar-2.3.0-JCnumEn9wOUGbR0nPzOSB9" '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.

Constructors

Compose infixr 9 

Fields

Instances

Instances details
Show Sexp Source # 
Instance details

Defined in Language.Sexp.Located

Methods

showsPrec :: Int -> Sexp -> ShowS #

show :: Sexp -> String #

showList :: [Sexp] -> ShowS #

Functor f => Generic1 (Compose f g :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep1 (Compose f g) :: k -> Type #

Methods

from1 :: forall (a :: k0). Compose f g a -> Rep1 (Compose f g) a #

to1 :: forall (a :: k0). Rep1 (Compose f g) a -> Compose f g a #

TestEquality f => TestEquality (Compose f g :: k2 -> Type)

The deduction (via generativity) that if g x :~: g y then x :~: y.

Since: base-4.14.0.0

Instance details

Defined in Data.Functor.Compose

Methods

testEquality :: forall (a :: k) (b :: k). Compose f g a -> Compose f g b -> Maybe (a :~: b) #

(Functor f, Functor g) => Functor (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fmap :: (a -> b) -> Compose f g a -> Compose f g b #

(<$) :: a -> Compose f g b -> Compose f g a #

(Applicative f, Applicative g) => Applicative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a #

(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(*>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<*) :: Compose f g a -> Compose f g b -> Compose f g a #

(Foldable f, Foldable g) => Foldable (Compose f g)

Since: base-4.9.0.0

Instance details

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 #

sum :: Num a => Compose f g a -> a #

product :: Num a => Compose f g a -> a #

(Traversable f, Traversable g) => Traversable (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Compose f g a -> f0 (Compose f g b) #

sequenceA :: Applicative f0 => Compose f g (f0 a) -> f0 (Compose f g a) #

mapM :: Monad m => (a -> m b) -> Compose f g a -> m (Compose f g b) #

sequence :: Monad m => Compose f g (m a) -> m (Compose f g a) #

(Eq1 f, Eq1 g) => Eq1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftEq :: (a -> b -> Bool) -> Compose f g a -> Compose f g b -> Bool #

(Ord1 f, Ord1 g) => Ord1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftCompare :: (a -> b -> Ordering) -> Compose f g a -> Compose f g b -> Ordering #

(Read1 f, Read1 g) => Read1 (Compose f g)

Since: base-4.9.0.0

Instance details

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

Instance details

Defined in Data.Functor.Compose

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Compose f g a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Compose f g a] -> ShowS #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Compose f g a -> Compose f g [a] #

many :: Compose f g a -> Compose f g [a] #

(NFData1 f, NFData1 g) => NFData1 (Compose f g)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Compose f g a -> () #

NFData1 (Compose (LocatedBy Position) SexpF) Source # 
Instance details

Defined in Language.Sexp.Types

Methods

liftRnf :: (a -> ()) -> Compose (LocatedBy Position) SexpF a -> () #

(Hashable1 f, Hashable1 g) => Hashable1 (Compose f g) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Compose f g a -> Int #

(Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(==) :: Compose f g a -> Compose f g a -> Bool #

(/=) :: Compose f g a -> Compose f g a -> Bool #

(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

Instance details

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) #

(Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a)

Since: base-4.9.0.0

Instance details

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 #

max :: Compose f g a -> Compose f g a -> Compose f g a #

min :: Compose f g a -> Compose f g a -> Compose f g a #

(Read1 f, Read1 g, Read a) => Read (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

readsPrec :: Int -> ReadS (Compose f g a) #

readList :: ReadS [Compose f g a] #

readPrec :: ReadPrec (Compose f g a) #

readListPrec :: ReadPrec [Compose f g a] #

(Show1 f, Show1 g, Show a) => Show (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

showsPrec :: Int -> Compose f g a -> ShowS #

show :: Compose f g a -> String #

showList :: [Compose f g a] -> ShowS #

Generic (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type #

Methods

from :: Compose f g a -> Rep (Compose f g a) x #

to :: Rep (Compose f g a) x -> Compose f g a #

(NFData1 f, NFData1 g, NFData a) => NFData (Compose f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Compose f g a -> () #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a)

In general, hash (Compose x) ≠ hash x. However, hashWithSalt satisfies its variant of this equivalence.

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Compose f g a -> Int #

hash :: Compose f g a -> Int #

type Rep1 (Compose f g :: k -> Type) 
Instance details

Defined in Data.Functor.Compose

type Rep1 (Compose f g :: k -> Type) = D1 ('MetaData "Compose" "Data.Functor.Compose" "base" 'True) (C1 ('MetaCons "Compose" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCompose") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))
type Rep (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

type Rep (Compose f g a) = D1 ('MetaData "Compose" "Data.Functor.Compose" "base" 'True) (C1 ('MetaCons "Compose" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCompose") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f (g a)))))

newtype Fix (f :: Type -> Type) #

A fix-point type.

Constructors

Fix 

Fields

Instances

Instances details
Show Sexp Source # 
Instance details

Defined in Language.Sexp.Located

Methods

showsPrec :: Int -> Sexp -> ShowS #

show :: Sexp -> String #

showList :: [Sexp] -> ShowS #

Show Sexp Source # 
Instance details

Defined in Language.Sexp

Methods

showsPrec :: Int -> Sexp -> ShowS #

show :: Sexp -> String #

showList :: [Sexp] -> ShowS #

Eq1 f => Eq (Fix f) 
Instance details

Defined in Data.Fix

Methods

(==) :: Fix f -> Fix f -> Bool #

(/=) :: Fix f -> Fix f -> Bool #

(Typeable f, Data (f (Fix f))) => Data (Fix f) 
Instance details

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) #

toConstr :: Fix f -> Constr #

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) #

Ord1 f => Ord (Fix f) 
Instance details

Defined in Data.Fix

Methods

compare :: Fix f -> Fix f -> Ordering #

(<) :: Fix f -> Fix f -> Bool #

(<=) :: Fix f -> Fix f -> Bool #

(>) :: Fix f -> Fix f -> Bool #

(>=) :: Fix f -> Fix f -> Bool #

max :: Fix f -> Fix f -> Fix f #

min :: Fix f -> Fix f -> Fix f #

Read1 f => Read (Fix f) 
Instance details

Defined in Data.Fix

Show1 f => Show (Fix f) 
Instance details

Defined in Data.Fix

Methods

showsPrec :: Int -> Fix f -> ShowS #

show :: Fix f -> String #

showList :: [Fix f] -> ShowS #

Generic (Fix f) 
Instance details

Defined in Data.Fix

Associated Types

type Rep (Fix f) :: Type -> Type #

Methods

from :: Fix f -> Rep (Fix f) x #

to :: Rep (Fix f) x -> Fix f #

NFData1 f => NFData (Fix f) 
Instance details

Defined in Data.Fix

Methods

rnf :: Fix f -> () #

Hashable1 f => Hashable (Fix f) 
Instance details

Defined in Data.Fix

Methods

hashWithSalt :: Int -> Fix f -> Int #

hash :: Fix f -> Int #

Pretty (Fix SexpF) Source # 
Instance details

Defined in Language.Sexp.Pretty

Methods

pretty :: Fix SexpF -> Doc ann #

prettyList :: [Fix SexpF] -> Doc ann #

Functor f => Recursive (Fix f) 
Instance details

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 #

Functor f => Corecursive (Fix f) 
Instance details

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 #

type Rep (Fix f) 
Instance details

Defined in Data.Fix

type Rep (Fix f) = D1 ('MetaData "Fix" "Data.Fix" "data-fix-0.3.0-GbYVnOXmRM7LUK5fwLof30" 'True) (C1 ('MetaCons "Fix" 'PrefixI 'True) (S1 ('MetaSel ('Just "unFix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f (Fix f)))))
type Base (Fix f) 
Instance details

Defined in Data.Functor.Foldable

type Base (Fix f) = f

Conversion

Orphan instances

Show Sexp Source # 
Instance details

Methods

showsPrec :: Int -> Sexp -> ShowS #

show :: Sexp -> String #

showList :: [Sexp] -> ShowS #