Test releases available

Pepe Gallardo pepeg@lcc.uma.es
Wed, 19 Dec 2001 14:07:41 +0100


I have implemented what I suggested and here send you the changes to the
function startEdit in machdep.c. Maybe you can include it on the next
release ;-)


Regards,

Pepe Gallardo


/* MY CHANGES */
#if  1
    { Bool   sync = TRUE;
      String p;
      Int    i ;

      /* look for ! in the editor command */
      p = strchr(editorCmd, '!');
      if (p) {
        i = p - editorCmd;
        sync = (i>1); /* if found on the first (for example, !vim %s +%d) */
                      /* or second (for example, "!vim" %d +%d) position, */
                      /* then run in non-sync mode                        */
      }
      if (!sync)
        /* remove '!' from editorCmd */
        for(; editorCmd[i]; i++) editorCmd[i]=editorCmd[i+1];


      if (shellEsc(editorCmd,!sync/*sync*/,TRUE/*sep console*/)) {
        Printf("Warning: Editor terminated abnormally\n");
        return FALSE;
      }
      /* reload scripts when using sync mode */
      return (sync);
    }
#else
 /* OLD CODE */
c(editorCmd,TRUE/*sync*/,TRUE/*sep console*/)) {
        Printf("Warning: Editor terminated abnormally\n");
        return FALSE;
    }
    return TRUE;
#endif


----- Original Message -----
From: "Sigbjorn Finne" <sof@galois.com>
To: "Pepe Gallardo" <pepeg@lcc.uma.es>
Cc: <hugs-bugs@haskell.org>
Sent: Saturday, December 15, 2001 2:02 AM
Subject: Re: Test releases available


