diff --git a/README.md b/README.md
index 568de9d..5f0d00e 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,13 @@
Cuddle is a library for generating and manipulating [CDDL](https://datatracker.ietf.org/doc/html/rfc8610).
-
-
-
-
-
+| Language | Github Actions | Coveralls |
+|:--------:|:--------------:|:---------:|
+|  | [](https://github.com/input-output-hk/cuddle/actions/workflows/ci.yaml) | [](https://coveralls.io/github/input-output-hk/cuddle?branch=master)
+
+| Github Repo | Hackage | Nightly | LTS |
+|:-------------------|:-------:|:-------:|:---:|
+| [`cuddle`](https://github.com/input-output-hk/cuddle)| [](https://hackage.haskell.org/package/cuddle)| [](https://www.stackage.org/nightly/package/cuddle)| [](https://www.stackage.org/lts/package/cuddle)
## Supported features
diff --git a/cuddle.cabal b/cuddle.cabal
index 63e7d0d..4b07e5a 100644
--- a/cuddle.cabal
+++ b/cuddle.cabal
@@ -1,6 +1,6 @@
cabal-version: 3.4
name: cuddle
-version: 1.0.0.0
+version: 1.1.0.0
synopsis: CDDL Generator and test utilities
description:
Cuddle is a library for generating and manipulating [CDDL](https://datatracker.ietf.org/doc/html/rfc8610).
@@ -22,16 +22,14 @@ category: Codec
build-type: Simple
extra-doc-files: CHANGELOG.md
tested-with: ghc ==9.6 || ==9.8 || ==9.10 || ==9.12
+data-files:
+ example/cddl-files/*.cddl
+ example/cddl-files/validator/negative/*.cddl
source-repository head
type: git
location: https://github.com/input-output-hk/cuddle
-source-repository this
- type: git
- location: https://github.com/input-output-hk/cuddle
- tag: cuddle-0.5.0.0
-
flag example
description: Enable the example executable
manual: True
@@ -134,6 +132,7 @@ test-suite cuddle-test
import: warnings
default-language: GHC2021
other-modules:
+ Paths_cuddle
Test.Codec.CBOR.Cuddle.CDDL.Examples
Test.Codec.CBOR.Cuddle.CDDL.Gen
Test.Codec.CBOR.Cuddle.CDDL.Parser
diff --git a/stack.yaml b/stack.yaml
index 9d3274a..03ddb11 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -3,6 +3,6 @@ system-ghc: true
packages:
- .
extra-deps:
-- capability-0.5.0.1@sha256:3b3fa095891573bbdff854bf8351c3fcfa986d502c8071a2e4a2686ff3819302,3287
+- capability-0.5.0.1@sha256:fa45f434f7c908fc98311306c26d2d9286a244193b6dd4e97a4e228a9f6119bf,3287
- data-default-class-0.2.0.0@sha256:788dc5c0be3981ca83ad11206e300a77ae8a1c8b9bc4f9630f563d37f540ccbd,728
- data-default-0.8.0.1@sha256:536ff91641a39b8ad302eebceff767d86ec6b543b44b1db9104650a2b1bc63bd,1110
diff --git a/test/Test/Codec/CBOR/Cuddle/CDDL/Examples.hs b/test/Test/Codec/CBOR/Cuddle/CDDL/Examples.hs
index 6845565..1d2f81e 100644
--- a/test/Test/Codec/CBOR/Cuddle/CDDL/Examples.hs
+++ b/test/Test/Codec/CBOR/Cuddle/CDDL/Examples.hs
@@ -13,6 +13,7 @@ import Codec.CBOR.Cuddle.CDDL.Resolve (
)
import Codec.CBOR.Cuddle.Parser (pCDDL)
import Data.Text.IO qualified as T
+import Paths_cuddle (getDataFileName)
import Test.HUnit (assertFailure)
import Test.Hspec
import Text.Megaparsec (parse)
@@ -20,7 +21,8 @@ import Text.Megaparsec.Error (errorBundlePretty)
tryValidateFile :: FilePath -> IO (Either NameResolutionFailure (CTreeRoot MonoReferenced))
tryValidateFile filePath = do
- contents <- T.readFile filePath
+ absoluteFilePath <- getDataFileName filePath
+ contents <- T.readFile absoluteFilePath
cddl <- case parse pCDDL "" contents of
Right x -> pure $ prependPrelude x
Left x -> fail $ "Failed to parse the file:\n" <> errorBundlePretty x