| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Codec.Candid.TestExports
Description
This modules exports internals soley for the purpose of importing them in the test suite
Synopsis
- data DidFile = DidFile {}
- data DidMethod a = DidMethod {
- methodName :: Text
- methodParams :: [Type a]
- methodResults :: [Type a]
- data TestAssertion
- data TestInput
- data CandidTest a = CandidTest {
- testLine :: Int
- testAssertion :: TestAssertion
- testType :: [Type a]
- testDesc :: Maybe Text
- data CandidTestFile = CandidTestFile {
- testDefs :: [DidDef TypeName]
- testTests :: [CandidTest TypeName]
- parseCandidTests :: String -> String -> Either String CandidTestFile
- generateCandidDefs :: [DidDef TypeName] -> Q ([Dec], TypeName -> Q Name)
- candidTypeQ :: [Type Name] -> TypeQ
Documentation
A candid service, as a list of methods with argument and result types
(no support for annotations like query yet)
Constructors
| DidMethod | |
Fields
| |
Instances
| Functor DidMethod Source # | |
| Foldable DidMethod Source # | |
Defined in Codec.Candid.Types Methods fold :: Monoid m => DidMethod m -> m # foldMap :: Monoid m => (a -> m) -> DidMethod a -> m # foldMap' :: Monoid m => (a -> m) -> DidMethod a -> m # foldr :: (a -> b -> b) -> b -> DidMethod a -> b # foldr' :: (a -> b -> b) -> b -> DidMethod a -> b # foldl :: (b -> a -> b) -> b -> DidMethod a -> b # foldl' :: (b -> a -> b) -> b -> DidMethod a -> b # foldr1 :: (a -> a -> a) -> DidMethod a -> a # foldl1 :: (a -> a -> a) -> DidMethod a -> a # toList :: DidMethod a -> [a] # length :: DidMethod a -> Int # elem :: Eq a => a -> DidMethod a -> Bool # maximum :: Ord a => DidMethod a -> a # minimum :: Ord a => DidMethod a -> a # | |
| Traversable DidMethod Source # | |
Defined in Codec.Candid.Types | |
| Eq a => Eq (DidMethod a) Source # | |
| Show a => Show (DidMethod a) Source # | |
| Pretty a => Pretty (DidMethod a) Source # | |
Defined in Codec.Candid.Types | |
data TestAssertion Source #
Constructors
| FromTextual Text | |
| FromBinary ByteString |
data CandidTest a Source #
Constructors
| CandidTest | |
Fields
| |
Instances
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