4
votes

I have configured the following cabal file but when I do cabal build I just get the error in file Tasty.hs saying Could not find module TicTac.Essential, what am I missing here?

name:                tdd
version:             0.1.0.0
cabal-version:       >=1.8
-- synopsis:            
-- description:         
-- license:             
license-file:        LICENSE
author:              adfaf
maintainer:          [email protected]
-- copyright:           
-- category:            
build-type:          Simple
extra-source-files:  README

library
  hs-source-dirs:      src
  build-depends:       base >= 4
  ghc-options:         -Wall
  exposed-modules      TicTac.Essential  
  default-language:    Haskell2010

test-suite Tasty
  type:                exitcode-stdio-1.0 
  build-depends:       base >=4.6 && <4.7, tasty, tasty-quickcheck, tdd
  hs-source-dirs:      test
  main-is:             Tasty.hs 

Source of tasty.hs

module Main where

import Test.Tasty
import Test.Tasty.QuickCheck as QC 

import TicTac.Essential
1
Could it be the lack of a colon after exposed-modules? - Elliot Robinson
:s It was how the hell could i have missed that, which there would be better error messages for cabal files. - user3139545
Meh, happens to the best of us. I'll throw an answer up for the people who don't read comments. - Elliot Robinson

1 Answers

4
votes

You're missing a colon after "exposed-modules". Should be

library
  hs-source-dirs:      src
  build-depends:       base >= 4
  ghc-options:         -Wall
  exposed-modules:     TicTac.Essential  
  default-language:    Haskell2010