[Hugs] #87: Strange writeFile behaviour

Hugs trac at galois.com
Fri Nov 28 05:21:23 EST 2008


#87: Strange writeFile behaviour
--------------------+-------------------------------------------------------
 Reporter:  guest   |       Owner:  nobody
     Type:  defect  |      Status:  new   
 Priority:  major   |   Milestone:        
Component:  hugs    |     Version:  200609
 Keywords:          |  
--------------------+-------------------------------------------------------
 I don't understand the following behaviour of writeFile in Hugs.  GHCi
 does what I would expect.  Any help would be greatly appreciated!

 Matthew Naylor (`mfn at cs.york.ac.uk`)

 {{{
 mfn at pc093:/tmp$ ghci
 GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
 Loading package base ... linking ... done.
 Prelude> writeFile "foo.txt" [toEnum 128]
 Prelude> Leaving GHCi.
 mfn at pc093:/tmp$ wc -c foo.txt
 1 foo.txt
 mfn at pc093:/tmp$ rm foo.txt
 mfn at pc093:/tmp$ hugs
 __   __ __  __  ____   ___      _________________________________________
 ||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
 ||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
 ||---||         ___||           World Wide Web: http://haskell.org/hugs
 ||   ||                         Report bugs to: hugs-bugs at haskell.org
 ||   || Version: May 2006       _________________________________________

 Haskell 98 mode: Restart with command line option -98 to enable extensions

 Type :? for help
 Hugs> writeFile "foo.txt" [toEnum 128]
 Hugs> [Leaving Hugs]
 mfn at pc093:/tmp$ wc -c foo.txt
 2 foo.txt
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/87>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell


More information about the Hugs-Bugs mailing list