3 import Control.Monad.IO.Class (MonadIO(..))
4 import Data.Eq (Eq(..))
5 import Data.Functor ((<$>))
6 import Data.Text (Text)
7 import System.IO (IO, FilePath, hPrint, stderr)
8 import Text.Show (Show(..))
9 import qualified Data.ByteString as BS
10 import qualified Data.Map.Strict as Map
11 import qualified Data.Text.Encoding as Enc
12 -- import qualified System.FilePath as FilePath
13 import qualified Text.Megaparsec as P
16 readFile :: MonadIO m => FilePath -> (FilePath -> Text -> m a) -> m a
18 content <- Enc.decodeUtf8 <$> liftIO (BS.readFile fp)