[Hugs] #29: WinHugs: $$ last value doesn't work
#29: WinHugs: $$ last value doesn't work ---------------------+------------------------------------------------------ Reporter: neil | Owner: neil Type: defect | Status: new Priority: major | Milestone: next release Component: winhugs | Version: 200605 Keywords: | ---------------------+------------------------------------------------------ I just installed the May 2006 release of Hugs. When I use the command-line version, the '$$' symbol to reference the last expression works fine. It does not work in WinHugs, but yields 'ERROR - Syntax error in expression (unexpected symbol "$$")'. I typed ':set' to verify the '-r$$' option was set properly. It works with hugs on Windows, and with Hugs on Linux, just not winhugs. -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/29 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell
#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: -----------------------+---------------------------------------------------- Changes (by neil): * priority: major => critical -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/29 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell
#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
#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 ross): In the case of SCRIPTFILE it's not clear what it should mean, and it would steal an identifier. For example, with the default setting ($$), {{{Text.PrettyPrint.HughesPJ}}} would fail to load. It looks like doing it for STRING should be OK, though. -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/29 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell
#29: WinHugs: $$ last value doesn't work -----------------------+---------------------------------------------------- Reporter: neil | Owner: neil Type: defect | Status: closed Priority: critical | Milestone: next release Component: winhugs | Version: 200605 Resolution: fixed | Keywords: -----------------------+---------------------------------------------------- Changes (by neil): * resolution: => fixed * status: new => closed Comment: Now reading==KEYBOARD or reading==STRING detects the repeat string, plus {{{HughesPJ}}} still works fine. -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/29 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell
participants (1)
-
Hugs