|
3 | 3 | module Test.Codec.CBOR.Cuddle.CDDL.Examples (spec) where
|
4 | 4 |
|
5 | 5 | import Codec.CBOR.Cuddle.CDDL (Value (..), ValueVariant (..))
|
6 |
| -import Codec.CBOR.Cuddle.CDDL.CTree (CTree (..), CTreeRoot') |
| 6 | +import Codec.CBOR.Cuddle.CDDL.CTree (CTree (..), CTreeRoot) |
7 | 7 | import Codec.CBOR.Cuddle.CDDL.Postlude (PTerm (..))
|
8 | 8 | import Codec.CBOR.Cuddle.CDDL.Prelude (prependPrelude)
|
9 | 9 | import Codec.CBOR.Cuddle.CDDL.Resolve (
|
10 |
| - MonoRef, |
| 10 | + MonoReferenced, |
11 | 11 | NameResolutionFailure (..),
|
12 |
| - OrRef (..), |
13 | 12 | fullResolveCDDL,
|
14 | 13 | )
|
15 | 14 | import Codec.CBOR.Cuddle.Parser (pCDDL)
|
16 |
| -import Data.Functor.Identity (Identity) |
17 | 15 | import Data.Text.IO qualified as T
|
18 | 16 | import Test.HUnit (assertFailure)
|
19 | 17 | import Test.Hspec
|
20 | 18 | import Text.Megaparsec (parse)
|
21 | 19 | import Text.Megaparsec.Error (errorBundlePretty)
|
22 | 20 |
|
23 |
| -tryValidateFile :: FilePath -> IO (Either NameResolutionFailure (CTreeRoot' Identity MonoRef)) |
| 21 | +tryValidateFile :: FilePath -> IO (Either NameResolutionFailure (CTreeRoot MonoReferenced)) |
24 | 22 | tryValidateFile filePath = do
|
25 | 23 | contents <- T.readFile filePath
|
26 | 24 | cddl <- case parse pCDDL "" contents of
|
@@ -60,4 +58,4 @@ spec = do
|
60 | 58 | validateExpectFailure "example/cddl-files/validator/negative/too-many-args.cddl" $
|
61 | 59 | MismatchingArgs "foo" ["a"]
|
62 | 60 | validateExpectFailure "example/cddl-files/validator/negative/args-to-postlude.cddl" $
|
63 |
| - ArgsToPostlude PTUInt [It (Literal (Value (VUInt 3) mempty))] |
| 61 | + ArgsToPostlude PTUInt [Literal (Value (VUInt 3) mempty)] |
0 commit comments