Closed thermohyaena closed 8 months ago
This setup on stack.yaml wouldn't work
See the instructions here.
See the instructions here.
Ah I have solved this issue by putting nothing on the package section and add openblas flag in stack.yaml, and put hmatrix under dependence in package.ymal
What I'm currently encountering is that it always outputs the error of "module/package not found" when I write import XXX in .hs file including Lib modules from src folder.
However, importing these modules works in ghci, but not in .hs
Sorry, I don't see what you mean.
Sorry, I don't see what you mean.
What i mean is basic in the pictures below that
If i write import in .hs file, it pops error saying no module found for "Lib" and "import Numeric.LinearAlgebra ( (><), linearSolve )". Also i got error saying ambiguous type.
However,
If i import it only in ghci, that works just fine
btw I got this when i print the type of c in ghci, not sure if that's normal Prelude Numeric.LinearAlgebra> :t c c :: (Foreign.Storable.Storable a, Fractional a) => hmatrix-0.20.2:Internal.Matrix.Matrix a
Did you build the package (stack build
)? Otherwise it's normal that the module is not found in VS code yet.
Did you build the package (
stack build
)? Otherwise it's normal that the module is not found in VS code yet.
Yeah I have tried that, nothing changes unfortunately
Despite the error showing, it would still work for imported packages, and Lib would still be imported by the main exec file tho.
What I'm more concerned about is actually the type of matrix, the one I get from :t in ghc looks a bit weird?
Prelude Numeric.LinearAlgebra> :t c c :: (Foreign.Storable.Storable a, Fractional a) => hmatrix-0.20.2:Internal.Matrix.Matrix a
I don't find this type is weird.
For your other problem, unfortunately we are off-topic here. This is not related to hmatrix
. You could open a question on StackOverflow or Haskell discourse.
I don't find this type is weird.
For your other problem, unfortunately we are off-topic here. This is not related to
hmatrix
. You could open a question on StackOverflow or Haskell discourse.
Yeah right, thanks for your help!
Couldn't install hmatrix due to issue in the picture
What should be written in the "package:" section?