1,293 questions
0
votes
0
answers
52
views
How to configure brittany in Visual Studio Code Windows?
I'm trying to set up Haskell in VSCode Windows by following this Better Programming Guide
Everything worked fine except for the code formatting.
I tried installing brittany using stack install ...
0
votes
0
answers
94
views
zlib dependency error on Fedora installing yesod-bin with stack
I've been trying to install the yesod framework following the suggested steps:
stack new my-project yesodweb/sqlite
cd my-project
stack install yesod-bin --install-ghc
However I get the compilation ...
0
votes
1
answer
75
views
"Could not find module ‘GHCi.GhcApiCompat’." which installing `haskell-dap ghci-dap`
Below are my ghcup config -
I've I've created haskell project using stack with command stack new stack-hls-dbg-demo.
I then updated snapshot.url as below so that it uses ghc-9.10.1-
snapshot:
url: ...
4
votes
1
answer
102
views
How to Free Resources Allocated During Debugging in GHC or Stack Debugger?
I'm debugging a Haskell program using GHC's debugger (ghci) or via stack ghci, specifically with the Haskell GHCi Debug Adapter (Phoityne extension) in Visual Studio Code, and I'm encountering a major ...
2
votes
1
answer
36
views
How can I suppress the error summary at the bottom of `stack test`
I like to have stack test --file-watch running in a terminal below my editor so when I make a change and save, it reruns my tests and gives feedback. However, in the output below, everything after the ...
0
votes
1
answer
63
views
Stack tried to find libgmp then failed, even with no dependencies at all
I use nix-darwin and have enabled nix in ~/.stack/config.yaml.
Earlier today I did a sudo nix-collect-garbage -d then many things begin to break.
Minimum reproducible example:
stack new mwe
cd mwe
...
1
vote
1
answer
46
views
hint runStmt no output when redirected
Following this link and trying to stack run this module:
module Main where
import Language.Haskell.Interpreter
main :: IO ()
main = do
_ <- runInterpreter
$ setImports ["Prelude"]...
0
votes
0
answers
97
views
Haskell, Stack, importing module shows error "Module not found" [duplicate]
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....
0
votes
1
answer
100
views
How to specify c/c++ compiler on stack install command
I'm learning Haskell and I'm setting up my system for development.
I'm on MacOS and trying to install hoogle locally with stack install hoogle fails because the compilation of some libraries fails ...
2
votes
1
answer
219
views
What am I doing wrong in my Haskell library installation/usage?
I want to install and run an example program from the Haskell neural library.
I'm pretty new to this and am not sure on whether the issue is with my installation method, my environment or the library(...
2
votes
1
answer
987
views
Haskell stack local install fails after installing GHC
I am trying to install stack locally (I am on a university account, and can not make a systemwide install). I am following the manual install instructions. I am on a Red Hat system.
Here is the ...
2
votes
2
answers
1k
views
How to install package for Haskell with stack and cabal?
I'm attempting to install one small Haskell package.
I set up a project using stack:
stack new my-project simple
This worked out fine. I'm able to build and run the code.
But then I stumbled into ...
2
votes
2
answers
165
views
Scotty: No instance for MonadIO ScottyT (arising from a use of ‘liftIO’)
I am trying to learn HASKELL by myself, I have found this page https://www.parsonsmatt.org/2015/05/02/scotty_and_persistent.html
and I have tried to use the code but I got an error:
share [mkPersist ...
4
votes
1
answer
102
views
Module X appears in multiple packages
I am writing a short Turtle script in Haskell, running it with Stack:
#!/usr/bin/env stack
-- stack --resolver lts-19.6 script
{-# LANGUAGE OverloadedStrings #-}
...
1
vote
1
answer
150
views
How to import modules implicitly in a haskell stack project?
This isn't an important issue but I was just wondering if I have some modules in a stack (or cabal doesn't matter in this case) Haskell project, which are imported in a lot of other modules how to ...
2
votes
0
answers
190
views
Installing Haskell Stack builds and artifacts or GHC to a different drive than C:
Is there any good methods to install Haskell on a different drive than C: , such that when I run stack buildand stack test etc., it will not install a large number of files in C:\Users\myuser\AppData\...
3
votes
1
answer
343
views
Haskell in vscode (with WSL2), breakpoints not being hit
I would like to start learning haskell and it seems vscode would be a decent IDE for this. I tried to set it up.
I tried the following :
I went into WSL2(ubuntu 20.04.6) in the directory I would like ...
1
vote
0
answers
91
views
File from assignment has import Haskell stack does not recognize
I got a download file from my University for one of my assignments, it has an import Criterion.Main that my version of stack does not recognize
I tried updating my Stack and cabal, added
#!/usr/bin/...
2
votes
2
answers
374
views
Haskell-language-server starting in wrong folder in VS Code
I have a project that looks like this:
- my-project
- backend
- stack.yaml
- src
- ... a bunch of haskell files
- ... exe & test folders here too
- frontend
- ... an Elm ...
1
vote
1
answer
1k
views
Is there a reason my Haskell program uses so much memory?
Given an input file of words separated by spaces, file size ~64mb:
main :: IO ()
main = do
content <- getData "data_1.txt" -- opens file, reads contents, closes handle,returns
let ...
0
votes
1
answer
93
views
How to get Haskell Stack to dynamically link with C?
Suppose we have a project with the following structure
.
├── CHANGELOG.md
├── LICENSE
├── README.md
├── Setup.hs
├── app
│ └── Main.hs
├── cbits
│ ├── include
│ │ └── libCbits.c
│ └── lib
│ ...
1
vote
2
answers
505
views
Unable to install magic-1.1 for iHaskell
Main Issue
I am new to Haskell and I wanna use iHaskell, an interactive Haskell similar to Jupyter notebook in Python. I noticed that the magic library is missing after running stack install --fast . ...
-1
votes
2
answers
862
views
why i got error while launching stack build?
I am new in haskell programming. For my university project our teacher send us the project and ask us to run these command : "stack init" then "stack build" when i am running stack ...
0
votes
0
answers
161
views
How to config the behavior of 'stack new' so a certain lts can be used every time?
I want to setup the default lts version to 20.11, however no matter I tried all recommend method in this document https://docs.haskellstack.org/en/stable/yaml_configuration/#resolver-or-snapshot
if ...
1
vote
1
answer
211
views
How do you get stack to pass custom flags to ghc (and the cpp preprocessor)?
I have some conditional compilation in my files, say
#if FLAG
bogus1 x = x + 1
#else
bogus2 x = x + 2
#endif
Then I'm trying to set my package.yaml to pass the flag to ghc on build. So I added the ...