> Hi Pepe,
>
> thanks for the feedback. I decided not to add support for what
> you suggest, for reasons of lack of time before finalising the release,
> mostly. You can get close to the behaviour you want by exec'ing the
> following command:
>
>     Foo> :!start vim Foo.hs
>
> hopefully that's an acceptable solution.
>
> Your problems with loading Monad turned out to be a GC bug
> in disguise, which has now been fixed.
>
> --sigbjorn
>
> ----- Original Message -----
> From: "Pepe Gallardo" <pepeg@lcc.uma.es>
> To: "Sigbjorn Finne" <sof@galois.com>
> Cc: <hugs-bugs@haskell.org>
> Sent: Friday, December 14, 2001 05:08
> Subject: Re: Test releases available
>
>
> > I think that some users may like to run the editor concurrently with
hugs
> (I
> > do it with winhugs). I like it that way because I can open one instance
of
> > the editor and keep editing several files without having to close the
> editor
> > everytime I make a change to a single file.  In order to keep both modes
> > (blocking  and non-blocking read-eval-print loop) I propose appending an
> > special character (like '!') in the editor configuration to indicate the
> > desired mode. For example
> >
> > :s -Evim %s +%d
> >
> > would run vim in synchronous mode, while
> >
> > :s -E!vim %s +%d
> >
> > would run vim in asynchronous mode. In this way, only users willing to
use
> > the asynchronous mode would have to add the extra !.
> >
> >
> > I have also found some bugs with the latest test release
> >
> > 1) While loading a library that I am designing I get an extrange error
> when
> > importing the Monad lib.
> >
> > Reading file "C:\Hugs98\lib\yahu\demos\Animation\MyAnimation4.hs":
> > Reading file "c:\hugs98\lib\yahu\lib\Yahu.hs":
> > Reading file "c:\hugs98\lib\yahu\lib\FastString.hs":
> > Reading file "c:\hugs98\lib\yahu\lib\HDirect.hs":
> > Reading file "c:\hugs98\lib\yahu\lib\StdDIS.hs":
> > Reading file "c:\hugs98\lib\exts\Int.hs":
> > Reading file "c:\hugs98\lib\exts\Bits.hs":
> > Reading file "c:\hugs98\lib\exts\Int.hs":
> > Reading file "c:\hugs98\lib\exts\Word.hs":
> > Reading file "c:\hugs98\lib\Numeric.hs":
> > Reading file "c:\hugs98\lib\Char.hs":
> > Reading file "c:\hugs98\lib\Ratio.hs":
> > Reading file "c:\hugs98\lib\Array.hs":
> > Reading file "c:\hugs98\lib\Ix.hs":
> > Reading file "c:\hugs98\lib\List.hs":
> > Reading file "c:\hugs98\lib\Maybe.hs":
> > Reading file "c:\hugs98\lib\List.hs":
> > Reading file "c:\hugs98\lib\Array.hs":
> > Reading file "c:\hugs98\lib\Numeric.hs":
> > Reading file "c:\hugs98\lib\exts\Word.hs":
> > Reading file "c:\hugs98\lib\exts\Addr.hs":
> > Reading file "c:\hugs98\lib\exts\IOExts.hs":
> > Reading file "c:\hugs98\lib\IO.hs":
> > Reading file "c:\hugs98\lib\exts\IORef.lhs":
> > Reading file "c:\hugs98\lib\exts\IOExts.hs":
> > Reading file "c:\hugs98\lib\Monad.hs":
> > ERROR "c:\hugs98\lib\Monad.hs" - Substitution expanding too quickly
> >
> > After getting this error, if I remove all the scripts and try to load
just
> > the Monad lib I keep getting the same error:
> >
> > IOExts> :l
> >
> > Hugs session for:
> > c:\hugs98\lib\Prelude.hs
> >
> > Prelude> :l Monad
> > Reading file "c:\hugs98\lib\Monad.hs":
> > ERROR "c:\hugs98\lib\Monad.hs" - Substitution expanding too quickly
> >
> >
> > 2) In the latest release, there is no context menu entry for .hs files
and
> > winhugs (only for hugs).
> >
> > Pepe Gallardo
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Sigbjorn Finne" <sof@galois.com>
> > To: "Mark P Jones" <mpj@cse.ogi.edu>
> > Cc: "Hugs Bugs" <hugs-bugs@haskell.org>
> > Sent: Friday, December 14, 2001 3:24 AM
> > Subject: Re: Test releases available
> >
> >
> > > Thanks Mark,
> > >
> > > I've fixed both of these; there's really no good reason to use
WinExec()
> > > in this day and age. Here's the behaviour I propose :edit has:
> > >
> > >    - :edit is synchronous, with the read-eval-print loop blocking
until
> > the
> > >       editor process terminates.
> > >    - Console-based editors like "vim" gets a separate console window
> when
> > >      invoked via WinHugs or Hugs98. This allows the user to still be
> able
> > to
> > >      see the type error (say) that the :edit is trying to fix.
> > >    - GUI-based editors do get a separate window, but not a separate
> > (empty)
> > >      console.
> > >
> > > I've updated the installer to include these changes.
> > >
> > > Your e-mail is a good example of just the thing you encourage people
to
> > > do: try out their favourite Hugs features & report back undesirable
> > > behaviour. I rarely use the :edit command, hence I wasn't aware of
this
> > > usability problem.
> > >
> > > thanks again,
> > > --sigbjorn
> > >
> > > ----- Original Message -----
> > > From: "Mark P Jones" <mpj@cse.ogi.edu>
> > > To: "Sigbjorn Finne" <sof@galois.com>
> > > Cc: "Hugs Bugs" <hugs-bugs@haskell.org>; "Mark P. Jones"
> <mpj@cse.ogi.edu>
> > > Sent: Thursday, December 13, 2001 13:43
> > > Subject: RE: Test releases available
> > >
> > >
> > > > A general comment, then some bug reports:
> > > >
> > > >   Thanks for the test releases of Hugs that we're seeing today!  I
> hope
> > > >   that as many people as possible in the Hugs community will take
this
> > > >   opportunity to download and test them---particularly in areas that
> > > >   matter most to them---before the final releases are made.
> > > >
> > > >   I suspect that some people on this list don't realize the extent
to
> > > >   which Hugs now relies on support from members of the community.
> There
> > > >   is *no funding* for work on Hugs as part of any ongoing research
> > > project,
> > > >   for example.  And while I hope they will benefit from the new
> release
> > > >   in their own efforts, the people who are working hard on getting
it
> > out
> > > >   are doing this essentially as (skilled) volunteers.  If it wasn't
> for
> > > >   Sigbjorn, Jeff, Johan, Alastair, and others, this release wouldn't
> > > >   happen at all.  But all of us can help in some way by testing the
> > > >   candidates and reporting back on what we find!
> > > >
> > > > Now to the bug reports: (These minor problems are specific to win32)
> > > >
> > > >   The new installer creates a context menu entry for .hs files in
> which
> > > >   the description is given as "New verb"; this should probably be
> > > something
> > > >   more like "Load with Hugs98".
> > > >
> > > >   The console version (at least) should not be compiled with
> > HAVE_WINEXEC
> > > >   set to 1.  First of all, that setting defeats the way that Hugs
was
> > > >   designed to integrate the interpreter and the editor; the two
> > activities
> > > >   should be interleaved rather than executed as concurrent processes
> > that
> > > >   require manual :reload commands, etc...  Secondly, with at least
one
> > > >   choice of external editor (vim), it causes the whole console
window
> to
> > > >   hang, so you never actually get to make any edits, and you
certainly
> > > >   don't get back to the Hugs prompt or to the command prompt.  At
the
> > > >   very least, perhaps the #if HAVE_WINEXEC line in machdep.c could
be
> > > >   changed to #if (HAVE_WINEXEC && HUGS_FOR_WINDOWS)?   (please ...
:-)
> > > >
> > > > All the best,
> > > > Mark
> > > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Hugs-Bugs mailing list
> > > Hugs-Bugs@haskell.org
> > > http://www.haskell.org/mailman/listinfo/hugs-bugs
> > >
> >
> >
> > _______________________________________________
> > Hugs-Bugs mailing list
> > Hugs-Bugs@haskell.org
> > http://www.haskell.org/mailman/listinfo/hugs-bugs
>
>