0
在我的Haskell的项目,我有以下目录结构(一些条目失踪,但这个问题不相关)哈斯克尔阴谋迷惑有关文件和模块名
- quanthas
- quanthas.cabal
- src/
- QuantHas/
- Settings.hs
我Settings.hs文件中包含该模块头
module QuantHas.Settings(module QuantHas.Settings) where
我的阴谋文件看起来像这样
Name: QuantHas
Version: 0.0
Description:
QuantHas project is an attempt to port QuantLib to Haskell keeping the functional flavor of Haskell.
License: BSD3
License-file: LICENSE
Build-Type: Simple
Cabal-Version: >=1.10
Library
Build-Depends: base >= 3 && < 5, array >= 0.2
Exposed-modules: QuantHas.Time.Frequency
QuantHas.Time.TimeUnit
QuantHas.Time.Period
QuantHas.Time.Date
QuantHas.Time.DayCounter
QuantHas.Time.BusinessDayConvention
QuantHas.Time.Calendar
QuantHas.Time.Calendars.UnitedKingdom
QuantHas.Time.Schedule
QuantHas.Settings
QuantHas.Require
default-language: Haskell2010
hs-source-dirs: src
-- ghc-options: -Wall
test-suite QuantHas-tests
type: exitcode-stdio-1.0
hs-source-dirs: testsuite
main-is: Tests.hs
default-language: Haskell2010
当我执行
cabal install --enable-tests
我得到这个消息
src/Quanthas/Settings.hs:17:8: error:
File name does not match module name:
Saw: ‘QuantHas.Settings’
Expected: ‘Quanthas.Settings’
这似乎是错误的。但是,如果我们做什么cabal期望。所以Settings.hs模块头现在是
module Quanthas.Settings(module Quanthas.Settings) where
卡瓦尔说,现在
src/QuantHas/Settings.hs:17:8: error:
File name does not match module name:
Saw: ‘Quanthas.Settings’
Expected: ‘QuantHas.Settings’
而且它在这个ppint,我放弃了,转而左右。任何人都可以帮助我理解发生了什么?
版本信息: 平台:的MacBook Pro运行的MacOS 10.12.3 哈斯克尔:8.0.1 惊天动地:1.24.0.0
谢谢!
那么你确定文件系统中的'QuantHas'目录是用大写'H'命名的吗?如果是这样,你做了一些像小写字母开头,然后重命名它?想知道如果它可以是一些缓存的东西。 –
是的,它在目录名称中总是有'H'。 –
更改后试过'cabal configure'吗? – arrowd