Agda-2.5.4: A dependently typed functional programming language and proof assistant

Safe HaskellNone
LanguageHaskell2010

Agda.TypeChecking.Serialise.Base

Synopsis

Documentation

type Node = [Int32] #

Constructor tag (maybe omitted) and argument indices.

type HashTable k v = BasicHashTable k v #

The type of hashtables used in this module.

A very limited amount of testing indicates that CuckooHashTable is somewhat slower than BasicHashTable, and that LinearHashTable and the hashtables from Data.Hashtable are much slower.

data FreshAndReuse #

Structure providing fresh identifiers for hash map and counting hash map hits (i.e. when no fresh identifier required).

Constructors

FreshAndReuse 

Fields

type QNameId = [NameId] #

Two QNames are equal if their QNameId is equal.

qnameId :: QName -> QNameId #

Computing a qualified names composed ID.

data Dict #

State of the the encoder.

Constructors

Dict 

Fields

emptyDict #

Arguments

:: Bool

Collect statistics for icode calls?

-> IO Dict 

Creates an empty dictionary.

data U #

Universal type, wraps everything.

Constructors

Typeable a => U !a 

type Memo = HashTable (Int32, TypeRep) U #

Univeral memo structure, to introduce sharing during decoding

data St #

State of the decoder.

Constructors

St 

Fields

type S a = ReaderT Dict IO a #

Monad used by the encoder.

type R a = ExceptT TypeError (StateT St IO) a #

Monad used by the decoder.

TCM is not used because the associated overheads would make decoding slower.

malformed :: R a #

Throws an error which is suitable when the data stream is malformed.

class Typeable a => EmbPrj a where #

Minimal complete definition

icod_, value

Methods

icode #

Arguments

:: a 
-> S Int32

Serialization (wrapper).

icod_ #

Arguments

:: a 
-> S Int32

Serialization (worker).

value #

Arguments

:: Int32 
-> R a

Deserialization.

Instances
EmbPrj Bool # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Bool -> S Int32 #

icod_ :: Bool -> S Int32 #

value :: Int32 -> R Bool #

EmbPrj Char # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Char -> S Int32 #

icod_ :: Char -> S Int32 #

value :: Int32 -> R Char #

EmbPrj Double # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Double -> S Int32 #

icod_ :: Double -> S Int32 #

value :: Int32 -> R Double #

EmbPrj Int # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Int -> S Int32 #

icod_ :: Int -> S Int32 #

value :: Int32 -> R Int #

EmbPrj Int32 # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Int32 -> S Int32 #

icod_ :: Int32 -> S Int32 #

value :: Int32 -> R Int32 #

EmbPrj Integer # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Word64 # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Word64 -> S Int32 #

icod_ :: Word64 -> S Int32 #

value :: Int32 -> R Word64 #

EmbPrj () # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: () -> S Int32 #

icod_ :: () -> S Int32 #

value :: Int32 -> R () #

EmbPrj Void # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Void -> S Int32 #

icod_ :: Void -> S Int32 #

value :: Int32 -> R Void #

EmbPrj String # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: String -> S Int32 #

icod_ :: String -> S Int32 #

value :: Int32 -> R String #

EmbPrj ByteString # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj IntSet # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: IntSet -> S Int32 #

icod_ :: IntSet -> S Int32 #

value :: Int32 -> R IntSet #

EmbPrj Doc # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Errors

Methods

icode :: Doc -> S Int32 #

icod_ :: Doc -> S Int32 #

value :: Int32 -> R Doc #

EmbPrj Impossible # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Empty # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Empty -> S Int32 #

icod_ :: Empty -> S Int32 #

value :: Int32 -> R Empty #

EmbPrj AbsolutePath # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Range #

Ranges are always deserialised as noRange.

Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Range -> S Int32 #

icod_ :: Range -> S Int32 #

value :: Int32 -> R Range #

EmbPrj Permutation # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Fixity' # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj MetaId # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: MetaId -> S Int32 #

icod_ :: MetaId -> S Int32 #

value :: Int32 -> R MetaId #

EmbPrj NameId # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: NameId -> S Int32 #

icod_ :: NameId -> S Int32 #

value :: Int32 -> R NameId #

EmbPrj IsAbstract # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Access # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

Methods

icode :: Access -> S Int32 #

icod_ :: Access -> S Int32 #

value :: Int32 -> R Access #

EmbPrj DataOrRecord # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj ProjOrigin # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj ConOrigin # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj ArgInfo # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj FreeVariables # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Origin # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Origin -> S Int32 #

icod_ :: Origin -> S Int32 #

value :: Int32 -> R Origin #

EmbPrj Relevance # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Quantity # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Modality # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Hiding # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Hiding -> S Int32 #

