flaw-editor-0.1.0.0

LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Flaw.Editor.Entity

Contents

Description

Entity is a special typeclass of objects which can be stored in Oil repo, edited in Oil editor, and transmitted via Oil protocol.

Entity can be serialized into series of key-value records, and deserialized from them. Each entity instance is identified by EntityId, and this entity id is a prefix for every database record of entity. In other words, all records related to a given entity are key-prefixed with entity id. Part of record's key after entity id is called key suffix of record.

Every entity instance has a main record: that's a record with key equal to entity id (in other words, with null key suffix). Existence of entity instance is determined by correctness of main record. If there's no main record or its value is incorrect, entity instance doesn't exist.

Value of valid main record always starts with fixed-length entity type id, which determines Haskell type of entity. After entity type id there could be other data, depending on type.

Values of all entity's records constitute entity's data. The only exception is main record: entity's data includes only part of the value after entity type id.

Entities can be accessed through means of an additional layer before low-level Oil protocols, namely EntityManager. EntityManager performs conversion between raw records and Entity values and provides caching via EntityVars.

EntityVar is a container for entity value. EntityManager ensures that all alive EntityVars contains up-to-date values (using weak references to vars). EntityVar also allows for changing a value of an entity's record, and automatically transmits that change into repo.

Due to various implementation constraints, not every operation can be done in STM monad. Specifically:

  • Creation of new EntityVar (which includes generating new EntityId) or getting an entity var for an existing entity runs in IO monad.
  • Reading entity value from EntityVar or writing record value runs in STM monad.
Synopsis

Ids

newtype EntityId Source #

Entity id.

Instances
Eq EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity

Ord EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity

Show EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity

Serialize EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity

Default EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity

Methods

def :: EntityId #

BasicEntity EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Entity EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange EntityId :: Type Source #

EditableEntity EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

type EntityChange EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

pattern ENTITY_ID_SIZE :: forall a. (Eq a, Num a) => a Source #

Entity id length in bytes.

pattern ENTITY_TYPE_ID_SIZE :: forall a. (Eq a, Num a) => a Source #

Entity type id length in bytes.

Entity pointers and vars

newtype SomeEntityPtr a Source #

Untyped entity pointer.

Constructors

