Hets - the Heterogeneous Tool Set
CopyrightC. Maeder DFKI Bremen 2008
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe

Common.Lib.SizedList

Description

a list plus its length for a more efficient history implementation. Parts of the implementation is stolen from Data.Edison.Seq.SizedSeq

Documentation

data SizedList a Source #

Instances

Instances details
Eq a => Eq (SizedList a) Source # 
Instance details

Defined in Common.Lib.SizedList

Methods

(==) :: SizedList a -> SizedList a -> Bool

(/=) :: SizedList a -> SizedList a -> Bool

Data a => Data (SizedList a) Source # 
Instance details

Defined in Common.Lib.SizedList

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SizedList a -> c (SizedList a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SizedList a)

toConstr :: SizedList a -> Constr

dataTypeOf :: SizedList a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SizedList a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SizedList a))

gmapT :: (forall b. Data b => b -> b) -> SizedList a -> SizedList a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SizedList a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SizedList a -> r

gmapQ :: (forall d. Data d => d -> u) -> SizedList a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> SizedList a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SizedList a -> m (SizedList a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SizedList a -> m (SizedList a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SizedList a -> m (SizedList a)

Ord a => Ord (SizedList a) Source # 
Instance details

Defined in Common.Lib.SizedList

Methods

compare :: SizedList a -> SizedList a -> Ordering

(<) :: SizedList a -> SizedList a -> Bool

(<=) :: SizedList a -> SizedList a -> Bool

(>) :: SizedList a -> SizedList a -> Bool

(>=) :: SizedList a -> SizedList a -> Bool

max :: SizedList a -> SizedList a -> SizedList a

min :: SizedList a -> SizedList a -> SizedList a

Show a => Show (SizedList a) Source # 
Instance details

Defined in Common.Lib.SizedList

Methods

showsPrec :: Int -> SizedList a -> ShowS

show :: SizedList a -> String

showList :: [SizedList a] -> ShowS

Generic (SizedList a) Source # 
Instance details

Defined in Common.Lib.SizedList

Associated Types

type Rep (SizedList a) :: Type -> Type

Methods

from :: SizedList a -> Rep (SizedList a) x

to :: Rep (SizedList a) x -> SizedList a

FromJSON a => FromJSON (SizedList a) 
Instance details

Defined in Common.Json.ConvInstances

Methods

parseJSON :: Value -> Parser (SizedList a)

parseJSONList :: Value -> Parser [SizedList a]

ToJSON a => ToJSON (SizedList a) 
Instance details

Defined in Common.Json.ConvInstances

Methods

toJSON :: SizedList a -> Value

toEncoding :: SizedList a -> Encoding

toJSONList :: [SizedList a] -> Value

toEncodingList :: [SizedList a] -> Encoding

ShATermConvertible a => ShATermConvertible (SizedList a) 
Instance details

Defined in Common.ATerm.ConvInstances

Methods

toShATermAux :: ATermTable -> SizedList a -> IO (ATermTable, Int)

toShATermList' :: ATermTable -> [SizedList a] -> IO (ATermTable, Int)

fromShATermAux :: Int -> ATermTable -> (ATermTable, SizedList a)

fromShATermList' :: Int -> ATermTable -> (ATermTable, [SizedList a])

ShATermLG a => ShATermLG (SizedList a) Source # 
Instance details

Defined in ATC.Grothendieck

Methods

toShATermLG :: ATermTable -> SizedList a -> IO (ATermTable, Int) Source #

fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, SizedList a) Source #

type Rep (SizedList a) Source # 
Instance details

Defined in Common.Lib.SizedList

type Rep (SizedList a) = D1 ('MetaData "SizedList" "Common.Lib.SizedList" "main" 'False) (C1 ('MetaCons "N" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))

toList :: SizedList a -> [a] Source #

null :: SizedList a -> Bool Source #

size :: SizedList a -> Int Source #

take :: Int -> SizedList a -> SizedList a Source #

drop :: Int -> SizedList a -> SizedList a Source #

map :: (a -> b) -> SizedList a -> SizedList b Source #