我已经配置了以下cabal文件,但当我cabal build
时,我收到文件Tasty.hs中的错误Could not find module TicTac.Essential
,我在这里缺少什么?
name: tdd
version: 0.1.0.0
cabal-version: >=1.8
-- synopsis:
-- description:
-- license:
license-file: LICENSE
author: adfaf
maintainer: info@adfadsf.se
-- 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
tasty.hs的来源
module Main where
import Test.Tasty
import Test.Tasty.QuickCheck as QC
import TicTac.Essential
答案 0 :(得分:4)
在#34; exposed-modules&#34;之后你错过了冒号。应该是
library
hs-source-dirs: src
build-depends: base >= 4
ghc-options: -Wall
exposed-modules: TicTac.Essential
default-language: Haskell2010