candid-0.4.0.2: Candid integration
Safe HaskellSafe-Inferred
LanguageHaskell2010

Codec.Candid.TestExports

Description

This modules exports internals soley for the purpose of importing them in the test suite

Synopsis

Documentation

data DidFile Source #

Constructors

DidFile 

Fields

  • defs :: [DidDef TypeName]
     
  • service :: DidService TypeName
     

Instances

Instances details
Show DidFile Source # 
Instance details

Defined in Codec.Candid.Types

Eq DidFile Source # 
Instance details

Defined in Codec.Candid.Types

Methods

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

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

Pretty DidFile Source # 
Instance details

Defined in Codec.Candid.Types

Methods

pretty :: DidFile -> Doc ann #

prettyList :: [DidFile] -> Doc ann #

data CandidTest a Source #

Instances

Instances details
Foldable CandidTest Source # 
Instance details

Defined in Codec.Candid.Parse

Methods

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

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

foldMap' :: Monoid m => (a -> m) -> CandidTest a -> m #

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

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

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

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

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

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

toList :: CandidTest a -> [a] #

null :: CandidTest a -> Bool #

length :: CandidTest a -> Int #

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

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

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

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

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

Traversable CandidTest Source # 
Instance details

Defined in Codec.Candid.Parse

Methods

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

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

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

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

Functor CandidTest Source # 
Instance details

Defined in Codec.Candid.Parse

Methods

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

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

data CandidTestFile Source #

A candid test file

(no support for type definitions yet)

Constructors

CandidTestFile 

Fields

parseCandidTests :: String -> String -> Either String CandidTestFile Source #

Parses a candid spec test file from a string

generateCandidDefs :: Text -> [DidDef TypeName] -> Q ([Dec], TypeName -> Q Name) Source #

Turns all candid type definitions into newtypes Used, so far, only in the Candid test suite runner

invertHash :: Word32 -> Maybe Text Source #

Inversion of the Candid field label hash

unrollTypeTable :: SeqDesc -> (forall k. (Pretty k, Ord k) => [Type (Ref k Type)] -> r) -> r Source #

typeGraph :: forall a. Candid a => Type (Ref TypeRep Type) Source #