Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file: -- http://angg.twu.net/HASKELL/readwritefile.hs.html -- http://angg.twu.net/HASKELL/readwritefile.hs -- (find-angg "HASKELL/readwritefile.hs") -- Author: Eduardo Ochs <eduardoochs@gmail.com> -- -- (defun e () (interactive) (find-angg "HASKELL/readwritefile.hs")) -- (require 'haskell-mode) -- (define-key haskell-mode-map "\C-ch" 'haskell-hoogle) -- (setq haskell-hoogle-command "hoogle") -- (find-evardescr 'haskell-hoogle-command) -- (find-evariable 'haskell-hoogle-command) -- (find-es "haskell" "System.IO") import System.IO import System.Directory writeFilein :: String -> IO () writeFilein xs = do curPath <- getCurrentDirectory createDirectoryIfMissing False (curPath ++ "\\temp") absPath <- makeAbsolute "\\temp" writeFile (absPath ++ "\\in.txt") xs readFileout :: IO () readFileout = do absPath <- makeAbsolute "\\temp\\out.txt" xs <- (readFile absPath) print xs {- -- (find-hoogle "writeFile") -- (find-hoogle "readFile") * (eepitch-ghci) * (eepitch-kill) * (eepitch-ghci) * (find-sh0 "echo foo > /tmp/o2") * (find-sh0 "rm -v /tmp/o3") :load readwritefile.hs readFile "/tmp/o2" writeFile "/tmp/o3" "bla" readFile "/tmp/o3" comment-start * comment-start * forward-sexp-function * haskell-sexp-function -} -- Local Variables: -- coding: utf-8-unix -- End: