はじめまして!Haskellの初心者です。
cabalで「BiGUL」というパッケージをインストールしたかったのですが、どうしてもうまく行かなったので質問させていただきます。
`cabal install BiGUL --allow-newer=base`でエラーが出てきました。
GHCupを使っています。cabalはversion3.6.2.0です。
ビルドログは以下のように
$ cabal install BiGUL --allow-newer=base
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
- BiGUL-1.0.1 (lib) (requires build)
Starting BiGUL-1.0.1 (lib)
Building BiGUL-1.0.1 (lib)
Failed to build BiGUL-1.0.1.
Build log (
C:\cabal\logs\ghc-8.10.7\BiGUL-1.0.1-7201c71d54996439f3e7433c7d9e8e8c75b69faa.log
):
Preprocessing library for BiGUL-1.0.1..
Building library for BiGUL-1.0.1..
[ 1 of 10] Compiling GHC.InOut ( src\GHC\InOut.hs, dist\build\GHC\InOut.o )
[ 2 of 10] Compiling Generics.BiGUL ( src\Generics\BiGUL.hs, dist\build\Generics\BiGUL.o )
[ 3 of 10] Compiling Generics.BiGUL.Error ( src\Generics\BiGUL\Error.hs, dist\build\Generics\BiGUL\Error.o )
[ 4 of 10] Compiling Generics.BiGUL.PatternMatching ( src\Generics\BiGUL\PatternMatching.hs, dist\build\Generics\BiGUL\PatternMatching.o )
[ 5 of 10] Compiling Generics.BiGUL.Interpreter.Unsafe ( src\Generics\BiGUL\Interpreter\Unsafe.hs, dist\build\Generics\BiGUL\Interpreter\Unsafe.o )
[ 6 of 10] Compiling Generics.BiGUL.Interpreter ( src\Generics\BiGUL\Interpreter.hs, dist\build\Generics\BiGUL\Interpreter.o )
[ 7 of 10] Compiling ( src\Generics\BiGUL\TH.hs, dist\build\Generics\BiGUL\TH.o )
src\Generics\BiGUL\TH.hs:144:16: error:
? Couldn't match expected type ▒e(Type -> TySynEqn) -> Dec▒f
with actual type ▒eDec▒f
? The function ▒eTySynInstD▒f is applied to two arguments,
but its type ▒eTySynEqn -> Dec▒f has only one
In the expression:
TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList)))
In the fourth argument of ▒eInstanceD▒f, namely
▒e[TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList))),
FunD vFrom fromClauses, FunD vTo toClauses]▒f
|
144 | [TySynInstD nRep
| ^^^^^^^^^^^^^^^...
src\Generics\BiGUL\TH.hs:144:27: error:
? Couldn't match expected type ▒eTySynEqn▒f with actual type ▒eName▒f
? In the first argument of ▒eTySynInstD▒f, namely ▒enRep▒f
In the expression:
TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList)))
In the fourth argument of ▒eInstanceD▒f, namely
▒e[TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList))),
FunD vFrom fromClauses, FunD vTo toClauses]▒f
|
144 | [TySynInstD nRep
| ^^^^
src\Generics\BiGUL\TH.hs:146:21: error:
? Couldn't match expected type ▒eMaybe [TyVarBndr]▒f
with actual type ▒e[Type]▒f
? In the first argument of ▒eTySynEqn▒f, namely
▒e[generateTypeVarsType name typeVars]▒f
In the second argument of ▒eTySynInstD▒f, namely
▒e(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList)))▒f
In the expression:
TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList)))
|
146 | [generateTypeVarsType name typeVars]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src\Generics\BiGUL\TH.hs:556:53: error:
? Couldn't match expected type ▒eExp▒f with actual type ▒eMaybe Exp▒f
? In the first argument of ▒emkBodyExpForRearr▒f, namely ▒ee▒f
In the expression: mkBodyExpForRearr e
In an equation for ▒emkBodyExpForRearr▒f:
mkBodyExpForRearr (TupE [e]) = mkBodyExpForRearr e
|
556 | mkBodyExpForRearr (TupE [e]) = mkBodyExpForRearr e
| ^
src\Generics\BiGUL\TH.hs:558:29: error:
? Couldn't match expected type ▒eExp▒f with actual type ▒eMaybe Exp▒f
? In the first argument of ▒emkBodyExpForRearr▒f, namely ▒ee▒f
In a stmt of a 'do' block: lexp <- mkBodyExpForRearr e
In the expression:
do lexp <- mkBodyExpForRearr e
rexp <- mkBodyExpForRearr (TupE es)
(_, [eprod]) <- lookupNames astNamespace [] ["EProd"]
return ((ConE eprod `AppE` lexp) `AppE` rexp)
|
558 | lexp <- mkBodyExpForRearr e
| ^
src\Generics\BiGUL\TH.hs:583:46: error:
? Couldn't match type ▒eMaybe Exp▒f with ▒eExp▒f
Expected type: [Exp]
Actual type: [Maybe Exp]
? In the second argument of ▒econcatMap▒f, namely ▒ees▒f
In the expression: concatMap getAllVars es
In an equation for ▒egetAllVars▒f:
getAllVars (TupE es) = concatMap getAllVars es
|
583 | getAllVars (TupE es) = concatMap getAllVars es
| ^^
src\Generics\BiGUL\TH.hs:649:16: error:
? Couldn't match type ▒eExp▒f with ▒eMaybe Exp▒f
Expected type: [Maybe Exp]
Actual type: [Exp]
? In the first argument of ▒eTupE▒f, namely ▒ees▒f
In the first argument of ▒ereturn▒f, namely ▒e(TupE es)▒f
In a stmt of a 'do' block: return (TupE es)
|
649 | return (TupE es)
| ^^
cabal-3.6.2.0.exe: Failed to build BiGUL-1.0.1. See the build log above for
details.
cabalで「BiGUL」というパッケージをインストールしたかったのですが、どうしてもうまく行かなったので質問させていただきます。
`cabal install BiGUL --allow-newer=base`でエラーが出てきました。
GHCupを使っています。cabalはversion3.6.2.0です。
ビルドログは以下のように
$ cabal install BiGUL --allow-newer=base
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
- BiGUL-1.0.1 (lib) (requires build)
Starting BiGUL-1.0.1 (lib)
Building BiGUL-1.0.1 (lib)
Failed to build BiGUL-1.0.1.
Build log (
C:\cabal\logs\ghc-8.10.7\BiGUL-1.0.1-7201c71d54996439f3e7433c7d9e8e8c75b69faa.log
):
Preprocessing library for BiGUL-1.0.1..
Building library for BiGUL-1.0.1..
[ 1 of 10] Compiling GHC.InOut ( src\GHC\InOut.hs, dist\build\GHC\InOut.o )
[ 2 of 10] Compiling Generics.BiGUL ( src\Generics\BiGUL.hs, dist\build\Generics\BiGUL.o )
[ 3 of 10] Compiling Generics.BiGUL.Error ( src\Generics\BiGUL\Error.hs, dist\build\Generics\BiGUL\Error.o )
[ 4 of 10] Compiling Generics.BiGUL.PatternMatching ( src\Generics\BiGUL\PatternMatching.hs, dist\build\Generics\BiGUL\PatternMatching.o )
[ 5 of 10] Compiling Generics.BiGUL.Interpreter.Unsafe ( src\Generics\BiGUL\Interpreter\Unsafe.hs, dist\build\Generics\BiGUL\Interpreter\Unsafe.o )
[ 6 of 10] Compiling Generics.BiGUL.Interpreter ( src\Generics\BiGUL\Interpreter.hs, dist\build\Generics\BiGUL\Interpreter.o )
[ 7 of 10] Compiling
src\Generics\BiGUL\TH.hs:144:16: error:
? Couldn't match expected type ▒e(Type -> TySynEqn) -> Dec▒f
with actual type ▒eDec▒f
? The function ▒eTySynInstD▒f is applied to two arguments,
but its type ▒eTySynEqn -> Dec▒f has only one
In the expression:
TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList)))
In the fourth argument of ▒eInstanceD▒f, namely
▒e[TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList))),
FunD vFrom fromClauses, FunD vTo toClauses]▒f
|
144 | [TySynInstD nRep
| ^^^^^^^^^^^^^^^...
src\Generics\BiGUL\TH.hs:144:27: error:
? Couldn't match expected type ▒eTySynEqn▒f with actual type ▒eName▒f
? In the first argument of ▒eTySynInstD▒f, namely ▒enRep▒f
In the expression:
TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList)))
In the fourth argument of ▒eInstanceD▒f, namely
▒e[TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList))),
FunD vFrom fromClauses, FunD vTo toClauses]▒f
|
144 | [TySynInstD nRep
| ^^^^
src\Generics\BiGUL\TH.hs:146:21: error:
? Couldn't match expected type ▒eMaybe [TyVarBndr]▒f
with actual type ▒e[Type]▒f
? In the first argument of ▒eTySynEqn▒f, namely
▒e[generateTypeVarsType name typeVars]▒f
In the second argument of ▒eTySynInstD▒f, namely
▒e(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList)))▒f
In the expression:
TySynInstD
nRep
(TySynEqn
[generateTypeVarsType name typeVars]
(constructorsToSum
(nSum, nV1)
(map
(constructorToProduct (nK1, nR, nU1, nProd, nS1))
selectorNameAndConList)))
|
146 | [generateTypeVarsType name typeVars]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src\Generics\BiGUL\TH.hs:556:53: error:
? Couldn't match expected type ▒eExp▒f with actual type ▒eMaybe Exp▒f
? In the first argument of ▒emkBodyExpForRearr▒f, namely ▒ee▒f
In the expression: mkBodyExpForRearr e
In an equation for ▒emkBodyExpForRearr▒f:
mkBodyExpForRearr (TupE [e]) = mkBodyExpForRearr e
|
556 | mkBodyExpForRearr (TupE [e]) = mkBodyExpForRearr e
| ^
src\Generics\BiGUL\TH.hs:558:29: error:
? Couldn't match expected type ▒eExp▒f with actual type ▒eMaybe Exp▒f
? In the first argument of ▒emkBodyExpForRearr▒f, namely ▒ee▒f
In a stmt of a 'do' block: lexp <- mkBodyExpForRearr e
In the expression:
do lexp <- mkBodyExpForRearr e
rexp <- mkBodyExpForRearr (TupE es)
(_, [eprod]) <- lookupNames astNamespace [] ["EProd"]
return ((ConE eprod `AppE` lexp) `AppE` rexp)
|
558 | lexp <- mkBodyExpForRearr e
| ^
src\Generics\BiGUL\TH.hs:583:46: error:
? Couldn't match type ▒eMaybe Exp▒f with ▒eExp▒f
Expected type: [Exp]
Actual type: [Maybe Exp]
? In the second argument of ▒econcatMap▒f, namely ▒ees▒f
In the expression: concatMap getAllVars es
In an equation for ▒egetAllVars▒f:
getAllVars (TupE es) = concatMap getAllVars es
|
583 | getAllVars (TupE es) = concatMap getAllVars es
| ^^
src\Generics\BiGUL\TH.hs:649:16: error:
? Couldn't match type ▒eExp▒f with ▒eMaybe Exp▒f
Expected type: [Maybe Exp]
Actual type: [Exp]
? In the first argument of ▒eTupE▒f, namely ▒ees▒f
In the first argument of ▒ereturn▒f, namely ▒e(TupE es)▒f
In a stmt of a 'do' block: return (TupE es)
|
649 | return (TupE es)
| ^^
cabal-3.6.2.0.exe: Failed to build BiGUL-1.0.1. See the build log above for
details.