This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import System.IO.MMap | |
import qualified Data.ByteString.Lazy as BL | |
somedata:: IO BL.ByteString | |
somedata = mmapFileByteStringLazy "some.data" Nothing | |
main = somedata >>= return . show . BL.last >>= putStrLn | |
{- some.data file is 1625424 bytes long (in case that matters) |