[haskell-llvm] Type of function with no arguments

José Romildo Malaquias j.romildo at gmail.com
Thu Nov 22 17:45:56 GMT 2012


On Thu, Nov 22, 2012 at 09:25:12AM -0800, Nathan Howell wrote:
> I believe it should be "Function (IO Int32)"

Yes, that worked.

Thanks.

> On Thu, Nov 22, 2012 at 7:48 AM, José Romildo Malaquias <j.romildo at gmail.com
> > wrote:
> 
> > What should be the type of an LLVM function that has no arguments and
> > returns an int32?
> >
> > I have tried
> >
> >   Function (() -> Int32)
> >
> > but the llvm ir compiler does not accept it, with the error:
> >
> >   llc: prog1.ll:3:18: error: void type only allowed for function results
> >   define i32 @main(void) {



More information about the Haskell-llvm mailing list