File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
testlib/Test/Cardano/Chain/Binary Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ description: The blockchain layer of Cardano during the Byron era
99category : Currency
1010build-type : Simple
1111data-files :
12+ cddl-spec/byron.cddl
1213 golden/cbor/block/BlockSignature
1314 golden/cbor/block/Body
1415 golden/cbor/block/BoundaryBlockHeader
@@ -265,6 +266,7 @@ library
265266
266267library testlib
267268 exposed-modules :
269+ Test.Cardano.Chain.Binary.Cddl
268270 Test.Cardano.Chain.Block.CBOR
269271 Test.Cardano.Chain.Block.Gen
270272 Test.Cardano.Chain.Block.Model
Original file line number Diff line number Diff line change 1+ {-# LANGUAGE ImplicitPrelude #-}
2+
3+ module Test.Cardano.Chain.Binary.Cddl (
4+ readByronCddlFileNames ,
5+ readByronCddlFiles ,
6+ ) where
7+
8+ import qualified Data.ByteString.Lazy as BSL
9+ import Paths_cardano_ledger_byron
10+
11+ readByronCddlFileNames :: IO [FilePath ]
12+ readByronCddlFileNames = do
13+ base <- getDataFileName " cddl-spec/byron.cddl"
14+ pure [base]
15+
16+ readByronCddlFiles :: IO [BSL. ByteString ]
17+ readByronCddlFiles = mapM BSL. readFile =<< readByronCddlFileNames
You can’t perform that action at this time.
0 commit comments