haskell-numerics / hmatrix

Linear algebra and numerical computation
381 stars 104 forks source link

build error in hmatrix-glpk #218

Open vladfi1 opened 7 years ago

vladfi1 commented 7 years ago

If I do stack install hmatrix-glpk I get a bunch of errors like this:

/tmp/stack27499/hmatrix-glpk-0.6.0.0/src/Numeric/LinearProgramming.hs:293:7: error:
    • Couldn't match expected type ‘TransRaw
                                      c2
                                      ((CInt
                                        -> CInt
                                        -> Ptr Double
                                        -> CInt
                                        -> CInt
                                        -> Ptr Double
                                        -> CInt
                                        -> Ptr Double
                                        -> IO CInt)
                                       -> IO CInt)’
                  with actual type ‘Matrix Double’
      The type variable ‘c2’ is ambiguous
    • In the first argument of ‘applyRaw’, namely ‘(cmat c)’
      In the expression:
        (cmat c) `applyRaw` ((cmat b) `applyRaw` (s `applyRaw` id))
      In the first argument of ‘(#|)’, namely
        ‘((cmat c) `applyRaw` ((cmat b) `applyRaw` (s `applyRaw` id)))
           (c_simplex_sparse (fi m) (fi n))’

This happens both with ghc 8.0.1 and 7.10.3.