Q: How to adjust cabal(stack?) settings so that app/LogAnalysis.hs
is treated as main log after all?
Here is how I got myself this error:
- Created new project with
stack new xyz
- Renamed
app/Main.hs
toapp/LogAnalysis.hs
- Adjusted
main-is
option inxyz.cabal
file
Problem is I either entered that data somehow incorrectly or cabal ignores that new value. Here is error I get:
Preprocessing executable 'WeekTwo-exe' for WeekTwo-0.1.0.0...
<no location info>: error:
output was redirected with -o, but no output will be generated
because there is no Main module.
Here is relevant entry in xyz.cabal
executable WeekTwo-exe
hs-source-dirs: app
main-is: LogAnalysis.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, WeekTwo
default-language: Haskell2010
And module in question is:
module LogAnalysis where
import Log
main :: IO ()
main = print (parseMessage "I 29 la la")
Versions: Stack - Version 1.3.2 GHC - 7.15 Cabal - 1.24.0.0
PS if it's of any interest I'm doin 2nd week of Haskel course CIS 194.