Created
April 10, 2013 14:31
-
-
Save anonymous/5355148 to your computer and use it in GitHub Desktop.
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) | |
- the code crashes with a nasty segfault | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment