[Haskell-cafe] Haskore
David Curran
david.curran at gmail.com
Fri Sep 22 05:40:31 EDT 2006
Hi
I have been trying to learn haskell (tip over the vending machine) for
a while and eventually decided the Haskore music library might be a
good way to start understating the language.
I am using windows and hugs98. The IOExtensions.hs file will not work
under windows. Any ideas on how to make it work or is this library
*nix only?
Regards
David
-----------------------------------------------------------------------------
--
-- Replacement for IOExtensions.hs of hugs for ghc
--
-- Implements only the functions necessary for Haskore!
--
-- Does not work under Windows (where there is a difference between
-- binary and text files)
--
-- Suitable for use with Hugs 98
-----------------------------------------------------------------------------
module IOExtensions(
writeBinaryFile,
openBinaryFile, readBinaryFile
) where
import System( getArgs )
import IO( Handle, IOMode(WriteMode), openFile, hPutStr, hClose )
import IOExts
openBinaryFile :: FilePath -> IOMode -> IO Handle
openBinaryFile path mode = openFileEx path (BinaryMode mode)
writeBinaryFile :: FilePath -> String -> IO ()
writeBinaryFile = writeFile -- this does not work
on Windows!!!
readBinaryFile :: FilePath -> IO String
readBinaryFile = readFile -- this does not work
on Windows!!!
--
It chews up lies and spits out the gristle of truth
http://liveatthewitchtrials.blogeasy.com/
More information about the Haskell-Cafe
mailing list