Hi there! I'm new to this list. I've been looking for a good
strongly-typed, type-inferencing, pattern-matching, lambda-calculus-based
modern functional programming language and the choices seem to be pretty
much ML and Haskell. I already know ML, and I like it a lot. I've fooled
around a bit in Haskell and was a bit disconcerted by it's lack of
syntactic sugar to indicate structure (the lack of semicolons to end
expressions for example :) but it seems very straightforward once one
knows how to think in the functional programming mindset (and program
structure is actually incredibly similar to ML... very much like the
parallels between C and Pascal...) so I'm quite interested in it.
However, there is one primary reason I'm looking into ghc these days...
Foreign Function Interfaces. Specifically, the best implementation of ML
that I know of (Standard ML of New Jersey) has a horrible foreign function
interface that requires recompiling a large portion of the compiler.
This is impractical. I want to be able to dynamically link in C libraries
to to intersting things from ML or Haskell just as easily as I could from
C/C++. There is a paper on the ghc web site that led me to belive that ghc
could do this much better than sml/nj, and so I'm quite interested. The
OpenGL wrapper for ghc to access Mesa with which a Quake model and bsp
viewer was written is quite convincing that it works :)
However, it only works in the CVS branch, which is the main reason for
this message: I'm getting a compiler error deep into compiling the source
for the current (checked out 9 June) compiler code and it's really
annoying :|
I'm compiling on Linux/i586 2.2.9, GCC 2.8.1, libc5.4.44 with binary
compatibility with libc6 (so I am able to run the ghc 4.02 binary libc6
distribution, but the compiler I am building will end up linked against
libc5)
Here is the relevant error output:
------------------------------------------------------------------------
==fptools== make all --no-print-directory -r;
in /home/tetron/hack/lang/haskell/cvshaskell/fptools/ghc/compiler
------------------------------------------------------------------------
ghc -cpp -fglasgow-exts -Rghc-timing -I. -IcodeGen -InativeGen -Iparser
-iutils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar:coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen:absCSyn:main:reader:profiling:parser:usageSP:cprAnalysis:nativeGen
-recomp -c coreSyn/PprCore.lhs -o coreSyn/PprCore.o -osuf o
PprCore.lhs:262:
Couldn't match `Pretty.Doc' against `t -> t1'
Expected type: Pretty.Doc
Inferred type: t -> t1
Probable cause: `nest' is applied to too many arguments in the call
(nest 4 pTy pe to_ty)
In the list element: nest 4 pTy pe to_ty
Compilation had errors
make[2]: *** [coreSyn/PprCore.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
Needless to say I don't know enough about the compiler system to be able
to even begin to diagnose this error, I don't even have a clue what this
code is supposed to do... Please help! Or should I just keep doing CVS
checkouts until someone notices and fixes it? That could be a while :(
------------------ Peter Amstutz --------------------
-------------- [EMAIL PROTECTED] -------------
------- http://www-unix.oit.umass.edu/~tetron -------
-----------------------------------------------------