bond-haskell-0.1.1.0: Runtime support for BOND serialization

Safe HaskellNone
LanguageHaskell2010

Data.Bond.Types

Synopsis

Documentation

newtype Blob Source

Bond "blob" type

Constructors

Blob ByteString 

data Bonded a :: * -> * Source

Instances

(BondStruct a, Eq a) => Eq (Bonded a) 
Show a => Show (Bonded a) 
BondStruct a => BondType (Bonded a) Source 
Default a => Default (Bonded a) 

data Bool :: *

data Double :: *

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

class IsString a => EncodedString a where Source

Bond string/wstring transformations from/to String and Text.

Minimal complete definition

fromText, toText

Methods

toString :: a -> String Source

Convert to String

fromText :: Text -> a Source

Make bond string from Text

toText :: a -> Text Source

Convert to Text

data Float :: *

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

data HashSet a :: * -> *

A set of values. A set cannot contain duplicate values.

Instances

Foldable HashSet 
(Eq a, Hashable a) => IsList (HashSet a) 
(Hashable a, Eq a) => Eq (HashSet a) 
(Data a, Eq a, Hashable a) => Data (HashSet a) 
(Eq a, Hashable a, Read a) => Read (HashSet a) 
Show a => Show (HashSet a) 
(Hashable a, Eq a) => Monoid (HashSet a) 
NFData a => NFData (HashSet a) 
(Eq a, Hashable a, BondType a) => BondType (HashSet a) Source 
Default (HashSet a) 
type Item (HashSet a) = a 

data Set a :: * -> *

A set of values a.

Instances

Foldable Set 
Ord a => IsList (Set a) 
Eq a => Eq (Set a) 
(Data a, Ord a) => Data (Set a) 
Ord a => Ord (Set a) 
(Read a, Ord a) => Read (Set a) 
Show a => Show (Set a) 
Ord a => Monoid (Set a) 
NFData a => NFData (Set a) 
(Ord a, BondType a) => BondType (Set a) Source 
Default (Set a) 
type Item (Set a) = a 

data Int :: *

A fixed-precision integer type with at least the range [-2^29 .. 2^29-1]. The exact range for a given implementation can be determined by using minBound and maxBound from the Bounded class.

data Maybe a :: * -> *

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error.

The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.

Instances

Monad Maybe 
Functor Maybe 
Applicative Maybe 
Foldable Maybe 
Traversable Maybe 
Generic1 Maybe 
Alternative Maybe 
MonadPlus Maybe 
Eq1 Maybe 
Ord1 Maybe 
Read1 Maybe 
Show1 Maybe 
Eq a => Eq (Maybe a) 
Data a => Data (Maybe a) 
Ord a => Ord (Maybe a) 
Show a => Show (Maybe a) 
Generic (Maybe a) 
Monoid a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S." Since there is no "Semigroup" typeclass providing just mappend, we use Monoid instead.

Hashable a => Hashable (Maybe a) 
BondType a => BondType (Maybe a) Source 
Default (Maybe a) 
(Selector s, ToJSON a) => RecordToPairs (S1 s (K1 i (Maybe a))) 
(Selector s, FromJSON a) => FromRecord (S1 s (K1 i (Maybe a))) 
type Rep1 Maybe = D1 D1Maybe ((:+:) (C1 C1_0Maybe U1) (C1 C1_1Maybe (S1 NoSelector Par1))) 
type Rep (Maybe a) = D1 D1Maybe ((:+:) (C1 C1_0Maybe U1) (C1 C1_1Maybe (S1 NoSelector (Rec0 a)))) 
type (==) (Maybe k) a b = EqMaybe k a b 

data Map k a :: * -> * -> *

A Map from keys k to values a.

Instances

Functor (Map k) 
Foldable (Map k) 
Traversable (Map k) 
Ord k => IsList (Map k v) 
(Eq k, Eq a) => Eq (Map k a) 
(Data k, Data a, Ord k) => Data (Map k a) 
(Ord k, Ord v) => Ord (Map k v) 
(Ord k, Read k, Read e) => Read (Map k e) 
(Show k, Show a) => Show (Map k a) 
Ord k => Monoid (Map k v) 
(NFData k, NFData a) => NFData (Map k a) 
(Ord k, BondType k, BondType v) => BondType (Map k v) Source 
Default (Map a b) 
type Item (Map k v) = (k, v) 

newtype Ordinal Source

Bond structure field ordinal.

Constructors

Ordinal Word16 

data Vector a :: * -> *

Boxed vectors, supporting efficient slicing.