The modern LLVM package for Haskell is the llvm-general library. It has bindings to convert a LLVM bytecode module from string into a Haskell ADT for the AST.
See: withModuleFromString
import LLVM.General
import LLVM.General.Analysis
import LLVM.General.Context
import Control.Monad.Error
main :: String -> IO ()
main src = do
_ <- withContext $ \context -> do
runErrorT $ withModuleFromString context src $ \mod -> do
ast <- moduleAST mod
-- Your logic here.
return ()