无法在 Windows 10 上安装 Grapefruit
Can't install Grapefruit on Windows 10
当 运行ning cabal install grapefruit-ui-gtk 时,我在依赖 TypeCompose 上收到 build 错误。我运行的确切命令是
cabal install grapefruit-ui-gtk
并得到以下错误输出:
Resolving dependencies...
Configuring TypeCompose-0.9.12...
Configuring hashtables-1.2.3.1...
Building TypeCompose-0.9.12...
Building hashtables-1.2.3.1...
Failed to install TypeCompose-0.9.12
Build log ( C:\Users\me\AppData\Roaming\cabal\logs\ghc-8.4.3\TypeCompose-0.9.12-4FepCXFvbF94E2D2EggnNC.log ):
Preprocessing library for TypeCompose-0.9.12..
Building library for TypeCompose-0.9.12..
src\Data\Title.hs:1:33: warning:
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
|
1 | {-# LANGUAGE FlexibleInstances, OverlappingInstances, TypeOperators, TypeSynonymInstances #-}
| ^^^^^^^^^^^^^^^^^^^^
[ 1 of 10] Compiling Control.Instances ( src\Control\Instances.hs, dist\build\Control\Instances.o )
[ 2 of 10] Compiling Data.Bijection ( src\Data\Bijection.hs, dist\build\Data\Bijection.o )
[ 3 of 10] Compiling Control.Compose ( src\Control\Compose.hs, dist\build\Control\Compose.o )
src\Control\Compose.hs:596:10: error:
* Could not deduce (Semigroup (Flip j o a))
arising from the superclasses of an instance declaration
from the context: (Applicative (j a), Monoid o)
bound by the instance declaration
at src\Control\Compose.hs:596:10-61
* In the instance declaration for `Monoid (Flip j o a)'
|
596 | instance (Applicative (j a), Monoid o) => Monoid (Flip j o a) where
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src\Control\Compose.hs:645:10: error:
* Could not deduce (Semigroup (App f m))
arising from the superclasses of an instance declaration
from the context: (Applicative f, Monoid m)
bound by the instance declaration
at src\Control\Compose.hs:645:10-54
* In the instance declaration for `Monoid (App f m)'
|
645 | instance (Applicative f, Monoid m) => Monoid (App f m) where
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src\Control\Compose.hs:851:1: error:
* Could not deduce (Semigroup (Arrw j f g a))
arising from the superclasses of an instance declaration
from the context: Monoid (j (f a) (g a))
bound by the instance declaration
at src\Control\Compose.hs:851:1-63
* In the instance declaration for `Monoid (Arrw j f g a)'
|
851 | deriving instance Monoid (f a `j` g a) => Monoid (Arrw j f g a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory 'C:\Users\me\AppData\Local\Temp\cabal-tmp-17748\TypeCompose-0.9.12'
Installed hashtables-1.2.3.1
cabal.exe: Error: some packages failed to install:
TypeCompose-0.9.12-4FepCXFvbF94E2D2EggnNC failed during the building phase.
The exception was:
ExitFailure 1
grapefruit-frp-0.1.0.7-28vOfRvsiGH71mjsrgG35Q depends on
grapefruit-frp-0.1.0.7 which failed to install.
grapefruit-records-0.1.0.7-Ih2DxRIbFnG7TB7BHtPbwq depends on
grapefruit-records-0.1.0.7 which failed to install.
grapefruit-ui-0.1.0.7-DMol4wZpyyFEHFP2NRKthr depends on grapefruit-ui-0.1.0.7
which failed to install.
grapefruit-ui-gtk-0.1.0.7-EsNz0f5KGlp47W2BX85WRG depends on
grapefruit-ui-gtk-0.1.0.7 which failed to install.
GHC 版本:
The Glorious Glasgow Haskell Compilation System, version 8.4.3
Cabal 版本:
cabal-install version 2.2.0.0 compiled using version 2.2.0.1 of the
Cabal library
是什么导致了这个问题?我已经尝试使用 cabal init 将它安装在一个新目录中,但似乎没有任何效果。
这是一个 known issue with TypeCompose under 8.4, which has been fixed 但还没有安装 Hackage。
您可以使用旧版本的 GHC(参见 this question)配置 cabal
命令,例如 8.2.2,应该不会出现此问题。
或者,使用 stack
,这将允许您切换每个项目的 ghc 版本,并在 LTS resolver.
上为 8.2.2 提供 TypeCompose
当 运行ning cabal install grapefruit-ui-gtk 时,我在依赖 TypeCompose 上收到 build 错误。我运行的确切命令是
cabal install grapefruit-ui-gtk
并得到以下错误输出:
Resolving dependencies...
Configuring TypeCompose-0.9.12...
Configuring hashtables-1.2.3.1...
Building TypeCompose-0.9.12...
Building hashtables-1.2.3.1...
Failed to install TypeCompose-0.9.12
Build log ( C:\Users\me\AppData\Roaming\cabal\logs\ghc-8.4.3\TypeCompose-0.9.12-4FepCXFvbF94E2D2EggnNC.log ):
Preprocessing library for TypeCompose-0.9.12..
Building library for TypeCompose-0.9.12..
src\Data\Title.hs:1:33: warning:
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
|
1 | {-# LANGUAGE FlexibleInstances, OverlappingInstances, TypeOperators, TypeSynonymInstances #-}
| ^^^^^^^^^^^^^^^^^^^^
[ 1 of 10] Compiling Control.Instances ( src\Control\Instances.hs, dist\build\Control\Instances.o )
[ 2 of 10] Compiling Data.Bijection ( src\Data\Bijection.hs, dist\build\Data\Bijection.o )
[ 3 of 10] Compiling Control.Compose ( src\Control\Compose.hs, dist\build\Control\Compose.o )
src\Control\Compose.hs:596:10: error:
* Could not deduce (Semigroup (Flip j o a))
arising from the superclasses of an instance declaration
from the context: (Applicative (j a), Monoid o)
bound by the instance declaration
at src\Control\Compose.hs:596:10-61
* In the instance declaration for `Monoid (Flip j o a)'
|
596 | instance (Applicative (j a), Monoid o) => Monoid (Flip j o a) where
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src\Control\Compose.hs:645:10: error:
* Could not deduce (Semigroup (App f m))
arising from the superclasses of an instance declaration
from the context: (Applicative f, Monoid m)
bound by the instance declaration
at src\Control\Compose.hs:645:10-54
* In the instance declaration for `Monoid (App f m)'
|
645 | instance (Applicative f, Monoid m) => Monoid (App f m) where
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src\Control\Compose.hs:851:1: error:
* Could not deduce (Semigroup (Arrw j f g a))
arising from the superclasses of an instance declaration
from the context: Monoid (j (f a) (g a))
bound by the instance declaration
at src\Control\Compose.hs:851:1-63
* In the instance declaration for `Monoid (Arrw j f g a)'
|
851 | deriving instance Monoid (f a `j` g a) => Monoid (Arrw j f g a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory 'C:\Users\me\AppData\Local\Temp\cabal-tmp-17748\TypeCompose-0.9.12'
Installed hashtables-1.2.3.1
cabal.exe: Error: some packages failed to install:
TypeCompose-0.9.12-4FepCXFvbF94E2D2EggnNC failed during the building phase.
The exception was:
ExitFailure 1
grapefruit-frp-0.1.0.7-28vOfRvsiGH71mjsrgG35Q depends on
grapefruit-frp-0.1.0.7 which failed to install.
grapefruit-records-0.1.0.7-Ih2DxRIbFnG7TB7BHtPbwq depends on
grapefruit-records-0.1.0.7 which failed to install.
grapefruit-ui-0.1.0.7-DMol4wZpyyFEHFP2NRKthr depends on grapefruit-ui-0.1.0.7
which failed to install.
grapefruit-ui-gtk-0.1.0.7-EsNz0f5KGlp47W2BX85WRG depends on
grapefruit-ui-gtk-0.1.0.7 which failed to install.
GHC 版本:
The Glorious Glasgow Haskell Compilation System, version 8.4.3
Cabal 版本:
cabal-install version 2.2.0.0 compiled using version 2.2.0.1 of the Cabal library
是什么导致了这个问题?我已经尝试使用 cabal init 将它安装在一个新目录中,但似乎没有任何效果。
这是一个 known issue with TypeCompose under 8.4, which has been fixed 但还没有安装 Hackage。
您可以使用旧版本的 GHC(参见 this question)配置 cabal
命令,例如 8.2.2,应该不会出现此问题。
或者,使用 stack
,这将允许您切换每个项目的 ghc 版本,并在 LTS resolver.