[haskell-llvm] fixing Vector example in classic llvm bindings

Henning Thielemann lemming at henning-thielemann.de
Sun Jul 31 11:17:08 BST 2016


I am working on llvm-tf, a fork of the classic llvm package.
The Vector example fails with:
    llvm-vector: example/Vector.hs:94:9-60: Irrefutable pattern failed for pattern Data.Maybe.Just iovec'

The problem is that the function getModuleValues does not return the 
named function "vectest" although it was created before. This is caused by 
(filterM isIntrinsic) in Core.Util.getFunctions. It was introduced by:

commit 61820447235bde880b679a38e09d490dbd9dd8d9
Author: Nick Frolov <nf at mkmks.org>
Date:   Wed Jun 29 01:49:47 2011 +0200

     Initial support for bytecode introspection


I wonder why the filter was added. Maybe (not . isIntrinsic) was meant?



More information about the Haskell-llvm mailing list