icod_ :: Hiding -> S Int32 #

value :: Int32 -> R Hiding #

EmbPrj Induction # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj HasEta # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: HasEta -> S Int32 #

icod_ :: HasEta -> S Int32 #

value :: Int32 -> R HasEta #

EmbPrj Delayed # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj TopLevelModuleName # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj QName # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: QName -> S Int32 #

icod_ :: QName -> S Int32 #

value :: Int32 -> R QName #

EmbPrj NamePart # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Name # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Name -> S Int32 #

icod_ :: Name -> S Int32 #

value :: Int32 -> R Name #

EmbPrj GenPart # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj AmbiguousQName # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj ModuleName # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj QName # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: QName -> S Int32 #

icod_ :: QName -> S Int32 #

value :: Int32 -> R QName #

EmbPrj Name # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Name -> S Int32 #

icod_ :: Name -> S Int32 #

value :: Int32 -> R Name #

EmbPrj Literal # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Precedence # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj ParenPreference # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj Fixity # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Fixity -> S Int32 #

icod_ :: Fixity -> S Int32 #

value :: Int32 -> R Fixity #

EmbPrj Associativity # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj PrecedenceLevel # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj Range # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Highlighting

Methods

icode :: Range -> S Int32 #

icod_ :: Range -> S Int32 #

value :: Int32 -> R Range #

EmbPrj Occurrence # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj CompressedFile # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Highlighting

EmbPrj TokenBased # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Highlighting

EmbPrj DefinitionSite # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Highlighting

EmbPrj Aspects # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Highlighting

EmbPrj OtherAspect # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Highlighting

EmbPrj NameKind # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Highlighting

EmbPrj Aspect # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Highlighting

Methods

icode :: Aspect -> S Int32 #

icod_ :: Aspect -> S Int32 #

value :: Int32 -> R Aspect #

EmbPrj AbstractModule # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj AbstractName # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj WhyInScope # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj KindOfName # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj NameSpace # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj LocalVar # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj Binder # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

Methods

icode :: Binder -> S Int32 #

icod_ :: Binder -> S Int32 #

value :: Int32 -> R Binder #

EmbPrj ScopeInfo # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj NameSpaceId # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj Scope # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

Methods

icode :: Scope -> S Int32 #

icod_ :: Scope -> S Int32 #

value :: Int32 -> R Scope #

EmbPrj ConPatInfo # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj ConPatternInfo # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj DBPatVar # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj PatOrigin # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Clause # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Clause -> S Int32 #

icod_ :: Clause -> S Int32 #

value :: Int32 -> R Clause #

EmbPrj LevelAtom # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj PlusLevel # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Level # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Level -> S Int32 #

icod_ :: Level -> S Int32 #

value :: Int32 -> R Level #

EmbPrj Sort # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Sort -> S Int32 #

icod_ :: Sort -> S Int32 #

value :: Int32 -> R Sort #

EmbPrj Term # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Term -> S Int32 #

icod_ :: Term -> S Int32 #

value :: Int32 -> R Term #

EmbPrj ConHead # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj CompiledClauses # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj BindName # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

EmbPrj DeclarationWarning # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Errors

EmbPrj TCWarning # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Errors

EmbPrj Warning # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Errors

EmbPrj MutualId # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj TermHead # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Defn # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Defn -> S Int32 #

icod_ :: Defn -> S Int32 #

value :: Int32 -> R Defn #

EmbPrj FunctionFlag # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj EtaEquality # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj ProjLams # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Projection # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj ExtLamInfo # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj CompilerPragma # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Compilers

EmbPrj IsForced # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Polarity # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Definition # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj RewriteRule # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj NLPType # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj NLPat # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: NLPat -> S Int32 #

icod_ :: NLPat -> S Int32 #

value :: Int32 -> R NLPat #

EmbPrj DisplayTerm # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj DisplayForm # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Section # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Signature # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj Interface # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances

EmbPrj ForeignCode # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Compilers

EmbPrj CheckpointId # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj SerialisedRange # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj a => EmbPrj [a] # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: [a] -> S Int32 #

icod_ :: [a] -> S Int32 #

value :: Int32 -> R [a] #

