Re: readFile close behaviour

2001-10-11 Thread Alastair David Reid


Simon Marlow [EMAIL PROTECTED] writes:
 The upshot is that while GHC might notice that you have dropped a
 Handle, another implementation which doesn't do black holing, stack
 stubbing, strictness analysis, GC evaluation of selector thunks or
 any of the other tricks we do to avoid space leaks might not notice.

Maybe I'm confused but I thought the original complaint was that GHC
(which plays all these tricks) was leaking objects (file descriptors)
worse than Hugs (which plays very few of these tricks).

-- 
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



HDirect - Make install on Win32

2001-10-11 Thread Mike Thomas

Hi there.

Trivial comments about things that can make builds smoother:

Make install in CVS HDirect doesn't copy WideString.hs and WideString.hi to
the target directory.

It copies the *.hi files to share rather than imports/com.

It copies lib*.a to lib rather than ghc/ghc-5.02.

Cheers

Mike Thomas.


___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: hGetContents bug?

2001-10-11 Thread Keith Wansbrough

 I'll get a strange result if the file contains the character 1A-hexadecimal
 (or 26-decimal): all characters beyond this point won't be printed on the
 screen.

I think this is correct behaviour for a text file under
Windows/DOS... you should open the file as binary instead.

--KW 8-)


___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



Re: Help in calling Haskell from C

2001-10-11 Thread Mark Conway Wirt

On Tue, Aug 14, 2001 at 11:28:57AM -0700, Sigbjorn Finne wrote:
 Hi,
 
 the 0.17 documentation (and examples) wasn't updated to cover
 the extra argument that startupHaskell() now takes, I'm afraid.
 Attached is a version of tst.c from examples/server/ which shows
 you how to now use startupHaskell() from C.

Now that 5.02 is out, I was able to get this to work with hdirect 0.18.
However, there was a slight glitch.

The sample code contained the following:

   extern void* __init_MathLibProxy;

and

  startupHaskell(argc,argv,__init_MathLibProxy);

When I tried to link the code, __init_MathLibProxy came up
undefined.  In looking though the library produced, __init_MathLibProxy
was in fact missing.  However, there was a
__stginit_MathLibProxy, and when I changed the code to startup
using that symbol, the code worked as it should.

Don't know if I was doing anything wrong, but I though I'd mention
it in case anyone else was having problems.

--Mark

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



monad comrehension query

2001-10-11 Thread Amit Garg

Hello.

Is list-like monad comprehension not supported? Is there a simple 
elegant way of expressing ghc-extended pattern matching using `do'
notation instead of list comprehension? (I dont want to end up using the
case statement).

I still dont understand monads too well so i apologize if this is a silly
question.

Thanks,
-Amit.


---
Amit Garg   |  Office:  ACES 6SEo4E
Graduate Student|  Phone :  (512) 232-7875
Computer Sciences   |  Res   :  2000 Pearl St. #207
University of Texas at Austin   |  Phone :  (512) 560-6970
   Homepage: http://www.cs.utexas.edu/~amitji
---




___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



Re: monad comrehension query

2001-10-11 Thread Amit Garg

Er, i found the relevant discussion thread
http://www.mail-archive.com/haskell@haskell.org/msg03115.html.
Also i perceive that i should be able to use the rewrite rules to achieve
what i want. Thanks.

-Amit.

---
Amit Garg   |  Office:  ACES 6SEo4E
Graduate Student|  Phone :  (512) 232-7875
Computer Sciences   |  Res   :  2000 Pearl St. #207
University of Texas at Austin   |  Phone :  (512) 560-6970
   Homepage: http://www.cs.utexas.edu/~amitji
---


On Thu, 11 Oct 2001, Amit Garg wrote:

 Hello.

 Is list-like monad comprehension not supported? Is there a simple 
 elegant way of expressing ghc-extended pattern matching using `do'
 notation instead of list comprehension? (I dont want to end up using the
 case statement).

 I still dont understand monads too well so i apologize if this is a silly
 question.

 Thanks,
 -Amit.


 ---
 Amit Garg |  Office:  ACES 6SEo4E
 Graduate Student  |  Phone :  (512) 232-7875
 Computer Sciences |  Res   :  2000 Pearl St. #207
 University of Texas at Austin |  Phone :  (512) 560-6970
Homepage: http://www.cs.utexas.edu/~amitji
 ---




 ___
 Glasgow-haskell-users mailing list
 [EMAIL PROTECTED]
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



Re: hGetContents bug?

2001-10-11 Thread Keith Wansbrough

 I'll get a strange result if the file contains the character 1A-hexadecimal
 (or 26-decimal): all characters beyond this point won't be printed on the
 screen.

I think this is correct behaviour for a text file under
Windows/DOS... you should open the file as binary instead.

--KW 8-)


___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



code for exercise 4.10

2001-10-11 Thread rock dwan

Iam having some difficulties doing exercise 4.10 from craft of fucntional 
programming book ..is their a possible solution for this ?

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: code for exercise 4.10

2001-10-11 Thread Marc van Dongen

rock dwan ([EMAIL PROTECTED]) wrote:

: Iam having some difficulties doing exercise 4.10 from craft of fucntional 
: programming book ..is their a possible solution for this ?

Can we please move this thread to the haskell cafe?

Thanks in advance,


Marc van Dongen

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Namespaces

2001-10-11 Thread Johan Nordlander

On Wednesday, October 10, 2001, at 05:09  PM, Hal Daume III wrote:

 That sounds wonderful!  Is it available now?  And could it deal with
 A.B.M if M is in /A/B?  If not available now, how much longer?  :)


The new version of Hugs that supports this extension isn't yet 
released, but you can easily grab it from cvs.haskell.org and 
and try it out today.  And yes, A.B.M is searched for in 
searchpath/A/B/M.hs.

-- Johan


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: performUnsafeIO

2001-10-11 Thread matt hellige

[Sebastian Schulz [EMAIL PROTECTED]]
 hi.
 
 I need to extract an IO String to String.
 Remembering some  function like 'performUnsafeIO :: IO a - a', I searched the hugs 
libs, 
 but without a match.
 
 Does a function like this still exists? Or how can I transform IO a to a?
 

it's called unsafePerformIO, but i'm forced to ask: are you really
sure it's what you want? ;)

what are you trying to do? 

matt

-- 
matt hellige  [EMAIL PROTECTED]
http://matt.immute.net

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe



Re: help for exercise 4.10

2001-10-11 Thread Mark Carroll

On Fri, 12 Oct 2001, rock dwan wrote:

 Iam having some difficulties doing exercise 4.10 from craft of functional 
 programming book second edition ..is their a possible solution for this ?

How far have you got with it so far? I'm sure we'd prefer to help you
along instead of just giving a solution. Have you done exercise 4.9?

-- Mark


___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe



Re: performUnsafeIO

2001-10-11 Thread Ashley Yakeley

At 2001-10-11 11:55, Sebastian Schulz wrote:

I need to extract an IO String to String.

No!!! Don't do it. Make the final result of your Haskell calculation be 
an IO String. Then when you have a look at it, it will be automatically 
executed and you'll see the String.

-- 
Ashley Yakeley, Seattle WA


___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe