Skip to main content

All Questions

2 votes
0 answers
146 views

How to suppress warnings from external packages?

My stack build shows warning from external packages, like: happy > /tmp/stack-d6caed253e9f21bf/happy-1.20.0/src/ProduceGLRCode.lhs:224:12: warning: [-Wincomplete-uni-patterns] ...
Abhijit Sarkar's user avatar
0 votes
0 answers
59 views

Does stack rerun hpack not only on build but already on change?

I'm using stack with hpack so that .cabal file is generated from hpack's package.yaml. Often times as I want to switch branch I struggle with constantly changing .cabal file. I run git restore *....
zaabson's user avatar
  • 197
0 votes
0 answers
65 views

Explain hpack macro operators

Today I was working on conferer library and discovered interesting syntax in hpack package.yaml file reminding me some macro language, but I cannot find anything about that topic - no bugs having ...
Daniil Iaitskov's user avatar
1 vote
1 answer
316 views

exclude temporarily a file from a `stack build` when using hpack (package.yaml)

One may work on a haskell file in the source-dirs directory and decide for now not to include this file in a stack build. Is there a simple way to exclude temporarily the file form the build? The ...
user855443's user avatar
  • 2,960
0 votes
1 answer
1k views

module ‘main:Main’ is defined in multiple files - but they're the same file

I start a new stack project with stack new demo and define a second file Other.hs in the apps folder. There are no dependencies, just: module Other where main :: IO () main = print 4 And in package....
peer's user avatar
  • 4,731
1 vote
1 answer
106 views

Test for GHC compile time errors

I'm working on proto-lens#400 tweaking a Haskell code generator. In one of the tests I'd like to verify that certain API has not been built. Specifically, I want to ensure that a certain type of ...
MvG's user avatar
  • 61.4k
2 votes
0 answers
144 views

Is it possible to have Haskell source files with a different extension?

In any of the build tools commonly used in Haskell projects (i.e stack, cabal, or hpack), is it possible to have a source directory which contains source files with a different extension (i.e. other ...
Saurabh Nanda's user avatar
6 votes
2 answers
2k views

Building multiple executables in the default Haskell Stack project

I used the default stack new to setup a project that has a server and a client as separate executables. I altered the package.yaml file in what seems like the right way (As of April 21, 2020 "There is ...
John F. Miller's user avatar
2 votes
0 answers
185 views

Using hsc2hs with HPack and Stack

I'd like to use hsc2hs via Stack and HPack. The problem is, since HPack doesn't allow me to list the .hsc file as a source file, only .hs, changes to the .hsc file don't trigger a rebuild in stack ...
Cactus's user avatar
  • 27.7k
1 vote
1 answer
63 views

Hpack or pre-processor platform info

I am using hpack+stack for a project and there is a hardcoded path (used for debugging, I don't want to do this properly) which are differs for mac os x and linux. Right now I have it on a gitignored ...
fakedrake's user avatar
  • 6,886