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" [FilePath] -> IO [FilePath] forall a. a -> IO a forall (f :: * -> *) a. Applicative f => a -> f a pure [FilePath base] readShelleyCddlFiles :: IO [BSL.ByteString] readShelleyCddlFiles :: IO [ByteString] readShelleyCddlFiles = (FilePath -> IO ByteString) -> [FilePath] -> IO [ByteString] forall (t :: * -> *) (m :: * -> *) a b. (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b) forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b] mapM FilePath -> IO ByteString BSL.readFile ([FilePath] -> IO [ByteString]) -> IO [FilePath] -> IO [ByteString] forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< IO [FilePath] readShelleyCddlFileNames