为什么派生出现错误消息?
我有一个带有以下行的Haskell文件:
{-# LANGUAGE DeriveGeneric #-}
但是,我在该行上收到以下错误消息:
Failed to parse result of calling cabal
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
- haskell-translator-0.1.0.0 (exe:haskell-translator) (configuration changed)
Warning: haskell-translator.cabal:24:5:
unexpected 'a'
expecting space, "&&", white space, "||", comma or end of input
base >=4.12 && <4.13
async
cabal: Failed parsing "./haskell-translator.cabal".
以下是我的.cabal文件的内容:
name: haskell-translator
version: 0.1.0.0
-- synopsis:
-- description:
license: BSD3
license-file: LICENSE
author: saad.shaikh
maintainer: [email protected]
-- copyright:
-- category:
build-type: Simple
extra-source-files: CHANGELOG.md
cabal-version: >=1.10
executable haskell-translator
main-is: Main.hs
-- other-modules:
-- other-extensions:
build-depends:
base >=4.12 && <4.13
async>=1.2.0 && <1.3
haskell-translator-0.1.0.0
-- hs-source-dirs:
default-language: Haskell2010
错误消息的原因是什么?
I have a haskell file with the below line:
{-# LANGUAGE DeriveGeneric #-}
However, I am getting the below error message on that line:
Failed to parse result of calling cabal
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
- haskell-translator-0.1.0.0 (exe:haskell-translator) (configuration changed)
Warning: haskell-translator.cabal:24:5:
unexpected 'a'
expecting space, "&&", white space, "||", comma or end of input
base >=4.12 && <4.13
async
cabal: Failed parsing "./haskell-translator.cabal".
And below are the contents of my .cabal file:
name: haskell-translator
version: 0.1.0.0
-- synopsis:
-- description:
license: BSD3
license-file: LICENSE
author: saad.shaikh
maintainer: [email protected]
-- copyright:
-- category:
build-type: Simple
extra-source-files: CHANGELOG.md
cabal-version: >=1.10
executable haskell-translator
main-is: Main.hs
-- other-modules:
-- other-extensions:
build-depends:
base >=4.12 && <4.13
async>=1.2.0 && <1.3
haskell-translator-0.1.0.0
-- hs-source-dirs:
default-language: Haskell2010
What is the reason for the error message?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的Cabal文件在
build依赖
e节上存在一些问题,您应该通过逗号分开项目,并使用Constrainst So== 0.1.0.0.0
,而不是-0.1.0.0
:Your cabal file has some problems with the
build-depends
section, you shhould separate the items by a comma, and use constrainst so== 0.1.0.0
, not-0.1.0.0
: