module Test.Cardano.Ledger.Shelley.Binary.Cddl (
  readShelleyCddlFileNames,
  readShelleyCddlFiles,
) where

import qualified Data.ByteString.Lazy as BSL
import Paths_cardano_ledger_shelley

readShelleyCddlFileNames :: IO [FilePath]
readShelleyCddlFileNames :: IO [FilePath]
readShelleyCddlFileNames = do
  FilePath
base <- FilePath -> IO FilePath
getDataFileName FilePath
"cddl-files/shelley.cddl"
  -- extras contains the types whose restrictions cannot be expressed in CDDL
  forall (f :: * -> *) a. Applicative f => a -> f a
pure [FilePath
base]

readShelleyCddlFiles :: IO [BSL.ByteString]
readShelleyCddlFiles :: IO [ByteString]
readShelleyCddlFiles = forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM FilePath -> IO ByteString
BSL.readFile forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< IO [FilePath]
readShelleyCddlFileNames