WinHugs

From HaskellWiki
Revision as of 18:50, 12 April 2009 by Jbolden1517 (talk | contribs) (old link defunct, linking to googlecode)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WinHugs is the Windows user interface to Hugs. Further details, including a preview download, are available here. In addition to all of the Hugs features, it includes type browsers and hierarchical constraint views. WinHugs should run on any version of Windows since 95, i.e. 95/98/ME/NT/2K/XP. A list of bugs and features is maintained here. I am considering rewriting some parts, especially the main user interface. If you want to have your say comment on this page.

WinHugs manual entry

This section is intended to become the official entry in the Hugs user guide


Overview

WinHugs is a Windows user interface to Hugs. It provides an environment in which to experiment with Haskell commands in much the same way as Hugs, but instead of using a console and textual commands to perform operations such as loading, buttons are provided. It is intended to be more user friendly, and more approachable for new users.

Screenshot of WinHugs

Features

WinHugs has all the Haskell features of Hugs, plus a few others not found with the Windows version of Hugs

  • Colored output, the prompt and various other items are colorised to aid reading.
  • Some escape codes are supported, in particular those which change the foreground and background color.
  • Hyperlinks and editor integration, when an error occurs a link can be clicked to open an editor at the appropriate line.
  • Easy control of options, in a convenient dialog.
  • Easy access to some commands, such as load.
  • Browse commands to view the type hierarchy and items in scope.

Getting started

This is just a simple guide to get you started with WinHugs, and give you a small introduction to some of its features.

Create a file, called Main.hs, and inside put the text

module Main where
main = putStrLn "Hello, WinHugs!"

Now run WinHugs, and click on open (File/Open) and browse to the file Main.hs. It will open in WinHugs. Now click on the run button, and watch it say a message.

Now modify the program to say

module Main where
main = putStrLn "Hello, WinHugs!

Note that no closing quote is given, so this program will crash. Now click on the refresh button in WinHugs, or type :r (all the Hugs commands still work). Note that this time an error is given, along with a link saying where the error. Click this link, and the file will open in your editor, at the appropriate line.

If the file doesn't open at the correct line, visit the options, and under the WinHugs set Editor value appropriately.

This overview has presented some of the most commonly used features in WinHugs. WinHugs can also be used exactly like Hugs for most uses, with command history, commands like :quit etc.


Who should use WinHugs?

WinHugs is only available on Windows. If you are a Windows user who wants a quick haskell environment to test out your ideas and programs, then WinHugs may certainly be an option. If you are a fan of the console, or if you need your program to go really fast (even while you are developing it), then GHC might be a better choice.

Authorship

The code is currently maintained by Neil Mitchell, and has been rewritten from scratch. Previous versions were written by ...

Good points about the rewrite

  • Rewritten to use less code
  • Redesigned options, better layed out
  • Easier integration with text editors, just textpad for now but ask for more
  • Better designed menus
  • Updated artwork, hicolor large size
  • Uses XP style
  • Faster on output, about 5 times
  • About twice as fast as the console version of Hugs on Windows
  • Can use drag/drop and cut/copy/paste better
  • Hyperlinks for errors
  • Better support for interact and getChar