[haskell-llvm] [Haskell-cafe] Problems with high-level interface to LLVM
Henning Thielemann
lemming at henning-thielemann.de
Wed May 18 12:25:50 BST 2011
Николай Кудасов wrote:
> I don't know how it can help me. I need something like
>
> > ExprVar :: forall a r. (CodeGenFunction r (Value a)) => Ident -> Expr a
>
> where r is *any*, but not *some*. As far as I understand, I need forall
> in class constraint...
CodeGenFunction is not a type class, but a type, that is, (=>) must be
replaced by (->) and 'a' and 'r' must not be forall-quantified at the
same level. Maybe something like
> ExprVar :: (forall r. CodeGenFunction r (Value a)) -> Ident -> Expr a
> I have not tried, but I would also think that the strongly typed
> llvm binding makes writing a compiler hard. However I enjoy it for
> just-in-time compilation and building an embedded domain specific
> language. For writing a compiler you might prefer the LLVM bindings
> that are created by David Terei for GHC's LLVM backend.
>
>
> Are those bindings separable from GHC?
I do not know. Please ask the author David Terei.
More information about the Haskell-llvm
mailing list