2

I'm trying to reproduce the Haskell compilation in this code similar to what it said in that post:

ghc -fllvm quicksort.hs

Here is quicksort.hs:

module Test where

quicksort [] = []
quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater)
    where
        lesser = filter (< p) xs
        greater = filter (>= p) xs

However I get the following message that llvm is too new:

[1 of 1] Compiling Test             ( quicksort.hs, quicksort.o )
You are using a new version of LLVM that hasn't been tested yet!
We will try though...
opt: /tmp/ghc6115_0/ghc6115_0.ll:12:6: error: unexpected type in metadata definition
!0 = metadata !{metadata !"top"}
     ^

Now this is a strange because I'm using llvm 3.8.0. What's going on here? Thanks!

OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87

0 Answers0