./T and ./T >& log

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sat Feb 21 00:53:12 EST 2009


On 2009 Feb 20, at 4:38, Serge D. Mechveliani wrote:
> The first command outputs
>
>  ---------------------------------
>    t =  ((a : nil) + (b : nil))
>  Bug:
>  substitute {(X, a), (Xs, nil), (Ys, (b : nil))} X:
>  sort mismatch in substitution
>  ---------------------------------
>
> And the second command skips (in  ./log) the line of   t = ...
> Who can tell what is the matter?

The ghc runtime doesn't flush stdout when an exception stops the  
program.  This is arguably a bug in the runtime; if you set stdout to  
line buffering or no buffering you should get pretty much the same  
output from both.  (It's still possible for buffering to cause lines  
to come out in a different order, so you might prefer unbuffered).

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20090221/2f512eb0/PGP.bin


More information about the Glasgow-haskell-users mailing list