Re: hat-trail and hat-observe errors

Malcolm Wallace <[email protected]> Tue, 11 Nov 2003 09:47:30 +0000
Newsgroups gmane.comp.lang.haskell.hat
Organization Dept of Computer Science, University of York
Message-ID <[email protected]>
Thomas Davie <[email protected]> writes:

> Hi, I'm getting some odd errors running hat under OS X.
> 
>  > sh: resize: command not found

`resize' is a shell command related to the xterm application - it
reports the current size of the terminal window.  It seems that it
probably does not exist on MacOS X.  If you know of an equivalent
shell command, you could replace the sole use of `resize' in the
source code to use that command instead, otherwise it is perhaps
easiest just to assume a fixed size.

The function to change is:
    getTerminalSize :: IO (Int,Int)
in src/hattools/HighlightStyle.hs.  One suggestion would be to replace
its definition with
    getTerminalSize = return (80,25)

In future, we should alter the configuration script to detect whether
`resize' is available and do the right thing.

Regards,
    Malcolm