Skip to content

Instantly share code, notes, and snippets.

@exarkun
Last active February 24, 2023 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exarkun/76ae15b90c3aec2c3a61e1412c1eaf7e to your computer and use it in GitHub Desktop.
Save exarkun/76ae15b90c3aec2c3a61e1412c1eaf7e to your computer and use it in GitHub Desktop.
ev <- performEvent $ ffor pb $ \_ -> liftIO $ do
p <- getFilesDir
case p of
Nothing -> pure Nothing
Just p' -> do
writeFile (p' <> "/" <> "somedata.txt") "Hello, world!"
content <- deepseq <$> readFile (p' <> "/" <> "somedata.txt")
pure (Just (p', content))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment