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
Wy not load the list as program? E.g.
list1 =
["word1"
,"word2"
,"word3"
]
list2 = words "word1 word2 word3"
list3 = words
"\
\ word1\
\ word2\
\ word3\
\"
John Atwood
-
Lars Lundgren wrote:
On Wed, 26 Apr 2000, Hamilton Richards wrote:
The
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