EmbPrj a => EmbPrj (Maybe a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Maybe a -> S Int32 #

icod_ :: Maybe a -> S Int32 #

value :: Int32 -> R (Maybe a) #

EmbPrj a => EmbPrj (Seq a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Seq a -> S Int32 #

icod_ :: Seq a -> S Int32 #

value :: Int32 -> R (Seq a) #

(Ord a, EmbPrj a) => EmbPrj (Set a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Set a -> S Int32 #

icod_ :: Set a -> S Int32 #

value :: Int32 -> R (Set a) #

EmbPrj a => EmbPrj (Maybe a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Maybe a -> S Int32 #

icod_ :: Maybe a -> S Int32 #

value :: Int32 -> R (Maybe a) #

EmbPrj a => EmbPrj (NonemptyList a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj a => EmbPrj (Interval' a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Interval' a -> S Int32 #

icod_ :: Interval' a -> S Int32 #

value :: Int32 -> R (Interval' a) #

EmbPrj a => EmbPrj (Position' a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Position' a -> S Int32 #

icod_ :: Position' a -> S Int32 #

value :: Int32 -> R (Position' a) #

EmbPrj a => EmbPrj (Drop a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Drop a -> S Int32 #

icod_ :: Drop a -> S Int32 #

value :: Int32 -> R (Drop a) #

EmbPrj a => EmbPrj (Ranged a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Ranged a -> S Int32 #

icod_ :: Ranged a -> S Int32 #

value :: Int32 -> R (Ranged a) #

EmbPrj a => EmbPrj (Dom a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Dom a -> S Int32 #

icod_ :: Dom a -> S Int32 #

value :: Int32 -> R (Dom a) #

EmbPrj a => EmbPrj (Arg a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Arg a -> S Int32 #

icod_ :: Arg a -> S Int32 #

value :: Int32 -> R (Arg a) #

EmbPrj a => EmbPrj (WithHiding a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: WithHiding a -> S Int32 #

icod_ :: WithHiding a -> S Int32 #

value :: Int32 -> R (WithHiding a) #

EmbPrj a => EmbPrj (FieldAssignment' a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

EmbPrj a => EmbPrj (Substitution' a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj a => EmbPrj (Pattern' a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Pattern' a -> S Int32 #

icod_ :: Pattern' a -> S Int32 #

value :: Int32 -> R (Pattern' a) #

EmbPrj a => EmbPrj (Tele a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Tele a -> S Int32 #

icod_ :: Tele a -> S Int32 #

value :: Int32 -> R (Tele a) #

EmbPrj a => EmbPrj (Type' a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Type' a -> S Int32 #

icod_ :: Type' a -> S Int32 #

value :: Int32 -> R (Type' a) #

EmbPrj a => EmbPrj (Abs a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Abs a -> S Int32 #

icod_ :: Abs a -> S Int32 #

value :: Int32 -> R (Abs a) #

EmbPrj a => EmbPrj (Elim' a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Elim' a -> S Int32 #

icod_ :: Elim' a -> S Int32 #

value :: Int32 -> R (Elim' a) #

EmbPrj a => EmbPrj (Case a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Case a -> S Int32 #

icod_ :: Case a -> S Int32 #

value :: Int32 -> R (Case a) #

EmbPrj a => EmbPrj (WithArity a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: WithArity a -> S Int32 #

icod_ :: WithArity a -> S Int32 #

value :: Int32 -> R (WithArity a) #

EmbPrj a => EmbPrj (Pattern' a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Abstract

Methods

icode :: Pattern' a -> S Int32 #

icod_ :: Pattern' a -> S Int32 #

value :: Int32 -> R (Pattern' a) #

EmbPrj a => EmbPrj (Builtin a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Builtin a -> S Int32 #

icod_ :: Builtin a -> S Int32 #

value :: Int32 -> R (Builtin a) #

EmbPrj a => EmbPrj (FunctionInverse' a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

EmbPrj a => EmbPrj (Open a) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Open a -> S Int32 #

icod_ :: Open a -> S Int32 #

value :: Int32 -> R (Open a) #

(EmbPrj a, EmbPrj b) => EmbPrj (Either a b) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Either a b -> S Int32 #

icod_ :: Either a b -> S Int32 #

value :: Int32 -> R (Either a b) #

(EmbPrj a, EmbPrj b) => EmbPrj (a, b) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: (a, b) -> S Int32 #

icod_ :: (a, b) -> S Int32 #

value :: Int32 -> R (a, b) #

(Ord a, EmbPrj a, EmbPrj b) => EmbPrj (Map a b) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Map a b -> S Int32 #

icod_ :: Map a b -> S Int32 #

value :: Int32 -> R (Map a b) #

(Eq k, Hashable k, EmbPrj k, EmbPrj v) => EmbPrj (HashMap k v) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: HashMap k v -> S Int32 #

icod_ :: HashMap k v -> S Int32 #

value :: Int32 -> R (HashMap k v) #

(Ord a, Ord b, EmbPrj a, EmbPrj b) => EmbPrj (BiMap a b) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: BiMap a b -> S Int32 #

icod_ :: BiMap a b -> S Int32 #

value :: Int32 -> R (BiMap a b) #

(Ord a, EmbPrj a, EmbPrj b) => EmbPrj (Trie a b) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Trie a b -> S Int32 #

icod_ :: Trie a b -> S Int32 #

value :: Int32 -> R (Trie a b) #

(EmbPrj s, EmbPrj t) => EmbPrj (Named s t) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: Named s t -> S Int32 #

icod_ :: Named s t -> S Int32 #

value :: Int32 -> R (Named s t) #

(EmbPrj a, EmbPrj b, EmbPrj c) => EmbPrj (a, b, c) # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

Methods

icode :: (a, b, c) -> S Int32 #

icod_ :: (a, b, c) -> S Int32 #

value :: Int32 -> R (a, b, c) #

tickICode :: forall a. Typeable a => a -> S () #

Increase entry for a in stats.

runGetState :: Get a -> ByteString -> ByteOffset -> (a, ByteString, ByteOffset) #

Data.Binary.runGetState is deprecated in favour of runGetIncremental. Reimplementing it in terms of the new function. The new Decoder type contains strict byte strings so we need to be careful not to feed the entire lazy byte string to the decoder at once.

icodeX :: (Eq k, Hashable k) => (Dict -> HashTable k Int32) -> (Dict -> IORef FreshAndReuse) -> k -> S Int32 #

icodeMemo #

Arguments

:: (Ord a, Hashable a) 
=> (Dict -> HashTable a Int32)

Memo structure for thing of key a.

-> (Dict -> IORef FreshAndReuse)

Statistics.

-> a

Key to the thing.

-> S Int32

Fallback computation to encode the thing.

-> S Int32

Encoded thing.

icode only if thing has not seen before.

vcase :: forall a. EmbPrj a => (Node -> R a) -> Int32 -> R a #

vcase value ix decodes thing represented by ix :: Int32 via the valu function and stores it in nodeMemo. If ix is present in nodeMemo, valu is not used, but the thing is read from nodeMemo instead.

class ICODE t b where #

icodeArgs proxy (a1, ..., an) maps icode over a1, ..., an and returns the corresponding list of Int32.

Minimal complete definition

icodeArgs

Methods

icodeArgs :: IsBase t ~ b => All EmbPrj (Domains t) => Proxy t -> Products (Domains t) -> S [Int32] #

Instances
IsBase t ~ True => ICODE t True # 
Instance details

Defined in Agda.TypeChecking.Serialise.Base

Methods

icodeArgs :: Proxy t -> Products (Domains t) -> S [Int32] #

ICODE t (IsBase t) => ICODE (a -> t) False # 
Instance details

Defined in Agda.TypeChecking.Serialise.Base

Methods

icodeArgs :: Proxy (a -> t) -> Products (Domains (a -> t)) -> S [Int32] #

icodeN :: forall t. ICODE t (IsBase t) => Currying (Domains t) (S Int32) => All EmbPrj (Domains t) => Int32 -> t -> Arrows (Domains t) (S Int32) #

icodeN tag t a1 ... an serialises the arguments a1, ..., an of the constructor t together with a tag tag picked to disambiguate between different constructors. It corresponds to icodeNode . (tag :) =<< mapM icode [a1, ..., an]

icodeN' :: forall t. ICODE t (IsBase t) => Currying (Domains t) (S Int32) => All EmbPrj (Domains t) => t -> Arrows (Domains t) (S Int32) #

icodeN' is the same as icodeN except that there is no tag

class VALU t b where #

Minimal complete definition

valuN', valueArgs

Methods

valuN' :: b ~ IsBase t => All EmbPrj (Domains t) => t -> Products (Constant Int32 (Domains t)) -> R (CoDomain t) #

valueArgs :: b ~ IsBase t => All EmbPrj (CoDomain t ': Domains t) => Proxy t -> Node -> Maybe (Products (Constant Int32 (Domains t))) #

Instances
VALU t True # 
Instance details

Defined in Agda.TypeChecking.Serialise.Base

VALU t (IsBase t) => VALU (a -> t) False # 
Instance details

Defined in Agda.TypeChecking.Serialise.Base

Methods

valuN' :: (a -> t) -> Products (Constant Int32 (Domains (a -> t))) -> R (CoDomain (a -> t)) #

valueArgs :: Proxy (a -> t) -> Node -> Maybe (Products (Constant Int32 (Domains (a -> t)))) #

valuN :: forall t. VALU t (IsBase t) => Currying (Constant Int32 (Domains t)) (R (CoDomain t)) => All EmbPrj (Domains t) => t -> Arrows (Constant Int32 (Domains t)) (R (CoDomain t)) #

valueN :: forall t. VALU t (IsBase t) => All EmbPrj (CoDomain t ': Domains t) => t -> Int32 -> R (CoDomain t) #