backend-0.1.0.0
LicenseAGPL-3
Maintainerstu235271@mail.uni-kiel.de stu236925@mail.uni-kiel.de
Safe HaskellNone
LanguageHaskell2010

Docs.Hash

Description

This module contains the definition of a Hash datatype and some related utility funtions.

Synopsis

Documentation

class Hashable a where Source #

a hashable value

Minimal complete definition

updateHash

Methods

updateHash :: Ctx -> a -> Ctx Source #

hash :: a -> Hash Source #

Instances

Instances details
Hashable Hash Source # 
Instance details

Defined in Docs.Hash

Methods

updateHash :: Ctx -> Hash -> Ctx Source #

hash :: Hash -> Hash Source #

Hashable TreeEdge Source # 
Instance details

Defined in Docs.Hasql.TreeEdge

Methods

updateHash :: Ctx -> TreeEdge -> Ctx Source #

hash :: TreeEdge -> Hash Source #

Hashable TreeEdgeChildRef Source # 
Instance details

Defined in Docs.Hasql.TreeEdge

Hashable TextElementID Source # 
Instance details

Defined in Docs.TextElement

Hashable NodeHeader Source # 
Instance details

Defined in Docs.Tree

Methods

updateHash :: Ctx -> NodeHeader -> Ctx Source #

hash :: NodeHeader -> Hash Source #

Hashable Int64 Source # 
Instance details

Defined in Docs.Hash

Methods

updateHash :: Ctx -> Int64 -> Ctx Source #

hash :: Int64 -> Hash Source #

Hashable ByteString Source # 
Instance details

Defined in Docs.Hash

Methods

updateHash :: Ctx -> ByteString -> Ctx Source #

hash :: ByteString -> Hash Source #

Hashable Text Source # 
Instance details

Defined in Docs.Hash

Methods

updateHash :: Ctx -> Text -> Ctx Source #

hash :: Text -> Hash Source #

Hashable Int Source # 
Instance details

Defined in Docs.Hash

Methods

updateHash :: Ctx -> Int -> Ctx Source #

hash :: Int -> Hash Source #

Hashable a => Hashable (Maybe a) Source # 
Instance details

Defined in Docs.Hash

Methods

updateHash :: Ctx -> Maybe a -> Ctx Source #

hash :: Maybe a -> Hash Source #

Hashable a => Hashable [a] Source # 
Instance details

Defined in Docs.Hash

Methods

updateHash :: Ctx -> [a] -> Ctx Source #

hash :: [a] -> Hash Source #

data Hashed a Source #

represents a value together with its hash

Constructors

Hashed Hash a 

Instances

Instances details
(Hashable a, FromJSON a) => FromJSON (Hashed a) Source # 
Instance details

Defined in Docs.Hash

Methods

parseJSON :: Value -> Parser (Hashed a)

parseJSONList :: Value -> Parser [Hashed a]

omittedField :: Maybe (Hashed a)

(Hashable a, ToJSON a) => ToJSON (Hashed a) Source # 
Instance details

Defined in Docs.Hash

Methods

toJSON :: Hashed a -> Value

toEncoding :: Hashed a -> Encoding

toJSONList :: [Hashed a] -> Value

toEncodingList :: [Hashed a] -> Encoding

omitField :: Hashed a -> Bool

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

Defined in Docs.Hash

Methods

showsPrec :: Int -> Hashed a -> ShowS #

show :: Hashed a -> String #

showList :: [Hashed a] -> ShowS #

ToSchema a => ToSchema (Hashed a) Source # 
Instance details

Defined in Docs.Hash

Methods

declareNamedSchema :: Proxy (Hashed a) -> Declare (Definitions Schema) NamedSchema

newtype Hash Source #

represents the hash of a value

Constructors

Hash 

Fields

Instances

Instances details
FromJSON Hash Source # 
Instance details

Defined in Docs.Hash

Methods

parseJSON :: Value -> Parser Hash

parseJSONList :: Value -> Parser [Hash]

omittedField :: Maybe Hash

ToJSON Hash Source # 
Instance details

Defined in Docs.Hash

Methods

toJSON :: Hash -> Value

toEncoding :: Hash -> Encoding

toJSONList :: [Hash] -> Value

toEncodingList :: [Hash] -> Encoding

omitField :: Hash -> Bool

Hashable Hash Source # 
Instance details

Defined in Docs.Hash

Methods

updateHash :: Ctx -> Hash -> Ctx Source #

hash :: Hash -> Hash Source #

Show Hash Source # 
Instance details

Defined in Docs.Hash

Methods

showsPrec :: Int -> Hash -> ShowS #

show :: Hash -> String #

showList :: [Hash] -> ShowS #

Eq Hash Source # 
Instance details

Defined in Docs.Hash

Methods

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

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

FromHttpApiData Hash Source # 
Instance details

Defined in Docs.Hash

ToParamSchema Hash Source # 
Instance details

Defined in Docs.Hash

Methods

toParamSchema :: Proxy Hash -> Schema

ToSchema Hash Source # 
Instance details

Defined in Docs.Hash

Methods

declareNamedSchema :: Proxy Hash -> Declare (Definitions Schema) NamedSchema

hashed :: Hashable a => a -> Hashed a Source #

returns the input together with its hash