SomeEntityPtr EntityId 
Instances
Serialize (SomeEntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity

newtype EntityPtr (a :: *) Source #

Entity "pointer" is a typed entity id. Doesn't keep a reference to cached entity. You can read or write entity by entity pointer in IO monad.

Constructors

EntityPtr EntityId 
Instances
Eq (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity

Methods

(==) :: EntityPtr a -> EntityPtr a -> Bool #

(/=) :: EntityPtr a -> EntityPtr a -> Bool #

Ord (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity

Show (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity

Serialize (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity

Methods

put :: Putter (EntityPtr a) #

get :: Get (EntityPtr a) #

Default (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity

Methods

def :: EntityPtr a #

Entity a => BasicEntity (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Entity a => Entity (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange (EntityPtr a) :: Type Source #

EntityRegistration EntityPtr Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

type EntityChange (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

newtype InterfacedEntityPtr (i :: * -> Constraint) Source #

Entity pointer pointing at some entity which supports specified interface.

Instances
Eq (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity

Ord (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity

Show (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity

Serialize (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity

Default (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity

EntityInterface i => BasicEntity (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

EntityInterface i => Entity (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange (InterfacedEntityPtr i) :: Type Source #

EntityRegistration InterfacedEntityPtr Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

type EntityChange (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

data SomeEntityVar Source #

Untyped entity var, stores cached entity. Entity manager keeps updating the var until it's GC'ed.

newtype EntityVar (a :: *) Source #

Typed entity var.

Constructors

EntityVar SomeEntityVar 

entityVarEntityId :: EntityVar a -> EntityId Source #

Get entity id from entity var.

Entity classes

class Typeable a => Entity (a :: *) where Source #

Class of repo entity. Entity should be able to deserialize from any data. It must not throw exceptions. It's free to ignore invalid data and/or provide some default values instead.

Minimal complete definition

getEntityTypeId

Associated Types

type EntityChange a :: * Source #

Type representing change to entity.

Methods

getEntityTypeId :: a -> EntityTypeId Source #

Return type id of entity. Parameter is not used and can be undefined.

processEntityChange Source #

Arguments

:: a

Current entity value.

-> ByteString

Key suffix of changed record.

-> ByteString

New value of changed record.

-> Maybe (a, EntityChange a) 

Process change in entity's data. Changes of one specific record (with fixed key) constitute a group. Changes to different records are commutative. Must not throw exceptions. Invalid values must be processed as well as valid, keeping all the laws above, possibly recording some error state into entity.

processEntityChange Source #

Arguments

:: (Generic a, GenericEntityDatatype (Rep a), EntityChange a ~ GenericEntityChange a) 
=> a

Current entity value.

-> ByteString

Key suffix of changed record.

-> ByteString

New value of changed record.

-> Maybe (a, EntityChange a) 

Process change in entity's data. Changes of one specific record (with fixed key) constitute a group. Changes to different records are commutative. Must not throw exceptions. Invalid values must be processed as well as valid, keeping all the laws above, possibly recording some error state into entity.

applyEntityChange Source #

Arguments

:: EntityVar a

Entity var.

-> EntityChange a

Entity change.

-> STM () 

Apply change to get new entity and write changes to entity var.

applyEntityChange Source #

Arguments

:: (Generic a, GenericEntityDatatype (Rep a), EntityChange a ~ GenericEntityChange a) 
=> EntityVar a

Entity var.

-> EntityChange a

Entity change.

-> STM () 

Apply change to get new entity and write changes to entity var.

interfaceEntity :: EntityInterface i => Proxy i -> a -> EntityInterfaced i a Source #

Return witness for entity that it supports specified entity interface.

entityToText :: a -> Text Source #

Return some short human-friendly textual representation of entity.

entityToText :: Show a => a -> Text Source #

Return some short human-friendly textual representation of entity.

Instances
Entity Bool Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange Bool :: Type Source #

Entity Float Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange Float :: Type Source #

Entity Int32 Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange Int32 :: Type Source #

Entity Int64 Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange Int64 :: Type Source #

Entity Integer Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange Integer :: Type Source #

Entity Word32 Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange Word32 :: Type Source #

Entity Word64 Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange Word64 :: Type Source #

Entity ByteString Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange ByteString :: Type Source #

Entity Text Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange Text :: Type Source #

Entity PackedTexture Source # 
Instance details

Defined in Flaw.Editor.Entity.Texture

Associated Types

type EntityChange PackedTexture :: Type Source #

Entity NullEntity Source # 
Instance details

Defined in Flaw.Editor.Entity

Associated Types

type EntityChange NullEntity :: Type Source #

Entity EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange EntityId :: Type Source #

Entity BlobHash Source # 
Instance details

Defined in Flaw.Editor.BlobService

Associated Types

type EntityChange BlobHash :: Type Source #

Entity DescriptionEntityTag Source # 
Instance details

Defined in Flaw.Editor.Entity.Tag.Basic

Entity NameEntityTag Source # 
Instance details

Defined in Flaw.Editor.Entity.Tag.Basic

Associated Types

type EntityChange NameEntityTag :: Type Source #

Entity BlobByUrl Source # 
Instance details

Defined in Flaw.Editor.Entity.Blob

Associated Types

type EntityChange BlobByUrl :: Type Source #

(Ord a, BasicEntity a) => Entity (Set a) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange (Set a) :: Type Source #

Entity (Vec4 Float) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange (Vec4 Float) :: Type Source #

Entity (Vec3 Float) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange (Vec3 Float) :: Type Source #

Entity (Vec2 Float) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange (Vec2 Float) :: Type Source #

EntityInterface i => Entity (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange (InterfacedEntityPtr i) :: Type Source #

Entity a => Entity (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange (EntityPtr a) :: Type Source #

(Ord k, BasicEntity k, BasicEntity v) => Entity (Map k v) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Associated Types

type EntityChange (Map k v) :: Type Source #

class (Entity a, EntityChange a ~ a) => BasicEntity a where Source #

Basic entity is an entity consisting of main record only.

Minimal complete definition

Nothing

Methods

serializeBasicEntity :: a -> ByteString Source #

Serialize basic entity into main record's value.

serializeBasicEntity :: Serialize a => a -> ByteString Source #

Serialize basic entity into main record's value.

deserializeBasicEntity :: ByteString -> a Source #

Deserialize basic entity from main record's value.

deserializeBasicEntity :: (Serialize a, Default a) => ByteString -> a Source #

Deserialize basic entity from main record's value.

Instances
BasicEntity Bool Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity Float Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity Int32 Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity Int64 Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity Integer Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity Word32 Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity Word64 Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity ByteString Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity Text Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity PackedTexture Source # 
Instance details

Defined in Flaw.Editor.Entity.Texture

BasicEntity EntityId Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity BlobHash Source # 
Instance details

Defined in Flaw.Editor.BlobService

BasicEntity DescriptionEntityTag Source # 
Instance details

Defined in Flaw.Editor.Entity.Tag.Basic

BasicEntity NameEntityTag Source # 
Instance details

Defined in Flaw.Editor.Entity.Tag.Basic

BasicEntity (Vec4 Float) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity (Vec3 Float) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

BasicEntity (Vec2 Float) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

EntityInterface i => BasicEntity (InterfacedEntityPtr i) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Entity a => BasicEntity (EntityPtr a) Source # 
Instance details

Defined in Flaw.Editor.Entity.Basic

Entity interfaces

class Typeable i => EntityInterface (i :: * -> Constraint) where Source #

Class of entity interface. Entity interface is itself a class.

Methods

getEntityInterfaceId :: p i -> EntityInterfaceId Source #

Get id of entity interface.

data EntityInterfaced i a where Source #

Witness for entity having an interface.

Entity containers

data SomeEntity where Source #

Container for any entity.

Constructors

SomeEntity :: Entity a => a -> SomeEntity 

data SomeBasicEntity where Source #

Container for basic entity.

Constructors

SomeBasicEntity :: BasicEntity a => a -> SomeBasicEntity 

data SomeBasicOrdEntity where Source #

Container for basic ordered entity.

Constructors

SomeBasicOrdEntity :: (BasicEntity a, Ord a) => a -> SomeBasicOrdEntity 

data SomeInterfacedEntity i where Source #

Some entity supporting specified interface.

Constructors

SomeInterfacedEntity :: (EntityInterface i, Entity a, i a) => a -> SomeInterfacedEntity i 

data SomeEntityInterface where Source #

Some entity interface.

Null things

nullEntityId :: EntityId Source #

Null entity id.

nullEntityTypeId :: EntityTypeId Source #

Null entity type id.

nullEntityInterfaceId :: EntityInterfaceId Source #

Null entity interface id.

Deserializers

getRootBaseEntity :: GetEntity SomeEntity Source #

Deserialize entity type and get base entity for this type.

getRootBaseBasicEntity :: GetEntity SomeBasicEntity Source #

Deserialize entity type and get basic base entity for this type.

getRootBaseBasicOrdEntity :: GetEntity SomeBasicOrdEntity Source #

Deserialize entity type and get basic ordered base entity for this type.

Entity manager

data EntityManager Source #

Entity manager based on client repo.

Constructors

EntityManager 

Fields

type GetEntity = ReaderT GetEntityState Get Source #

Monad for deserializing entities.

newEntityManager Source #

Arguments

:: Flow

Flow to run operations in.

-> ClientRepo

Underlying client repo.

-> IO ()

Push action.

-> IO EntityManager 

Initialize entity manager.

unsafePullEntityManager :: EntityManager -> [(Revision, ByteString, ByteString)] -> IO () Source #

Provide entity manager with changes pulled from remote repo. Must be called in entity manager's flow, in the same task as pulling changes into client repo.

Registration

Entity operations

getSomeEntityVar :: EntityManager -> EntityId -> IO SomeEntityVar Source #

Get untyped entity var for given entity id.

getEntityVar :: EntityManager -> EntityId -> IO (EntityVar a) Source #

Get typed entity var for given entity id.

newEntityVar :: Entity a => EntityManager -> IO (EntityVar a) Source #

Generate entity id and create new entity var. Generated entity is "empty", i.e. contains NullEntity.

readEntityVar :: Entity a => EntityVar a -> STM a Source #

Read entity var type safely. If entity var contains entity of wrong type, throws EntityWrongTypeException.

readSomeEntityVar :: SomeEntityVar -> STM SomeEntity Source #

Read untyped entity from var.

readSomeEntityWithRevisionVar :: SomeEntityVar -> STM (SomeEntity, Revision) Source #

Read untyped entity and revision from var.

writeEntityVarRecord :: Entity a => EntityVar a -> ByteString -> ByteString -> STM () Source #

Write record for entity var. Current entity in the var must be of the correct type.

writeBasicEntityVar :: BasicEntity a => EntityVar a -> a -> STM () Source #

Write basic entity into entity var. Entity is replaced completely. Var may contain entity of wrong type prior to operation.

Entity history

newtype EntityHistoryChan a Source #

Entity history chan is a stream of changes to entity.

Constructors

EntityHistoryChan (TVar (TVar EntityHistory)) 

entityVarHistory :: Typeable a => EntityVar a -> STM (EntityHistoryChan a) Source #

Get entity's history chan.

readEntityHistoryChan :: Typeable a => EntityHistoryChan a -> STM (a, EntityChange a) Source #

Get history event. Retries if no history event available. Throws EntityWrongTypeException on type change events, or if entity is of wrong type.

Miscellaneous

class GenericEntitySelector f where Source #

Associated Types

type GenericEntitySelectorChange f :: * Source #

TH helpers

hashTextToEntityId :: Text -> Q Exp Source #

Handy function to generate compile-time entity id out of text.

hashTextToEntityTypeId :: Text -> Q Exp Source #

Handy function to generate compile-time entity type id out of text.

hashTextToEntityInterfaceId :: Text -> Q Exp Source #

Handy function to generate compile-time entity interface id out of text.

interfaceEntityExp :: [Name] -> ExpQ Source #

Handy interfaceEntity implementation generator.

registerEntitiesAndInterfacesExp :: ExpQ Source #

Register all simple instances of Entity and EntityInterface, perform registration from any EntityRegistration instances in scope. Type is :: EntityManager -> IO () Beware of TH declaration groups!

Re-exports for convenience

type Revision = Int64 #

Type for revisions. Start revision is 1. 0 means no revisions.

data Proxy (t :: k) :: forall k. k -> Type #

Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).

Historically, Proxy :: Proxy a is a safer alternative to the 'undefined :: a' idiom.

>>> Proxy :: Proxy (Void, Int -> Int)
Proxy

Proxy can even hold types of higher kinds,

>>> Proxy :: Proxy Either
Proxy
>>> Proxy :: Proxy Functor
Proxy
>>> Proxy :: Proxy complicatedStructure
Proxy

Constructors

Proxy 
Instances
Generic1 (Proxy :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type #

Methods

from1 :: Proxy a -> Rep1 Proxy a #

to1 :: Rep1 Proxy a -> Proxy a #

Monad (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b #

(>>) :: Proxy a -> Proxy b -> Proxy b #

return :: a -> Proxy a #

fail :: String -> Proxy a #

Functor (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

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

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

Applicative (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

pure :: a -> Proxy a #

(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b #

liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

(*>) :: Proxy a -> Proxy b -> Proxy b #

(<*) :: Proxy a -> Proxy b -> Proxy a #

Foldable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

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

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

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

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

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

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

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

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

toList :: Proxy a -> [a] #

null :: Proxy a -> Bool #

length :: Proxy a -> Int #

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

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

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

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

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

Traversable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

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

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

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

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

FromJSON1 (Proxy :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Proxy a) #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Proxy a] #

Alternative (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

empty :: Proxy a #

(<|>) :: Proxy a -> Proxy a -> Proxy a #

some :: Proxy a -> Proxy [a] #

many :: Proxy a -> Proxy [a] #

MonadPlus (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

mzero :: Proxy a #

mplus :: Proxy a -> Proxy a -> Proxy a #

Eq1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

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

Ord1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Proxy a -> Proxy b -> Ordering #

Read1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Proxy a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Proxy a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Proxy a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Proxy a] #

Show1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Proxy a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Proxy a] -> ShowS #

Bounded (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

minBound :: Proxy t #

maxBound :: Proxy t #

Enum (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

succ :: Proxy s -> Proxy s #

pred :: Proxy s -> Proxy s #

toEnum :: Int -> Proxy s #

fromEnum :: Proxy s -> Int #

enumFrom :: Proxy s -> [Proxy s] #

enumFromThen :: Proxy s -> Proxy s -> [Proxy s] #

enumFromTo :: Proxy s -> Proxy s -> [Proxy s] #

enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] #

Eq (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(==) :: Proxy s -> Proxy s -> Bool #

(/=) :: Proxy s -> Proxy s -> Bool #

Ord (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

compare :: Proxy s -> Proxy s -> Ordering #

(<) :: Proxy s -> Proxy s -> Bool #

(<=) :: Proxy s -> Proxy s -> Bool #

(>) :: Proxy s -> Proxy s -> Bool #

(>=) :: Proxy s -> Proxy s -> Bool #

max :: Proxy s -> Proxy s -> Proxy s #

min :: Proxy s -> Proxy s -> Proxy s #

Read (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Show (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

showsPrec :: Int -> Proxy s -> ShowS #

show :: Proxy s -> String #

showList :: [Proxy s] -> ShowS #

Ix (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

range :: (Proxy s, Proxy s) -> [Proxy s] #

index :: (Proxy s, Proxy s) -> Proxy s -> Int #

unsafeIndex :: (Proxy s, Proxy s) -> Proxy s -> Int

inRange :: (Proxy s, Proxy s) -> Proxy s -> Bool #

rangeSize :: (Proxy s, Proxy s) -> Int #

unsafeRangeSize :: (Proxy s, Proxy s) -> Int

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type #

Methods

from :: Proxy t -> Rep (Proxy t) x #

to :: Rep (Proxy t) x -> Proxy t #

Semigroup (Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

(<>) :: Proxy s -> Proxy s -> Proxy s #

sconcat :: NonEmpty (Proxy s) -> Proxy s #

stimes :: Integral b => b -> Proxy s -> Proxy s #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s #

mappend :: Proxy s -> Proxy s -> Proxy s #

mconcat :: [Proxy s] -> Proxy s #

FromJSON (Proxy a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

type Rep1 (Proxy :: k -> Type)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep1 (Proxy :: k -> Type) = D1 (MetaData "Proxy" "Data.Proxy" "base" False) (C1 (MetaCons "Proxy" PrefixI False) (U1 :: k -> Type))
type Rep (Proxy t)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (Proxy t) = D1 (MetaData "Proxy" "Data.Proxy" "base" False) (C1 (MetaCons "Proxy" PrefixI False) (U1 :: Type -> Type))