Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
226 views
in Technique[技术] by (71.8m points)

installation - "Could not load module `Control.Monad.Trans.Maybe'" while trying to install Agda 2.6.1.2

I'm trying to install Agda 2.6.1.2 by following the instructions in the docs, but when running the command cabal install Agda I'm receiving the following error:

srcfullAgdaUtilsMaybe.hs:13:1: error:
    Could not load module `Control.Monad.Trans.Maybe'
    It is a member of the hidden package `transformers-0.5.6.2'.
    Perhaps you need to add `transformers' to the build-depends in your .cabal file.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
13 | import Control.Monad.Trans.Maybe
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal.exe: Failed to build Agda-2.6.1.2. See the build log above for details.

I'm running Powershell as admininstrator, I've installed GHC 8.10.3 and cabal 3.2.0.0 with Haskell Platform, and I've run cabal update and installed the packages Happy, Alex, and transformers.

I've tried to delete and reinstall everything including Chocolatey, but this did not resolve the issue. Additionally, the instructions linked mention adding Alex and Happy to PATH, but I do not know how to do this.

I've also tried to run cabal install Agda --allow-newer which is similar to a proposed solution here, but this gave me the same error.

Any help would be appreciated!

Full output

PS C:WINDOWSsystem32> cabal install Agda
Resolving dependencies...
Build profile: -w ghc-8.10.3 -O1
In order, the following will be built (use -v for more details):
 - Agda-2.6.1.2 (lib:Agda, exe:agda, exe:agda-mode) (requires build)
Starting     Agda-2.6.1.2 (all, legacy fallback)
Building     Agda-2.6.1.2 (all, legacy fallback)

Failed to build Agda-2.6.1.2.
Build log (
C:UsersfredrAppDataRoamingcaballogsghc-8.10.3Agda-2.6.1.2-6a86b4da38fd320ba893c286a6f43f9d98f47bb1.log
):
Preprocessing executable 'agda-mode' for Agda-2.6.1.2..
Building executable 'agda-mode' for Agda-2.6.1.2..
[1 of 2] Compiling Paths_Agda       ( distuildagda-modeautogenPaths_Agda.hs, distuildagda-modeagda-mode-tmpPaths_Agda.o )
[2 of 2] Compiling Main             ( srcagda-modeMain.hs, distuildagda-modeagda-mode-tmpMain.o )
Linking distuildagda-modeagda-mode.exe ...
Preprocessing library for Agda-2.6.1.2..
Building library for Agda-2.6.1.2..
[  1 of 369] Compiling Agda.Interaction.Options.IORefs ( srcfullAgdaInteractionOptionsIORefs.hs, distuildAgdaInteractionOptionsIORefs.o )
[  2 of 369] Compiling Agda.Syntax.Builtin ( srcfullAgdaSyntaxBuiltin.hs, distuildAgdaSyntaxBuiltin.o )
[  3 of 369] Compiling Agda.Termination.CutOff ( srcfullAgdaTerminationCutOff.hs, distuildAgdaTerminationCutOff.o )
[  4 of 369] Compiling Agda.Termination.Semiring ( srcfullAgdaTerminationSemiring.hs, distuildAgdaTerminationSemiring.o )
[  5 of 369] Compiling Agda.Utils.AffineHole ( srcfullAgdaUtilsAffineHole.hs, distuildAgdaUtilsAffineHole.o )
[  6 of 369] Compiling Agda.Utils.Applicative ( srcfullAgdaUtilsApplicative.hs, distuildAgdaUtilsApplicative.o )
[  7 of 369] Compiling Agda.Utils.BiMap ( srcfullAgdaUtilsBiMap.hs, distuildAgdaUtilsBiMap.o )
[  8 of 369] Compiling Agda.Utils.Environment ( srcfullAgdaUtilsEnvironment.hs, distuildAgdaUtilsEnvironment.o )
[  9 of 369] Compiling Agda.Utils.Except ( srcfullAgdaUtilsExcept.hs, distuildAgdaUtilsExcept.o )
[ 10 of 369] Compiling Agda.Utils.Fail  ( srcfullAgdaUtilsFail.hs, distuildAgdaUtilsFail.o )
[ 11 of 369] Compiling Agda.Utils.Function ( srcfullAgdaUtilsFunction.hs, distuildAgdaUtilsFunction.o )
[ 12 of 369] Compiling Agda.TypeChecking.SizedTypes.Utils ( srcfullAgdaTypeCheckingSizedTypesUtils.hs, distuildAgdaTypeCheckingSizedTypesUtils.o )
[ 13 of 369] Compiling Agda.Utils.Functor ( srcfullAgdaUtilsFunctor.hs, distuildAgdaUtilsFunctor.o )
[ 14 of 369] Compiling Agda.Utils.Haskell.Syntax ( srcfullAgdaUtilsHaskellSyntax.hs, distuildAgdaUtilsHaskellSyntax.o )
[ 15 of 369] Compiling Agda.Utils.IO    ( srcfullAgdaUtilsIO.hs, distuildAgdaUtilsIO.o )
[ 16 of 369] Compiling Agda.Utils.IO.Binary ( srcfullAgdaUtilsIOBinary.hs, distuildAgdaUtilsIOBinary.o )
[ 17 of 369] Compiling Agda.Utils.IO.Directory ( srcfullAgdaUtilsIODirectory.hs, distuildAgdaUtilsIODirectory.o )
[ 18 of 369] Compiling Agda.Utils.IO.UTF8 ( srcfullAgdaUtilsIOUTF8.hs, distuildAgdaUtilsIOUTF8.o )
[ 19 of 369] Compiling Agda.Utils.IO.TempFile ( srcfullAgdaUtilsIOTempFile.hs, distuildAgdaUtilsIOTempFile.o )
[ 20 of 369] Compiling Agda.Utils.IORef ( srcfullAgdaUtilsIORef.hs, distuildAgdaUtilsIORef.o )
[ 21 of 369] Compiling Agda.Utils.Impossible ( srcfullAgdaUtilsImpossible.hs, distuildAgdaUtilsImpossible.o )
[ 22 of 369] Compiling Agda.Utils.Empty ( srcfullAgdaUtilsEmpty.hs, distuildAgdaUtilsEmpty.o )
[ 23 of 369] Compiling Agda.Utils.Bag   ( srcfullAgdaUtilsBag.hs, distuildAgdaUtilsBag.o )
[ 24 of 369] Compiling Agda.ImpossibleTest ( srcfullAgdaImpossibleTest.hs, distuildAgdaImpossibleTest.o )
[ 25 of 369] Compiling Agda.Auto.NarrowingSearch ( srcfullAgdaAutoNarrowingSearch.hs, distuildAgdaAutoNarrowingSearch.o )
[ 26 of 369] Compiling Agda.Utils.IntSet.Infinite ( srcfullAgdaUtilsIntSetInfinite.hs, distuildAgdaUtilsIntSetInfinite.o )
[ 27 of 369] Compiling Agda.Utils.Lens  ( srcfullAgdaUtilsLens.hs, distuildAgdaUtilsLens.o )
[ 28 of 369] Compiling Agda.Utils.IndexedList ( srcfullAgdaUtilsIndexedList.hs, distuildAgdaUtilsIndexedList.o )
[ 29 of 369] Compiling Agda.Interaction.Library.Base ( srcfullAgdaInteractionLibraryBase.hs, distuildAgdaInteractionLibraryBase.o )
[ 30 of 369] Compiling Agda.Auto.Options ( srcfullAgdaAutoOptions.hs, distuildAgdaAutoOptions.o )
[ 31 of 369] Compiling Agda.Utils.Lens.Examples ( srcfullAgdaUtilsLensExamples.hs, distuildAgdaUtilsLensExamples.o )
[ 32 of 369] Compiling Agda.Utils.Map   ( srcfullAgdaUtilsMap.hs, distuildAgdaUtilsMap.o )
[ 33 of 369] Compiling Agda.Utils.Maybe ( srcfullAgdaUtilsMaybe.hs, distuildAgdaUtilsMaybe.o )

srcfullAgdaUtilsMaybe.hs:13:1: error:
    Could not load module `Control.Monad.Trans.Maybe'
    It is a member of the hidden package `transformers-0.5.6.2'.
    Perhaps you need to add `transformers' to the build-depends in your .cabal file.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
13 | import Control.Monad.Trans.Maybe
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal.exe: Failed to build Agda-2.6.1.2. See the build log above for details.
question from:https://stackoverflow.com/questions/65830560/could-not-load-module-control-monad-trans-maybe-while-trying-to-install-agda

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The current release of Agda (2.6.1.2) does not support GHC 8.10.3. You need to either use a supported version of GHC (e.g. 8.10.2) or install the development version of Agda from Github (which does support GHC 8.10.3, see https://github.com/agda/agda/issues/5109).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...