[Hugs] #29: WinHugs: $$ last value doesn't work

Hugs trac at galois.com
Fri Jul 7 18:30:28 EDT 2006


#29: WinHugs: $$ last value doesn't work
-----------------------+----------------------------------------------------
  Reporter:  neil      |       Owner:  neil        
      Type:  defect    |      Status:  new         
  Priority:  critical  |   Milestone:  next release
 Component:  winhugs   |     Version:  200605      
Resolution:            |    Keywords:              
-----------------------+----------------------------------------------------
Comment (by neil):

 The problem is in input.c, all the tests for $$ are written as:
 if (it==textRepeat && reading==KEYBOARD) ...

 The problem is that WinHugs doesn't pipe directly from the keyboard,
 its from a string buffer, i.e. reading == STRING.

 The possible values of reading are:

 #define NOTHING    0                   /* what kind of input is being
 read?*/
 #define KEYBOARD   1                   /* - keyboard/console?
 */
 #define SCRIPTFILE 2                   /* - script file
 */
 #define STRING     3                   /* - string buffer?
 */
 #define NOKEYBOARD 4                   /* - standard input, but not a tty
 */

 Without knowing the exact purpose of this check, its hard to know how
 to modify it for WinHugs. Can I just do reading == KEYBOARD || reading
 == STRING? Is there a particular reason that you can't use $$ in a
 SCRIPTFILE? Is reading == KEYBOARD required?

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


More information about the Hugs-Bugs mailing list