The Gofer prelude had a function
openfile :: String - String
which mapped file path names to strings containing the named files' contents.
The Hugs98 Prelude doesn't seem to have anything like that function.
Instead, it has things like
readFile :: String - IO String
Why would
You could try this:
--OpenFile.hs
module OpenFile where
import IOExts
openfile :: String - String
openfile = unsafePerformIO . readFile
-- end of file
-Original Message-
From: Hamilton Richards [mailto:[EMAIL PROTECTED]]
Sent: 26 April 2000 14:04
To: [EMAIL PROTECTED]
Subject
On Wed, 26 Apr 2000, Hamilton Richards wrote:
The Gofer prelude had a function
openfile :: String - String
which mapped file path names to strings containing the named files' contents.
The Hugs98 Prelude doesn't seem to have anything like that function.
Instead, it has things
e:
On Wed, 26 Apr 2000, Hamilton Richards wrote:
The Gofer prelude had a function
openfile :: String - String
which mapped file path names to strings containing the named files' contents.
The Hugs98 Prelude doesn't seem to have anything like that function.
Instead, it has things lik
At 3:18 PM +0200 4/26/00, Lars Lundgren wrote:
[...]
Is it something like this you want?
[...]
test :: IO()
test = do tree - buildTree
list - buildList
dowhateverYouwant_interactive_or_not tree list
dowhateverYouwant_interactive_or_not :: Tree - List - IO()
Sorry, I
Angus is right on the track. I would only modify
it slightly:
content_xxx :: String
content_xxx = (unsafePerformIO . readFile) "xxx"
From Hugs perspective content_xxx is a constant.
Your may easily demonstrate it this way:
:!echo blah