-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Language independent, reproducible, absolute types -- -- See the online tutorial. @package zm @version 0.2 module ZM.Util -- | Return the proxy for the type of the given value proxyOf :: a -> Proxy a -- | Run a State monad with an empty map as environment runEnv :: State (Map k a1) a -> (a, Map k a1) -- | Exec a State monad with an empty map as environment execEnv :: State (Map k a1) a -> Map k a1 module ZM.Type.Unit -- | The Unit type data Unit Unit :: Unit instance Data.Model.Class.Model ZM.Type.Unit.Unit instance GHC.Generics.Generic ZM.Type.Unit.Unit instance GHC.Show.Show ZM.Type.Unit.Unit instance GHC.Classes.Ord ZM.Type.Unit.Unit instance GHC.Classes.Eq ZM.Type.Unit.Unit module ZM.Type.Tuples data Tuple2 a b Tuple2 :: a -> b -> Tuple2 a b data Tuple3 a b c Tuple3 :: a -> b -> c -> Tuple3 a b c data Tuple4 a b c d Tuple4 :: a -> b -> c -> d -> Tuple4 a b c d data Tuple5 a1 a2 a3 a4 a5 Tuple5 :: a1 -> a2 -> a3 -> a4 -> a5 -> Tuple5 a1 a2 a3 a4 a5 data Tuple6 a1 a2 a3 a4 a5 a6 Tuple6 :: a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> Tuple6 a1 a2 a3 a4 a5 a6 data Tuple7 a1 a2 a3 a4 a5 a6 a7 Tuple7 :: a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> Tuple7 a1 a2 a3 a4 a5 a6 a7 data Tuple8 a1 a2 a3 a4 a5 a6 a7 a8 Tuple8 :: a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> Tuple8 a1 a2 a3 a4 a5 a6 a7 a8 data Tuple9 a1 a2 a3 a4 a5 a6 a7 a8 a9 Tuple9 :: a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> Tuple9 a1 a2 a3 a4 a5 a6 a7 a8 a9 instance GHC.Generics.Generic (ZM.Type.Tuples.Tuple9 a1 a2 a3 a4 a5 a6 a7 a8 a9) instance (GHC.Show.Show a9, GHC.Show.Show a8, GHC.Show.Show a7, GHC.Show.Show a6, GHC.Show.Show a5, GHC.Show.Show a4, GHC.Show.Show a3, GHC.Show.Show a2, GHC.Show.Show a1) => GHC.Show.Show (ZM.Type.Tuples.Tuple9 a1 a2 a3 a4 a5 a6 a7 a8 a9) instance (GHC.Classes.Ord a9, GHC.Classes.Ord a8, GHC.Classes.Ord a7, GHC.Classes.Ord a6, GHC.Classes.Ord a5, GHC.Classes.Ord a4, GHC.Classes.Ord a3, GHC.Classes.Ord a2, GHC.Classes.Ord a1) => GHC.Classes.Ord (ZM.Type.Tuples.Tuple9 a1 a2 a3 a4 a5 a6 a7 a8 a9) instance (GHC.Classes.Eq a9, GHC.Classes.Eq a8, GHC.Classes.Eq a7, GHC.Classes.Eq a6, GHC.Classes.Eq a5, GHC.Classes.Eq a4, GHC.Classes.Eq a3, GHC.Classes.Eq a2, GHC.Classes.Eq a1) => GHC.Classes.Eq (ZM.Type.Tuples.Tuple9 a1 a2 a3 a4 a5 a6 a7 a8 a9) instance GHC.Generics.Generic (ZM.Type.Tuples.Tuple8 a1 a2 a3 a4 a5 a6 a7 a8) instance (GHC.Show.Show a8, GHC.Show.Show a7, GHC.Show.Show a6, GHC.Show.Show a5, GHC.Show.Show a4, GHC.Show.Show a3, GHC.Show.Show a2, GHC.Show.Show a1) => GHC.Show.Show (ZM.Type.Tuples.Tuple8 a1 a2 a3 a4 a5 a6 a7 a8) instance (GHC.Classes.Ord a8, GHC.Classes.Ord a7, GHC.Classes.Ord a6, GHC.Classes.Ord a5, GHC.Classes.Ord a4, GHC.Classes.Ord a3, GHC.Classes.Ord a2, GHC.Classes.Ord a1) => GHC.Classes.Ord (ZM.Type.Tuples.Tuple8 a1 a2 a3 a4 a5 a6 a7 a8) instance (GHC.Classes.Eq a8, GHC.Classes.Eq a7, GHC.Classes.Eq a6, GHC.Classes.Eq a5, GHC.Classes.Eq a4, GHC.Classes.Eq a3, GHC.Classes.Eq a2, GHC.Classes.Eq a1) => GHC.Classes.Eq (ZM.Type.Tuples.Tuple8 a1 a2 a3 a4 a5 a6 a7 a8) instance GHC.Generics.Generic (ZM.Type.Tuples.Tuple7 a1 a2 a3 a4 a5 a6 a7) instance (GHC.Show.Show a7, GHC.Show.Show a6, GHC.Show.Show a5, GHC.Show.Show a4, GHC.Show.Show a3, GHC.Show.Show a2, GHC.Show.Show a1) => GHC.Show.Show (ZM.Type.Tuples.Tuple7 a1 a2 a3 a4 a5 a6 a7) instance (GHC.Classes.Ord a7, GHC.Classes.Ord a6, GHC.Classes.Ord a5, GHC.Classes.Ord a4, GHC.Classes.Ord a3, GHC.Classes.Ord a2, GHC.Classes.Ord a1) => GHC.Classes.Ord (ZM.Type.Tuples.Tuple7 a1 a2 a3 a4 a5 a6 a7) instance (GHC.Classes.Eq a7, GHC.Classes.Eq a6, GHC.Classes.Eq a5, GHC.Classes.Eq a4, GHC.Classes.Eq a3, GHC.Classes.Eq a2, GHC.Classes.Eq a1) => GHC.Classes.Eq (ZM.Type.Tuples.Tuple7 a1 a2 a3 a4 a5 a6 a7) instance GHC.Generics.Generic (ZM.Type.Tuples.Tuple6 a1 a2 a3 a4 a5 a6) instance (GHC.Show.Show a6, GHC.Show.Show a5, GHC.Show.Show a4, GHC.Show.Show a3, GHC.Show.Show a2, GHC.Show.Show a1) => GHC.Show.Show (ZM.Type.Tuples.Tuple6 a1 a2 a3 a4 a5 a6) instance (GHC.Classes.Ord a6, GHC.Classes.Ord a5, GHC.Classes.Ord a4, GHC.Classes.Ord a3, GHC.Classes.Ord a2, GHC.Classes.Ord a1) => GHC.Classes.Ord (ZM.Type.Tuples.Tuple6 a1 a2 a3 a4 a5 a6) instance (GHC.Classes.Eq a6, GHC.Classes.Eq a5, GHC.Classes.Eq a4, GHC.Classes.Eq a3, GHC.Classes.Eq a2, GHC.Classes.Eq a1) => GHC.Classes.Eq (ZM.Type.Tuples.Tuple6 a1 a2 a3 a4 a5 a6) instance GHC.Generics.Generic (ZM.Type.Tuples.Tuple5 a1 a2 a3 a4 a5) instance (GHC.Show.Show a5, GHC.Show.Show a4, GHC.Show.Show a3, GHC.Show.Show a2, GHC.Show.Show a1) => GHC.Show.Show (ZM.Type.Tuples.Tuple5 a1 a2 a3 a4 a5) instance (GHC.Classes.Ord a5, GHC.Classes.Ord a4, GHC.Classes.Ord a3, GHC.Classes.Ord a2, GHC.Classes.Ord a1) => GHC.Classes.Ord (ZM.Type.Tuples.Tuple5 a1 a2 a3 a4 a5) instance (GHC.Classes.Eq a5, GHC.Classes.Eq a4, GHC.Classes.Eq a3, GHC.Classes.Eq a2, GHC.Classes.Eq a1) => GHC.Classes.Eq (ZM.Type.Tuples.Tuple5 a1 a2 a3 a4 a5) instance GHC.Generics.Generic (ZM.Type.Tuples.Tuple4 a b c d) instance (GHC.Show.Show d, GHC.Show.Show c, GHC.Show.Show b, GHC.Show.Show a) => GHC.Show.Show (ZM.Type.Tuples.Tuple4 a b c d) instance (GHC.Classes.Ord d, GHC.Classes.Ord c, GHC.Classes.Ord b, GHC.Classes.Ord a) => GHC.Classes.Ord (ZM.Type.Tuples.Tuple4 a b c d) instance (GHC.Classes.Eq d, GHC.Classes.Eq c, GHC.Classes.Eq b, GHC.Classes.Eq a) => GHC.Classes.Eq (ZM.Type.Tuples.Tuple4 a b c d) instance GHC.Generics.Generic (ZM.Type.Tuples.Tuple3 a b c) instance (GHC.Show.Show c, GHC.Show.Show b, GHC.Show.Show a) => GHC.Show.Show (ZM.Type.Tuples.Tuple3 a b c) instance (GHC.Classes.Ord c, GHC.Classes.Ord b, GHC.Classes.Ord a) => GHC.Classes.Ord (ZM.Type.Tuples.Tuple3 a b c) instance (GHC.Classes.Eq c, GHC.Classes.Eq b, GHC.Classes.Eq a) => GHC.Classes.Eq (ZM.Type.Tuples.Tuple3 a b c) instance GHC.Generics.Generic (ZM.Type.Tuples.Tuple2 a b) instance (GHC.Show.Show b, GHC.Show.Show a) => GHC.Show.Show (ZM.Type.Tuples.Tuple2 a b) instance (GHC.Classes.Ord b, GHC.Classes.Ord a) => GHC.Classes.Ord (ZM.Type.Tuples.Tuple2 a b) instance (GHC.Classes.Eq b, GHC.Classes.Eq a) => GHC.Classes.Eq (ZM.Type.Tuples.Tuple2 a b) instance (Data.Model.Class.Model a, Data.Model.Class.Model b) => Data.Model.Class.Model (ZM.Type.Tuples.Tuple2 a b) instance (Data.Model.Class.Model a, Data.Model.Class.Model b, Data.Model.Class.Model c) => Data.Model.Class.Model (ZM.Type.Tuples.Tuple3 a b c) instance (Data.Model.Class.Model a, Data.Model.Class.Model b, Data.Model.Class.Model c, Data.Model.Class.Model d) => Data.Model.Class.Model (ZM.Type.Tuples.Tuple4 a b c d) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5) => Data.Model.Class.Model (ZM.Type.Tuples.Tuple5 a1 a2 a3 a4 a5) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5, Data.Model.Class.Model a6) => Data.Model.Class.Model (ZM.Type.Tuples.Tuple6 a1 a2 a3 a4 a5 a6) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5, Data.Model.Class.Model a6, Data.Model.Class.Model a7) => Data.Model.Class.Model (ZM.Type.Tuples.Tuple7 a1 a2 a3 a4 a5 a6 a7) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5, Data.Model.Class.Model a6, Data.Model.Class.Model a7, Data.Model.Class.Model a8) => Data.Model.Class.Model (ZM.Type.Tuples.Tuple8 a1 a2 a3 a4 a5 a6 a7 a8) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5, Data.Model.Class.Model a6, Data.Model.Class.Model a7, Data.Model.Class.Model a8, Data.Model.Class.Model a9) => Data.Model.Class.Model (ZM.Type.Tuples.Tuple9 a1 a2 a3 a4 a5 a6 a7 a8 a9) module ZM.Type.NonEmptyList -- | A list that contains at least one element data NonEmptyList a Elem :: a -> NonEmptyList a Cons :: a -> (NonEmptyList a) -> NonEmptyList a -- | Convert a list to a NonEmptyList, returns an error if the list -- is empty nonEmptyList :: [a] -> NonEmptyList a instance Data.Flat.Class.Flat a => Data.Flat.Class.Flat (ZM.Type.NonEmptyList.NonEmptyList a) instance Data.Traversable.Traversable ZM.Type.NonEmptyList.NonEmptyList instance Data.Foldable.Foldable ZM.Type.NonEmptyList.NonEmptyList instance GHC.Base.Functor ZM.Type.NonEmptyList.NonEmptyList instance GHC.Generics.Generic (ZM.Type.NonEmptyList.NonEmptyList a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (ZM.Type.NonEmptyList.NonEmptyList a) instance GHC.Show.Show a => GHC.Show.Show (ZM.Type.NonEmptyList.NonEmptyList a) instance GHC.Classes.Ord a => GHC.Classes.Ord (ZM.Type.NonEmptyList.NonEmptyList a) instance GHC.Classes.Eq a => GHC.Classes.Eq (ZM.Type.NonEmptyList.NonEmptyList a) instance Data.Model.Class.Model a => Data.Model.Class.Model (ZM.Type.NonEmptyList.NonEmptyList a) module ZM.Type.List -- | A list data List a Nil :: List a Cons :: a -> (List a) -> List a instance Data.Flat.Class.Flat a => Data.Flat.Class.Flat (ZM.Type.List.List a) instance Data.Traversable.Traversable ZM.Type.List.List instance Data.Foldable.Foldable ZM.Type.List.List instance GHC.Base.Functor ZM.Type.List.List instance GHC.Generics.Generic (ZM.Type.List.List a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (ZM.Type.List.List a) instance GHC.Show.Show a => GHC.Show.Show (ZM.Type.List.List a) instance GHC.Classes.Ord a => GHC.Classes.Ord (ZM.Type.List.List a) instance GHC.Classes.Eq a => GHC.Classes.Eq (ZM.Type.List.List a) instance Data.Model.Class.Model a => Data.Model.Class.Model (ZM.Type.List.List a) module ZM.Type.Map -- | A Map is represented as a list of key and value couples data Map a b instance GHC.Generics.Generic (ZM.Type.Map.Map a b) instance (Data.Model.Class.Model a, Data.Model.Class.Model b) => Data.Model.Class.Model (ZM.Type.Map.Map a b) -- | Generate the large constructor trees of some primitive types -- (Array,Word8,Word7) module ZM.Type.Generate -- | Constructor Tree for: data Array a = A0 | A1 a (Array a) .. | A255 a -- .. a (Array a) arrayCT :: Maybe (ConTree String (TypeRef QualName)) -- | Constructor Tree for: data Word8 = V0 | V1 .. | V255 word8CT :: Maybe (ConTree String ref) -- | Constructor Tree for: data Word7 = V0 | V1 .. | V127 word7CT :: Maybe (ConTree String ref) instance GHC.Show.Show ZM.Type.Generate.Cons module ZM.Type.Words data Sign Positive :: Sign Negative :: Sign -- | A 7 bits unsigned integer data Word7 = V0 .. V127 data Word7 Word7 :: Word8 -> Word7 -- | An unsigned integer of arbitrary length encoded as a non empty list of -- Word7 words with least significant word first and, inside each word, -- most significant bit first. -- -- Example: 3450 :: Word -- -- Binary representation: 0000110101111010 -- -- Split in 7bits groups: 0011010(26) 1111010(122) -- -- Reverse order of groups: Word (Cons V122 (Elem V26)) -- -- So Least Significant Byte first with Most Significant Bit first in -- every 7 bits group. data Word Word :: (LeastSignificantFirst (NonEmptyList (MostSignificantFirst Word7))) -> Word -- | An 8 bits unsigned integer data Word8 = V0 | V1 .. | V255 data Word8 Word8 :: Word8 -> Word8 data Word16 Word16 :: Word -> Word16 data Word32 Word32 :: Word -> Word32 data Word64 Word64 :: Word -> Word64 data Int Int :: (ZigZag Word) -> Int data Int8 Int8 :: (ZigZag Word8) -> Int8 data Int16 Int16 :: (ZigZag Word16) -> Int16 data Int32 Int32 :: (ZigZag Word32) -> Int32 data Int64 Int64 :: (ZigZag Word64) -> Int64 -- | ZigZag encoding, map signed integers to unsigned integers Positive -- integers are mapped to even unsigned values, negative integers to odd -- values: 0 -> 0, -1 -> 1, 1 -> 2, -2 -> 3, 2 -> 4 ... data ZigZag a ZigZag :: a -> ZigZag a data MostSignificantFirst a MostSignificantFirst :: a -> MostSignificantFirst a data LeastSignificantFirst a LeastSignificantFirst :: a -> LeastSignificantFirst a instance Data.Flat.Class.Flat ZM.Type.Words.Sign instance Data.Model.Class.Model ZM.Type.Words.Sign instance GHC.Generics.Generic ZM.Type.Words.Sign instance GHC.Show.Show ZM.Type.Words.Sign instance GHC.Classes.Ord ZM.Type.Words.Sign instance GHC.Classes.Eq ZM.Type.Words.Sign instance Data.Model.Class.Model ZM.Type.Words.Int16 instance GHC.Generics.Generic ZM.Type.Words.Int16 instance GHC.Show.Show ZM.Type.Words.Int16 instance GHC.Classes.Ord ZM.Type.Words.Int16 instance GHC.Classes.Eq ZM.Type.Words.Int16 instance Data.Model.Class.Model ZM.Type.Words.Word16 instance GHC.Generics.Generic ZM.Type.Words.Word16 instance GHC.Show.Show ZM.Type.Words.Word16 instance GHC.Classes.Ord ZM.Type.Words.Word16 instance GHC.Classes.Eq ZM.Type.Words.Word16 instance Data.Model.Class.Model ZM.Type.Words.Int32 instance GHC.Generics.Generic ZM.Type.Words.Int32 instance GHC.Show.Show ZM.Type.Words.Int32 instance GHC.Classes.Ord ZM.Type.Words.Int32 instance GHC.Classes.Eq ZM.Type.Words.Int32 instance Data.Model.Class.Model ZM.Type.Words.Word32 instance GHC.Generics.Generic ZM.Type.Words.Word32 instance GHC.Show.Show ZM.Type.Words.Word32 instance GHC.Classes.Ord ZM.Type.Words.Word32 instance GHC.Classes.Eq ZM.Type.Words.Word32 instance Data.Model.Class.Model ZM.Type.Words.Int64 instance GHC.Generics.Generic ZM.Type.Words.Int64 instance GHC.Show.Show ZM.Type.Words.Int64 instance GHC.Classes.Ord ZM.Type.Words.Int64 instance GHC.Classes.Eq ZM.Type.Words.Int64 instance Data.Model.Class.Model ZM.Type.Words.Word64 instance GHC.Generics.Generic ZM.Type.Words.Word64 instance GHC.Show.Show ZM.Type.Words.Word64 instance GHC.Classes.Ord ZM.Type.Words.Word64 instance GHC.Classes.Eq ZM.Type.Words.Word64 instance Data.Model.Class.Model ZM.Type.Words.Int instance GHC.Generics.Generic ZM.Type.Words.Int instance GHC.Show.Show ZM.Type.Words.Int instance GHC.Classes.Ord ZM.Type.Words.Int instance GHC.Classes.Eq ZM.Type.Words.Int instance Data.Model.Class.Model ZM.Type.Words.Word instance GHC.Generics.Generic ZM.Type.Words.Word instance GHC.Show.Show ZM.Type.Words.Word instance GHC.Classes.Ord ZM.Type.Words.Word instance GHC.Classes.Eq ZM.Type.Words.Word instance Data.Flat.Class.Flat a => Data.Flat.Class.Flat (ZM.Type.Words.MostSignificantFirst a) instance GHC.Generics.Generic (ZM.Type.Words.MostSignificantFirst a) instance GHC.Show.Show a => GHC.Show.Show (ZM.Type.Words.MostSignificantFirst a) instance GHC.Classes.Ord a => GHC.Classes.Ord (ZM.Type.Words.MostSignificantFirst a) instance GHC.Classes.Eq a => GHC.Classes.Eq (ZM.Type.Words.MostSignificantFirst a) instance Data.Flat.Class.Flat a => Data.Flat.Class.Flat (ZM.Type.Words.LeastSignificantFirst a) instance GHC.Generics.Generic (ZM.Type.Words.LeastSignificantFirst a) instance GHC.Show.Show a => GHC.Show.Show (ZM.Type.Words.LeastSignificantFirst a) instance GHC.Classes.Ord a => GHC.Classes.Ord (ZM.Type.Words.LeastSignificantFirst a) instance GHC.Classes.Eq a => GHC.Classes.Eq (ZM.Type.Words.LeastSignificantFirst a) instance Data.Model.Class.Model ZM.Type.Words.Int8 instance GHC.Generics.Generic ZM.Type.Words.Int8 instance GHC.Show.Show ZM.Type.Words.Int8 instance GHC.Classes.Ord ZM.Type.Words.Int8 instance GHC.Classes.Eq ZM.Type.Words.Int8 instance Data.Flat.Class.Flat a => Data.Flat.Class.Flat (ZM.Type.Words.ZigZag a) instance GHC.Generics.Generic (ZM.Type.Words.ZigZag a) instance GHC.Show.Show a => GHC.Show.Show (ZM.Type.Words.ZigZag a) instance GHC.Classes.Ord a => GHC.Classes.Ord (ZM.Type.Words.ZigZag a) instance GHC.Classes.Eq a => GHC.Classes.Eq (ZM.Type.Words.ZigZag a) instance GHC.Generics.Generic ZM.Type.Words.Word8 instance GHC.Show.Show ZM.Type.Words.Word8 instance GHC.Classes.Ord ZM.Type.Words.Word8 instance GHC.Classes.Eq ZM.Type.Words.Word8 instance GHC.Generics.Generic ZM.Type.Words.Word7 instance GHC.Show.Show ZM.Type.Words.Word7 instance GHC.Classes.Ord ZM.Type.Words.Word7 instance GHC.Classes.Eq ZM.Type.Words.Word7 instance Data.Model.Class.Model ZM.Type.Words.Word7 instance Data.Model.Class.Model ZM.Type.Words.Word8 instance Data.Model.Class.Model a => Data.Model.Class.Model (ZM.Type.Words.ZigZag a) instance Data.Model.Class.Model a => Data.Model.Class.Model (ZM.Type.Words.LeastSignificantFirst a) instance Data.Model.Class.Model a => Data.Model.Class.Model (ZM.Type.Words.MostSignificantFirst a) module ZM.Type.Char -- | A Unicode Char data Char Char :: Word32 -> Char instance Data.Model.Class.Model ZM.Type.Char.Char instance GHC.Generics.Generic ZM.Type.Char.Char instance GHC.Show.Show ZM.Type.Char.Char instance GHC.Classes.Ord ZM.Type.Char.Char instance GHC.Classes.Eq ZM.Type.Char.Char module ZM.Type.Bit -- | A Bit data Bit V0 :: Bit V1 :: Bit instance Data.Model.Class.Model ZM.Type.Bit.Bit instance Data.Flat.Class.Flat ZM.Type.Bit.Bit instance GHC.Generics.Generic ZM.Type.Bit.Bit instance GHC.Show.Show ZM.Type.Bit.Bit instance GHC.Classes.Ord ZM.Type.Bit.Bit instance GHC.Classes.Eq ZM.Type.Bit.Bit module ZM.Type.Bits11 data Bits11 Bits11 :: Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bits11 [bit0] :: Bits11 -> Bit [bit1] :: Bits11 -> Bit [bit2] :: Bits11 -> Bit [bit3] :: Bits11 -> Bit [bit4] :: Bits11 -> Bit [bit5] :: Bits11 -> Bit [bit6] :: Bits11 -> Bit [bit7] :: Bits11 -> Bit [bit8] :: Bits11 -> Bit [bit9] :: Bits11 -> Bit [bit10] :: Bits11 -> Bit instance Data.Model.Class.Model ZM.Type.Bits11.Bits11 instance Data.Flat.Class.Flat ZM.Type.Bits11.Bits11 instance GHC.Generics.Generic ZM.Type.Bits11.Bits11 instance GHC.Show.Show ZM.Type.Bits11.Bits11 instance GHC.Classes.Ord ZM.Type.Bits11.Bits11 instance GHC.Classes.Eq ZM.Type.Bits11.Bits11 module ZM.Type.Bits23 data Bits23 Bits23 :: Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bits23 [bit0] :: Bits23 -> Bit [bit1] :: Bits23 -> Bit [bit2] :: Bits23 -> Bit [bit3] :: Bits23 -> Bit [bit4] :: Bits23 -> Bit [bit5] :: Bits23 -> Bit [bit6] :: Bits23 -> Bit [bit7] :: Bits23 -> Bit [bit8] :: Bits23 -> Bit [bit9] :: Bits23 -> Bit [bit10] :: Bits23 -> Bit [bit11] :: Bits23 -> Bit [bit12] :: Bits23 -> Bit [bit13] :: Bits23 -> Bit [bit14] :: Bits23 -> Bit [bit15] :: Bits23 -> Bit [bit16] :: Bits23 -> Bit [bit17] :: Bits23 -> Bit [bit18] :: Bits23 -> Bit [bit19] :: Bits23 -> Bit [bit20] :: Bits23 -> Bit [bit21] :: Bits23 -> Bit [bit22] :: Bits23 -> Bit instance Data.Flat.Class.Flat ZM.Type.Bits23.Bits23 instance Data.Model.Class.Model ZM.Type.Bits23.Bits23 instance GHC.Generics.Generic ZM.Type.Bits23.Bits23 instance GHC.Show.Show ZM.Type.Bits23.Bits23 instance GHC.Classes.Ord ZM.Type.Bits23.Bits23 instance GHC.Classes.Eq ZM.Type.Bits23.Bits23 module ZM.Type.Bits52 data Bits52 Bits52 :: Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bits52 [bit0] :: Bits52 -> Bit [bit1] :: Bits52 -> Bit [bit2] :: Bits52 -> Bit [bit3] :: Bits52 -> Bit [bit4] :: Bits52 -> Bit [bit5] :: Bits52 -> Bit [bit6] :: Bits52 -> Bit [bit7] :: Bits52 -> Bit [bit8] :: Bits52 -> Bit [bit9] :: Bits52 -> Bit [bit10] :: Bits52 -> Bit [bit11] :: Bits52 -> Bit [bit12] :: Bits52 -> Bit [bit13] :: Bits52 -> Bit [bit14] :: Bits52 -> Bit [bit15] :: Bits52 -> Bit [bit16] :: Bits52 -> Bit [bit17] :: Bits52 -> Bit [bit18] :: Bits52 -> Bit [bit19] :: Bits52 -> Bit [bit20] :: Bits52 -> Bit [bit21] :: Bits52 -> Bit [bit22] :: Bits52 -> Bit [bit23] :: Bits52 -> Bit [bit24] :: Bits52 -> Bit [bit25] :: Bits52 -> Bit [bit26] :: Bits52 -> Bit [bit27] :: Bits52 -> Bit [bit28] :: Bits52 -> Bit [bit29] :: Bits52 -> Bit [bit30] :: Bits52 -> Bit [bit31] :: Bits52 -> Bit [bit32] :: Bits52 -> Bit [bit33] :: Bits52 -> Bit [bit34] :: Bits52 -> Bit [bit35] :: Bits52 -> Bit [bit36] :: Bits52 -> Bit [bit37] :: Bits52 -> Bit [bit38] :: Bits52 -> Bit [bit39] :: Bits52 -> Bit [bit40] :: Bits52 -> Bit [bit41] :: Bits52 -> Bit [bit42] :: Bits52 -> Bit [bit43] :: Bits52 -> Bit [bit44] :: Bits52 -> Bit [bit45] :: Bits52 -> Bit [bit46] :: Bits52 -> Bit [bit47] :: Bits52 -> Bit [bit48] :: Bits52 -> Bit [bit49] :: Bits52 -> Bit [bit50] :: Bits52 -> Bit [bit51] :: Bits52 -> Bit instance Data.Model.Class.Model ZM.Type.Bits52.Bits52 instance Data.Flat.Class.Flat ZM.Type.Bits52.Bits52 instance GHC.Generics.Generic ZM.Type.Bits52.Bits52 instance GHC.Show.Show ZM.Type.Bits52.Bits52 instance GHC.Classes.Ord ZM.Type.Bits52.Bits52 instance GHC.Classes.Eq ZM.Type.Bits52.Bits52 module ZM.Type.Float64 -- | An IEEE-754 Big Endian 64 bits Float data IEEE_754_binary64 IEEE_754_binary64 :: Sign -> MostSignificantFirst Bits11 -> MostSignificantFirst Bits52 -> IEEE_754_binary64 [sign] :: IEEE_754_binary64 -> Sign [exponent] :: IEEE_754_binary64 -> MostSignificantFirst Bits11 [fraction] :: IEEE_754_binary64 -> MostSignificantFirst Bits52 instance Data.Model.Class.Model ZM.Type.Float64.IEEE_754_binary64 instance GHC.Generics.Generic ZM.Type.Float64.IEEE_754_binary64 instance GHC.Show.Show ZM.Type.Float64.IEEE_754_binary64 instance GHC.Classes.Ord ZM.Type.Float64.IEEE_754_binary64 instance GHC.Classes.Eq ZM.Type.Float64.IEEE_754_binary64 module ZM.Type.Bits8 data Bits8 Bits8 :: Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bit -> Bits8 [bit0] :: Bits8 -> Bit [bit1] :: Bits8 -> Bit [bit2] :: Bits8 -> Bit [bit3] :: Bits8 -> Bit [bit4] :: Bits8 -> Bit [bit5] :: Bits8 -> Bit [bit6] :: Bits8 -> Bit [bit7] :: Bits8 -> Bit instance Data.Model.Class.Model ZM.Type.Bits8.Bits8 instance Data.Flat.Class.Flat ZM.Type.Bits8.Bits8 instance GHC.Generics.Generic ZM.Type.Bits8.Bits8 instance GHC.Show.Show ZM.Type.Bits8.Bits8 instance GHC.Classes.Ord ZM.Type.Bits8.Bits8 instance GHC.Classes.Eq ZM.Type.Bits8.Bits8 module ZM.Type.Float32 -- | An IEEE-754 Big Endian 32 bits Float data IEEE_754_binary32 IEEE_754_binary32 :: Sign -> MostSignificantFirst Bits8 -> MostSignificantFirst Bits23 -> IEEE_754_binary32 [sign] :: IEEE_754_binary32 -> Sign [exponent] :: IEEE_754_binary32 -> MostSignificantFirst Bits8 [fraction] :: IEEE_754_binary32 -> MostSignificantFirst Bits23 instance Data.Model.Class.Model ZM.Type.Float32.IEEE_754_binary32 instance GHC.Generics.Generic ZM.Type.Float32.IEEE_754_binary32 instance GHC.Show.Show ZM.Type.Float32.IEEE_754_binary32 instance GHC.Classes.Ord ZM.Type.Float32.IEEE_754_binary32 instance GHC.Classes.Eq ZM.Type.Float32.IEEE_754_binary32 module ZM.Type.Array -- | An Array. -- --
--   Array a  = A0
--            | A1 a (Array a)
--            | A2 a a (Array a)
--            ...
--            | A255 a ... (Array a)
--   
data Array a -- | A byte-aligned byte array data Bytes instance Data.Model.Class.Model ZM.Type.Array.Bytes instance GHC.Generics.Generic ZM.Type.Array.Bytes instance Data.Model.Class.Model a => Data.Model.Class.Model (ZM.Type.Array.Array a) instance Data.Model.Class.Model Data.Flat.Filler.Filler instance Data.Model.Class.Model a => Data.Model.Class.Model (Data.Flat.Filler.PreAligned a) -- | Binary Large OBjects (BLOBs) module ZM.Type.BLOB -- | A BLOB is binary value encoded according to a specified encoding (e.g. -- UTF8) data BLOB encoding BLOB :: encoding -> Bytes -> BLOB encoding [encoding] :: BLOB encoding -> encoding [content] :: BLOB encoding -> Bytes -- | UTF-8 Encoding data UTF8Encoding UTF8Encoding :: UTF8Encoding -- | UTF-16 Little Endian Encoding data UTF16LEEncoding UTF16LEEncoding :: UTF16LEEncoding -- | Flat encoding data FlatEncoding FlatEncoding :: FlatEncoding -- | Unspecified encoding data NoEncoding NoEncoding :: NoEncoding instance Data.Model.Class.Model ZM.Type.BLOB.NoEncoding instance Data.Flat.Class.Flat ZM.Type.BLOB.NoEncoding instance GHC.Generics.Generic ZM.Type.BLOB.NoEncoding instance Control.DeepSeq.NFData ZM.Type.BLOB.NoEncoding instance GHC.Show.Show ZM.Type.BLOB.NoEncoding instance GHC.Classes.Ord ZM.Type.BLOB.NoEncoding instance GHC.Classes.Eq ZM.Type.BLOB.NoEncoding instance Data.Model.Class.Model ZM.Type.BLOB.FlatEncoding instance Data.Flat.Class.Flat ZM.Type.BLOB.FlatEncoding instance GHC.Generics.Generic ZM.Type.BLOB.FlatEncoding instance Control.DeepSeq.NFData ZM.Type.BLOB.FlatEncoding instance GHC.Show.Show ZM.Type.BLOB.FlatEncoding instance GHC.Classes.Ord ZM.Type.BLOB.FlatEncoding instance GHC.Classes.Eq ZM.Type.BLOB.FlatEncoding instance Data.Model.Class.Model ZM.Type.BLOB.UTF16LEEncoding instance Data.Flat.Class.Flat ZM.Type.BLOB.UTF16LEEncoding instance GHC.Generics.Generic ZM.Type.BLOB.UTF16LEEncoding instance Control.DeepSeq.NFData ZM.Type.BLOB.UTF16LEEncoding instance GHC.Show.Show ZM.Type.BLOB.UTF16LEEncoding instance GHC.Classes.Ord ZM.Type.BLOB.UTF16LEEncoding instance GHC.Classes.Eq ZM.Type.BLOB.UTF16LEEncoding instance Data.Model.Class.Model ZM.Type.BLOB.UTF8Encoding instance Data.Flat.Class.Flat ZM.Type.BLOB.UTF8Encoding instance GHC.Generics.Generic ZM.Type.BLOB.UTF8Encoding instance Control.DeepSeq.NFData ZM.Type.BLOB.UTF8Encoding instance GHC.Show.Show ZM.Type.BLOB.UTF8Encoding instance GHC.Classes.Ord ZM.Type.BLOB.UTF8Encoding instance GHC.Classes.Eq ZM.Type.BLOB.UTF8Encoding instance GHC.Generics.Generic (ZM.Type.BLOB.BLOB encoding) instance Data.Model.Class.Model encoding => Data.Model.Class.Model (ZM.Type.BLOB.BLOB encoding) -- | Mapping of basic Haskell types to equivalent ZhengMing types (Char, -- (), Words, Ints, Floats, Text, Tuples, List, Seq, Map) module ZM.Model instance Data.Model.Class.Model GHC.Types.Char instance Data.Model.Class.Model () instance Data.Model.Class.Model GHC.Types.Word instance Data.Model.Class.Model GHC.Types.Int instance Data.Model.Class.Model GHC.Word.Word8 instance Data.Model.Class.Model GHC.Word.Word16 instance Data.Model.Class.Model GHC.Word.Word32 instance Data.Model.Class.Model GHC.Word.Word64 instance Data.Model.Class.Model GHC.Int.Int8 instance Data.Model.Class.Model GHC.Int.Int16 instance Data.Model.Class.Model GHC.Int.Int32 instance Data.Model.Class.Model GHC.Int.Int64 instance Data.Model.Class.Model GHC.Integer.Type.Integer instance Data.Model.Class.Model GHC.Types.Float instance Data.Model.Class.Model GHC.Types.Double instance Data.Model.Class.Model a => Data.Model.Class.Model [a] instance Data.Model.Class.Model a => Data.Model.Class.Model (Data.Sequence.Seq a) instance (Data.Model.Class.Model a, Data.Model.Class.Model b) => Data.Model.Class.Model (Data.Map.Base.Map a b) instance Data.Model.Class.Model Data.ByteString.Internal.ByteString instance Data.Model.Class.Model Data.ByteString.Lazy.Internal.ByteString instance Data.Model.Class.Model Data.ByteString.Short.Internal.ShortByteString instance Data.Model.Class.Model Data.Text.Internal.Text instance Data.Model.Class.AsType (Type.Analyse.Typ Data.Text.Internal.Text) instance Data.Model.Class.Model Data.Flat.Types.UTF8Text instance Data.Model.Class.AsType (Type.Analyse.Typ Data.Flat.Types.UTF8Text) instance Data.Model.Class.Model Data.Flat.Types.UTF16Text instance Data.Model.Class.AsType (Type.Analyse.Typ Data.Flat.Types.UTF16Text) instance (Data.Model.Class.Model a, Data.Model.Class.Model b) => Data.Model.Class.Model (a, b) instance (Data.Model.Class.Model a, Data.Model.Class.Model b, Data.Model.Class.Model c) => Data.Model.Class.Model (a, b, c) instance (Data.Model.Class.Model a, Data.Model.Class.Model b, Data.Model.Class.Model c, Data.Model.Class.Model d) => Data.Model.Class.Model (a, b, c, d) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5) => Data.Model.Class.Model (a1, a2, a3, a4, a5) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5, Data.Model.Class.Model a6) => Data.Model.Class.Model (a1, a2, a3, a4, a5, a6) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5, Data.Model.Class.Model a6, Data.Model.Class.Model a7) => Data.Model.Class.Model (a1, a2, a3, a4, a5, a6, a7) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5, Data.Model.Class.Model a6, Data.Model.Class.Model a7, Data.Model.Class.Model a8) => Data.Model.Class.Model (a1, a2, a3, a4, a5, a6, a7, a8) instance (Data.Model.Class.Model a1, Data.Model.Class.Model a2, Data.Model.Class.Model a3, Data.Model.Class.Model a4, Data.Model.Class.Model a5, Data.Model.Class.Model a6, Data.Model.Class.Model a7, Data.Model.Class.Model a8, Data.Model.Class.Model a9) => Data.Model.Class.Model (a1, a2, a3, a4, a5, a6, a7, a8, a9) -- | Crypto algorithms of the Keccak family (SHA3/SHAKE), with support for -- GHCJS. module Data.Digest.Keccak -- | Return the specified number of bytes of the SHA-3 hash of the provided -- byte string sha3_256 :: Int -> ByteString -> ByteString -- | Return the specified number of bytes of the SHAKE-128 hash of the -- provided byte string shake_128 :: Int -> ByteString -> ByteString module ZM.Types -- | An absolute type model, an absolute type and its associated -- environment type AbsTypeModel = TypeModel Identifier Identifier (ADTRef AbsRef) AbsRef -- | An absolute type, a type identifier that depends only on the -- definition of the type type AbsType = Type AbsRef -- | A reference to an absolute data type definition, in the form of a hash -- of the data type definition itself data AbsRef = AbsRef (SHA3_256_6 -- AbsADT) deriving (Eq, Ord, Show, NFData, Generic, Flat) data AbsRef AbsRef :: (SHAKE128_48 AbsADT) -> AbsRef -- | Return the absolute reference of the given value absRef :: Flat r => r -> AbsRef -- | An absolute data type definition, a definition that refers only to -- other absolute definitions type AbsADT = ADT Identifier Identifier (ADTRef AbsRef) -- | An environments of absolute types type AbsEnv = TypeEnv Identifier Identifier (ADTRef AbsRef) AbsRef -- | A reference inside an ADT to another ADT data ADTRef r -- | Variable, standing for a type Var :: Word8 -> ADTRef r -- | Recursive reference to the ADT itself Rec :: ADTRef r -- | Reference to another ADT Ext :: r -> ADTRef r -- | An Identifier, the name of an ADT data Identifier Name :: UnicodeLetter -> [UnicodeLetterOrNumberOrLine] -> Identifier Symbol :: (NonEmptyList UnicodeSymbol) -> Identifier -- | A character that is included in one of the following Unicode classes: -- UppercaseLetter LowercaseLetter TitlecaseLetter ModifierLetter -- OtherLetter data UnicodeLetter UnicodeLetter :: Char -> UnicodeLetter -- | A character that is either a UnicodeLetter, a -- UnicodeNumber or the special character '_' data UnicodeLetterOrNumberOrLine UnicodeLetterOrNumberOrLine :: Char -> UnicodeLetterOrNumberOrLine -- | A character that is included in one of the following Unicode classes: -- MathSymbol CurrencySymbol ModifierSymbol OtherSymbol data UnicodeSymbol UnicodeSymbol :: Char -> UnicodeSymbol -- | A hash of a value, the first 6 bytes of the value's SHA3-256 hash data SHA3_256_6 a SHA3_256_6 :: Word8 -> Word8 -> Word8 -> Word8 -> Word8 -> Word8 -> SHA3_256_6 a -- | A hash of a value, the first 48 bits (6 bytes) of the value's SHAKE128 -- hash data SHAKE128_48 a SHAKE128_48 :: Word8 -> Word8 -> Word8 -> Word8 -> Word8 -> Word8 -> SHAKE128_48 a -- | A list that contains at least one element data NonEmptyList a Elem :: a -> NonEmptyList a Cons :: a -> (NonEmptyList a) -> NonEmptyList a -- | Convert a list to a NonEmptyList, returns an error if the list -- is empty nonEmptyList :: [a] -> NonEmptyList a -- | A 7 bits unsigned integer data Word7 = V0 .. V127 data Word7 -- | Flat encoding data FlatEncoding FlatEncoding :: FlatEncoding -- | UTF-8 Encoding data UTF8Encoding UTF8Encoding :: UTF8Encoding -- | UTF-16 Little Endian Encoding data UTF16LEEncoding UTF16LEEncoding :: UTF16LEEncoding -- | Unspecified encoding data NoEncoding NoEncoding :: NoEncoding type TypedDecoded a = Either TypedDecodeException a -- | An exception thrown if the decoding of a type value fails data TypedDecodeException UnknownMetaModel :: AbsType -> TypedDecodeException WrongType :: AbsType -> AbsType -> TypedDecodeException [expectedType] :: TypedDecodeException -> AbsType [actualType] :: TypedDecodeException -> AbsType DecodeError :: DecodeException -> TypedDecodeException -- | A class of types that can be fully evaluated. class NFData a -- | Class of types that can be encoded/decoded class Flat a -- | ZigZag encoding, map signed integers to unsigned integers Positive -- integers are mapped to even unsigned values, negative integers to odd -- values: 0 -> 0, -1 -> 1, 1 -> 2, -2 -> 3, 2 -> 4 ... data ZigZag a ZigZag :: a -> ZigZag a data LeastSignificantFirst a LeastSignificantFirst :: a -> LeastSignificantFirst a data MostSignificantFirst a MostSignificantFirst :: a -> MostSignificantFirst a -- | A generic value (used for dynamic decoding) data Value Value :: AbsType -> String -> [Bool] -> [Value] -> Value [valType] :: Value -> AbsType [valName] :: Value -> String [valBits] :: Value -> [Bool] [valFields] :: Value -> [Value] -- | An optionally labeled value data Label a label Label :: a -> (Maybe label) -> Label a label label :: (Functor f, Ord k) => Map k a -> (a -> l) -> f k -> f (Label k l) instance GHC.Classes.Ord ZM.Types.TypedDecodeException instance GHC.Classes.Eq ZM.Types.TypedDecodeException instance GHC.Show.Show ZM.Types.TypedDecodeException instance (Data.Flat.Class.Flat label, Data.Flat.Class.Flat a) => Data.Flat.Class.Flat (ZM.Types.Label a label) instance GHC.Generics.Generic (ZM.Types.Label a label) instance (Control.DeepSeq.NFData label, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (ZM.Types.Label a label) instance (GHC.Show.Show label, GHC.Show.Show a) => GHC.Show.Show (ZM.Types.Label a label) instance (GHC.Classes.Ord label, GHC.Classes.Ord a) => GHC.Classes.Ord (ZM.Types.Label a label) instance (GHC.Classes.Eq label, GHC.Classes.Eq a) => GHC.Classes.Eq (ZM.Types.Label a label) instance Data.Flat.Class.Flat ZM.Types.Value instance GHC.Generics.Generic ZM.Types.Value instance Control.DeepSeq.NFData ZM.Types.Value instance GHC.Show.Show ZM.Types.Value instance GHC.Classes.Ord ZM.Types.Value instance GHC.Classes.Eq ZM.Types.Value instance Data.Flat.Class.Flat ZM.Types.AbsRef instance GHC.Generics.Generic ZM.Types.AbsRef instance Control.DeepSeq.NFData ZM.Types.AbsRef instance GHC.Show.Show ZM.Types.AbsRef instance GHC.Classes.Ord ZM.Types.AbsRef instance GHC.Classes.Eq ZM.Types.AbsRef instance Data.Flat.Class.Flat ZM.Types.Identifier instance GHC.Generics.Generic ZM.Types.Identifier instance Control.DeepSeq.NFData ZM.Types.Identifier instance GHC.Show.Show ZM.Types.Identifier instance GHC.Classes.Ord ZM.Types.Identifier instance GHC.Classes.Eq ZM.Types.Identifier instance Data.Flat.Class.Flat ZM.Types.UnicodeSymbol instance GHC.Generics.Generic ZM.Types.UnicodeSymbol instance Control.DeepSeq.NFData ZM.Types.UnicodeSymbol instance GHC.Show.Show ZM.Types.UnicodeSymbol instance GHC.Classes.Ord ZM.Types.UnicodeSymbol instance GHC.Classes.Eq ZM.Types.UnicodeSymbol instance Data.Flat.Class.Flat ZM.Types.UnicodeNumber instance GHC.Generics.Generic ZM.Types.UnicodeNumber instance Control.DeepSeq.NFData ZM.Types.UnicodeNumber instance GHC.Show.Show ZM.Types.UnicodeNumber instance GHC.Classes.Ord ZM.Types.UnicodeNumber instance GHC.Classes.Eq ZM.Types.UnicodeNumber instance Data.Flat.Class.Flat ZM.Types.UnicodeLetter instance GHC.Generics.Generic ZM.Types.UnicodeLetter instance Control.DeepSeq.NFData ZM.Types.UnicodeLetter instance GHC.Show.Show ZM.Types.UnicodeLetter instance GHC.Classes.Ord ZM.Types.UnicodeLetter instance GHC.Classes.Eq ZM.Types.UnicodeLetter instance Data.Flat.Class.Flat ZM.Types.UnicodeLetterOrNumberOrLine instance GHC.Generics.Generic ZM.Types.UnicodeLetterOrNumberOrLine instance Control.DeepSeq.NFData ZM.Types.UnicodeLetterOrNumberOrLine instance GHC.Show.Show ZM.Types.UnicodeLetterOrNumberOrLine instance GHC.Classes.Ord ZM.Types.UnicodeLetterOrNumberOrLine instance GHC.Classes.Eq ZM.Types.UnicodeLetterOrNumberOrLine instance Data.Flat.Class.Flat r => Data.Flat.Class.Flat (ZM.Types.ADTRef r) instance Data.Traversable.Traversable ZM.Types.ADTRef instance Data.Foldable.Foldable ZM.Types.ADTRef instance GHC.Base.Functor ZM.Types.ADTRef instance GHC.Generics.Generic (ZM.Types.ADTRef r) instance Control.DeepSeq.NFData r => Control.DeepSeq.NFData (ZM.Types.ADTRef r) instance GHC.Show.Show r => GHC.Show.Show (ZM.Types.ADTRef r) instance GHC.Classes.Ord r => GHC.Classes.Ord (ZM.Types.ADTRef r) instance GHC.Classes.Eq r => GHC.Classes.Eq (ZM.Types.ADTRef r) instance Data.Flat.Class.Flat (ZM.Types.SHAKE128_48 a) instance GHC.Generics.Generic (ZM.Types.SHAKE128_48 a) instance Control.DeepSeq.NFData (ZM.Types.SHAKE128_48 a) instance GHC.Show.Show (ZM.Types.SHAKE128_48 a) instance GHC.Classes.Ord (ZM.Types.SHAKE128_48 a) instance GHC.Classes.Eq (ZM.Types.SHAKE128_48 a) instance Data.Flat.Class.Flat (ZM.Types.SHA3_256_6 a) instance GHC.Generics.Generic (ZM.Types.SHA3_256_6 a) instance Control.DeepSeq.NFData (ZM.Types.SHA3_256_6 a) instance GHC.Show.Show (ZM.Types.SHA3_256_6 a) instance GHC.Classes.Ord (ZM.Types.SHA3_256_6 a) instance GHC.Classes.Eq (ZM.Types.SHA3_256_6 a) instance Data.Flat.Class.Flat [ZM.Types.UnicodeLetterOrNumberOrLine] instance Data.ListLike.String.StringLike ZM.Types.Identifier instance GHC.Exception.Exception ZM.Types.TypedDecodeException instance (Data.Flat.Class.Flat adtName, Data.Flat.Class.Flat consName, Data.Flat.Class.Flat inRef, Data.Flat.Class.Flat exRef, GHC.Classes.Ord exRef) => Data.Flat.Class.Flat (Data.Model.Types.TypeModel adtName consName inRef exRef) instance (Data.Flat.Class.Flat a, Data.Flat.Class.Flat b, Data.Flat.Class.Flat c) => Data.Flat.Class.Flat (Data.Model.Types.ADT a b c) instance (Data.Flat.Class.Flat a, Data.Flat.Class.Flat b) => Data.Flat.Class.Flat (Data.Model.Types.ConTree a b) instance (Data.Flat.Class.Flat a, Data.Flat.Class.Flat b) => Data.Flat.Class.Flat [(a, Data.Model.Types.Type b)] instance Data.Flat.Class.Flat a => Data.Flat.Class.Flat [Data.Model.Types.Type a] instance Data.Flat.Class.Flat a => Data.Flat.Class.Flat (Data.Model.Types.Type a) instance Data.Flat.Class.Flat a => Data.Flat.Class.Flat (Data.Model.Types.TypeRef a) instance (Data.Model.Class.Model a, Data.Model.Class.Model b, Data.Model.Class.Model c) => Data.Model.Class.Model (Data.Model.Types.ADT a b c) instance (Data.Model.Class.Model a, Data.Model.Class.Model b) => Data.Model.Class.Model (Data.Model.Types.ConTree a b) instance Data.Model.Class.Model a => Data.Model.Class.Model (ZM.Types.ADTRef a) instance Data.Model.Class.Model a => Data.Model.Class.Model (Data.Model.Types.Type a) instance Data.Model.Class.Model a => Data.Model.Class.Model (Data.Model.Types.TypeRef a) instance (Data.Model.Class.Model adtName, Data.Model.Class.Model consName, Data.Model.Class.Model inRef, Data.Model.Class.Model exRef) => Data.Model.Class.Model (Data.Model.Types.TypeModel adtName consName inRef exRef) instance Data.Model.Class.Model ZM.Types.Identifier instance Data.Model.Class.Model ZM.Types.UnicodeLetter instance Data.Model.Class.Model ZM.Types.UnicodeLetterOrNumberOrLine instance Data.Model.Class.Model ZM.Types.UnicodeSymbol instance Data.Model.Class.Model a => Data.Model.Class.Model (ZM.Types.SHA3_256_6 a) instance Data.Model.Class.Model a => Data.Model.Class.Model (ZM.Types.SHAKE128_48 a) instance Data.Model.Class.Model ZM.Types.AbsRef instance Data.Model.Class.Model a => Data.Model.Class.Model (Data.Flat.Filler.PostAligned a) -- | Derive absolute/canonical data type models module ZM.Abs -- | Derive an absolute type for a type, or throw an error if derivation is -- impossible absType :: Model a => Proxy a -> AbsType -- | Derive an absolute type model for a type, or throw an error if -- derivation is impossible absTypeModel :: Model a => Proxy a -> AbsTypeModel -- | Derive an absolute type model for a type, provided that: -- -- absTypeModelMaybe :: Model a => Proxy a -> Either String AbsTypeModel module ZM.BLOB -- | A BLOB is binary value encoded according to a specified encoding (e.g. -- UTF8) data BLOB encoding BLOB :: encoding -> ByteString -> BLOB encoding [encoding] :: BLOB encoding -> encoding [content] :: BLOB encoding -> ByteString -- | Build a BLOB from an encoding and a ByteString-like value blob :: AsByteString a => encoding -> a -> BLOB encoding -- | Extract the binary content of a BLOB unblob :: BLOB t -> ByteString -- | A typed value, a Flat encoded value and its absolute type data TypedBLOB TypedBLOB :: AbsType -> (BLOB FlatEncoding) -> TypedBLOB -- | Build a TypedBLOB out of a value typedBLOB :: forall a. (Model a, Flat a) => a -> TypedBLOB -- | Build a TypedBLOB out of a type and a value typedBLOB_ :: Flat a => AbsType -> a -> TypedBLOB -- | Type-checked extraction of a value of a known type from a decoded -- TypedBLOB untypedBLOB :: forall a. (Flat a, Model a) => Decoded TypedBLOB -> TypedDecoded a -- | A typed value, a value and its absolute type data TypedValue a TypedValue :: AbsType -> a -> TypedValue a -- | Build a TypedValue out of a value typedValue :: forall a. Model a => a -> TypedValue a -- | Type-checked extraction of a value of a known type from a decoded -- TypedValue untypedValue :: Model a => Decoded (TypedValue a) -> TypedDecoded a -- | Return a WrongType error typeErr :: AbsType -> AbsType -> TypedDecoded a instance Data.Flat.Class.Flat a => Data.Flat.Class.Flat (ZM.BLOB.TypedValue a) instance GHC.Generics.Generic (ZM.BLOB.TypedValue a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (ZM.BLOB.TypedValue a) instance GHC.Base.Functor ZM.BLOB.TypedValue instance GHC.Show.Show a => GHC.Show.Show (ZM.BLOB.TypedValue a) instance GHC.Classes.Ord a => GHC.Classes.Ord (ZM.BLOB.TypedValue a) instance GHC.Classes.Eq a => GHC.Classes.Eq (ZM.BLOB.TypedValue a) instance Data.Model.Class.Model ZM.BLOB.TypedBLOB instance Data.Flat.Class.Flat ZM.BLOB.TypedBLOB instance GHC.Generics.Generic ZM.BLOB.TypedBLOB instance Control.DeepSeq.NFData ZM.BLOB.TypedBLOB instance GHC.Show.Show ZM.BLOB.TypedBLOB instance GHC.Classes.Ord ZM.BLOB.TypedBLOB instance GHC.Classes.Eq ZM.BLOB.TypedBLOB instance Data.Flat.Class.Flat encoding => Data.Flat.Class.Flat (ZM.BLOB.BLOB encoding) instance GHC.Generics.Generic (ZM.BLOB.BLOB encoding) instance Control.DeepSeq.NFData encoding => Control.DeepSeq.NFData (ZM.BLOB.BLOB encoding) instance GHC.Classes.Ord encoding => GHC.Classes.Ord (ZM.BLOB.BLOB encoding) instance GHC.Classes.Eq encoding => GHC.Classes.Eq (ZM.BLOB.BLOB encoding) instance Data.Model.Class.Model encoding => Data.Model.Class.Model (ZM.BLOB.BLOB encoding) instance GHC.Show.Show encoding => GHC.Show.Show (ZM.BLOB.BLOB encoding) -- | Utilities to operate on the absolute type model module ZM.Transform -- | A map of fully applied types to the corresponding saturated -- constructor tree type MapTypeTree = Map (Type AbsRef) (ConTree Identifier AbsRef) -- | Return the map of types to saturated constructor trees corresponding -- to the type model typeTree :: AbsTypeModel -> MapTypeTree -- | Convert a type to an equivalent concrete ADT whose variables have been -- substituted by the type parameters (e.g. Maybe Bool -> Maybe = -- Nothing | Just Bool) solvedADT :: (Ord ref, Show ref) => Map ref (ADT name consName (ADTRef ref)) -> Type ref -> ADT name consName ref -- | Convert references in an absolute definition to their textual form -- (useful for display) stringADT :: AbsEnv -> AbsADT -> ADT Identifier Identifier (TypeRef Identifier) -- | Return all the ADTs referred, directly or indirectly, by the provided -- type, and defined in the provided environment typeDefinition :: AbsEnv -> AbsType -> Either String [AbsADT] -- | Return all the ADTs referred, directly or indirectly, by the ADT -- identified by the provided reference, and defined in the provided -- environment adtDefinition :: AbsEnv -> AbsRef -> Either String [AbsADT] -- | Return the list of references found in the ADT definition innerReferences :: AbsADT -> [AbsRef] -- | Return the list of references found in the absolute type references :: AbsType -> [AbsRef] -- | Return an external reference, if present getADTRef :: ADTRef a -> Maybe a -- | Dynamical decoding of serialised typed values module ZM.Dynamic -- | Decode a Flat encoded value with a known type model to the -- corresponding Value decodeAbsTypeModel :: AbsTypeModel -> ByteString -> Decoded Value -- | Returns a decoder for the type defined by the given model typeDecoder :: AbsTypeModel -> Get Value -- | Returns decoders for all types in the given model typeDecoderMap :: AbsTypeModel -> MapTypeDecoder -- | A mapping between references to absolute types and the corresponding -- decoder type MapTypeDecoder = Map (Type AbsRef) (Get Value) -- | Pretty instances for some basic Haskell types and for data type models module ZM.Pretty -- | Display a Word in hexadecimal format hex :: Word8 -> String -- | Convert the textual representation of a hash code to its equivalent -- value unPrettyRef :: String -> SHAKE128_48 a -- | Display a list of Docs, with spaced elements -- --
--   >>> prettyList (map pPrint [11,22,33::Word8])
--   [11, 22, 33]
--   
prettyList :: [Doc] -> Doc -- | Display a list of Docs, as a tuple with spaced elements -- --
--   >>> prettyTuple (map pPrint [11,22,33::Word8])
--   (11, 22, 33)
--   
prettyTuple :: [Doc] -> Doc instance Text.PrettyPrint.HughesPJClass.Pretty ZM.Types.TypedDecodeException instance GHC.Show.Show a => Text.PrettyPrint.HughesPJClass.Pretty (ZM.BLOB.TypedValue a) instance Text.PrettyPrint.HughesPJClass.Pretty ZM.Types.AbsTypeModel instance Text.PrettyPrint.HughesPJClass.Pretty ZM.Types.AbsEnv instance Text.PrettyPrint.HughesPJClass.Pretty (ZM.Types.AbsEnv, ZM.Types.AbsType) instance Text.PrettyPrint.HughesPJClass.Pretty (ZM.Types.AbsEnv, ZM.Types.AbsADT) instance Text.PrettyPrint.HughesPJClass.Pretty ZM.Types.Identifier instance Text.PrettyPrint.HughesPJClass.Pretty a => Text.PrettyPrint.HughesPJClass.Pretty (GHC.Base.String, ZM.Types.ADTRef a) instance Text.PrettyPrint.HughesPJClass.Pretty a => Text.PrettyPrint.HughesPJClass.Pretty (ZM.Types.ADTRef a) instance Text.PrettyPrint.HughesPJClass.Pretty ZM.Types.AbsRef instance Text.PrettyPrint.HughesPJClass.Pretty a => Text.PrettyPrint.HughesPJClass.Pretty (ZM.Types.SHA3_256_6 a) instance Text.PrettyPrint.HughesPJClass.Pretty a => Text.PrettyPrint.HughesPJClass.Pretty (ZM.Types.SHAKE128_48 a) instance Text.PrettyPrint.HughesPJClass.Pretty a => Text.PrettyPrint.HughesPJClass.Pretty (Data.Sequence.Seq a) instance Text.PrettyPrint.HughesPJClass.Pretty a => Text.PrettyPrint.HughesPJClass.Pretty (ZM.Type.NonEmptyList.NonEmptyList a) instance (Text.PrettyPrint.HughesPJClass.Pretty a, Text.PrettyPrint.HughesPJClass.Pretty l) => Text.PrettyPrint.HughesPJClass.Pretty (ZM.Types.Label a l) instance Text.PrettyPrint.HughesPJClass.Pretty ZM.Type.BLOB.NoEncoding instance Text.PrettyPrint.HughesPJClass.Pretty encoding => Text.PrettyPrint.HughesPJClass.Pretty (ZM.BLOB.BLOB encoding) instance Text.PrettyPrint.HughesPJClass.Pretty (ZM.BLOB.BLOB ZM.Type.BLOB.UTF8Encoding) instance Text.PrettyPrint.HughesPJClass.Pretty (ZM.BLOB.BLOB ZM.Type.BLOB.UTF16LEEncoding) instance Text.PrettyPrint.HughesPJClass.Pretty Data.Text.Internal.Text instance Text.PrettyPrint.HughesPJClass.Pretty Data.Flat.Types.UTF8Text instance Text.PrettyPrint.HughesPJClass.Pretty Data.Flat.Types.UTF16Text instance Text.PrettyPrint.HughesPJClass.Pretty GHC.Types.Word instance Text.PrettyPrint.HughesPJClass.Pretty GHC.Word.Word8 instance Text.PrettyPrint.HughesPJClass.Pretty GHC.Word.Word16 instance Text.PrettyPrint.HughesPJClass.Pretty GHC.Word.Word32 instance Text.PrettyPrint.HughesPJClass.Pretty GHC.Word.Word64 instance Text.PrettyPrint.HughesPJClass.Pretty GHC.Int.Int8 instance Text.PrettyPrint.HughesPJClass.Pretty GHC.Int.Int16 instance Text.PrettyPrint.HughesPJClass.Pretty GHC.Int.Int32 instance Text.PrettyPrint.HughesPJClass.Pretty GHC.Int.Int64 instance Text.PrettyPrint.HughesPJClass.Pretty Data.ByteString.Internal.ByteString instance Text.PrettyPrint.HughesPJClass.Pretty Data.ByteString.Lazy.Internal.ByteString instance Text.PrettyPrint.HughesPJClass.Pretty Data.ByteString.Short.Internal.ShortByteString instance (Text.PrettyPrint.HughesPJClass.Pretty a, Text.PrettyPrint.HughesPJClass.Pretty b) => Text.PrettyPrint.HughesPJClass.Pretty (Data.Map.Base.Map a b) instance (Text.PrettyPrint.HughesPJClass.Pretty a, Text.PrettyPrint.HughesPJClass.Pretty b, Text.PrettyPrint.HughesPJClass.Pretty c, Text.PrettyPrint.HughesPJClass.Pretty d, Text.PrettyPrint.HughesPJClass.Pretty e, Text.PrettyPrint.HughesPJClass.Pretty f, Text.PrettyPrint.HughesPJClass.Pretty g, Text.PrettyPrint.HughesPJClass.Pretty h, Text.PrettyPrint.HughesPJClass.Pretty i) => Text.PrettyPrint.HughesPJClass.Pretty (a, b, c, d, e, f, g, h, i) -- | Pretty Instance for Value (displays a Value as the corresponding -- Haskell value) module ZM.Pretty.Value instance Data.Model.Class.Model ZM.Pretty.Value.Any instance GHC.Generics.Generic ZM.Pretty.Value.Any instance Text.PrettyPrint.HughesPJClass.Pretty ZM.Types.Value module ZM