lambdachine icon indicating copy to clipboard operation
lambdachine copied to clipboard

possible ghc 7.8.* compatibility issues

Open magnusmorton opened this issue 10 years ago • 0 comments

attempting to compile a benchmark I get the following issue:

LCC -o2 tests/Bench/SumFromTo1.hs => tests/Bench/SumFromTo1.lcbc

Bench/SumFromTo1.hs:12:1:
    Failed to load interface for ‘GHC.Bool’
    Use -v to see a list of the files searched for.

I tried removing the import GHC.Bool, but that results in this:

LCC -o2 tests/Bench/SumFromTo1.hs => tests/Bench/SumFromTo1.lcbc

Bench/SumFromTo1.hs:22:6:
    Couldn't match expected type ‘Bool’ with actual type ‘Int#’
    In the expression: m ># n
    In the expression:
      if m ># n then [] else from : enumFromTo (I# (m +# 1#)) to
    In an equation for ‘enumFromTo’:
        enumFromTo from@(I# m) to@(I# n)
          = if m ># n then [] else from : enumFromTo (I# (m +# 1#)) to

Bench/SumFromTo1.hs:48:23:
    Couldn't match expected type ‘Bool’ with actual type ‘Int#’
    In the expression: m ==# n
    In an equation for ‘eqInt’: eqInt (I# m) (I# n) = m ==# n
make: *** [tests/Bench/SumFromTo1.lcbc] Error 1

Now, the docs for ghc 7.8.1 state that "PrimOps for comparing unboxed values now return Int# instead of Bool." which seems like it may cause the second issue above. I'll try changing the types and see what difference it makes

magnusmorton avatar May 26 '14 22:05 magnusmorton