module Profiteur.DataFile ( includeFile, module Profiteur.DataFile.Internal ) where import Paths_profiteur (getDataFileName) import System.IO (Handle) import qualified Data.ByteString.Lazy as BL import qualified Language.Javascript.JQuery as JQuery import Profiteur.DataFile.Internal includeFile :: Handle -> DataType -> IO () includeFile :: Handle -> DataType -> IO () includeFile Handle h DataType JQueryFile = Handle -> ByteString -> IO () BL.hPutStr Handle h (ByteString -> IO ()) -> IO ByteString -> IO () forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< FilePath -> IO ByteString BL.readFile (FilePath -> IO ByteString) -> IO FilePath -> IO ByteString forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< IO FilePath JQuery.file includeFile Handle h (DataFile FilePath filePath) = Handle -> ByteString -> IO () BL.hPutStr Handle h (ByteString -> IO ()) -> IO ByteString -> IO () forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< FilePath -> IO ByteString BL.readFile (FilePath -> IO ByteString) -> IO FilePath -> IO ByteString forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< FilePath -> IO FilePath getDataFileName FilePath filePath