> Hi Simon, I eventually managed to produce an executable (but see
> below) with the following patches (note that the address family
> enumeration below is *not* identical to freebsd):

great, thanks.  I've incorporated your patches.

> however compiling:
> 
> main = "better dead than imperative"
> 
> produces:
> 
> foo.hs:1:
>     Couldn't match `IO t' against `[Char]'
>         Expected type: IO t
>         Inferred type: [Char]
>     When checking that `main' has the required type

that should be 

        main = print "better dead than imperative"

the type system is complaining that it can't match String (i.e. [Char])
against the type of main, namely (IO t).

> compiling Say.hs (from hugs), produces:
> 
> proff@suburbia:/pkg/share/hugs/demos$ ghc Say.hs
> 
> Say.hs:44: Variable not in scope: `isUpper'
> 
> Say.hs:45: Variable not in scope: `isLower'
> 
> Say.hs:46: Variable not in scope: `isSpace'
> 
> Say.hs:47: Variable not in scope: `isDigit'
> 
> Compilation had errors

Hugs has a bug in that it brings these functions into scope from the
Prelude, when they should only be available from the Char module according
to the Haskell 98 spec.  Fix: add 'import Char' to get it to compile under
GHC.

> root@suburbia:/pkg/share/hugs/demos# ghc Literate.lhs
> 
> Literate.lhs:50: Variable not in scope: `isSpace'
> 
> Compilation had errors

Same problem here.

> root@suburbia:/pkg/share/hugs/demos# ghc Stack.hs
> Stack.hs:5: parse error on input `in'
> 
> Compilation had errors

The stack demo uses restricted type synonyms, which is a Hugs extension.
GHC doesn't have restricted type synonyms (yet).

Thanks again for the patches,

        Simon

Reply via email to