Skip to content

Instantly share code, notes, and snippets.

@MaxGabriel
Created November 16, 2017 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaxGabriel/56e2efe78312ebc62aa4e7c319da16a2 to your computer and use it in GitHub Desktop.
Save MaxGabriel/56e2efe78312ebc62aa4e7c319da16a2 to your computer and use it in GitHub Desktop.
Stack ghci issue
maximiliantagher@Maximilians-MBP ~/D/t/stack-issue> stack ghci --verbose
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1
2017-11-16 14:30:58.199868: [debug] Checking for project config at: /Users/maximiliantagher/Documents/tmp/stack-issue/stack.yaml
@(Stack/Config.hs:974:9)
2017-11-16 14:30:58.200754: [debug] Loading project config file stack.yaml
@(Stack/Config.hs:999:13)
2017-11-16 14:30:58.201947: [debug] Trying to decode /Users/maximiliantagher/.stack/build-plan-cache/x86_64-osx/lts-9.13.cache
@(Data/Store/VersionTagged.hs:72:5)
2017-11-16 14:30:58.215946: [debug] Success decoding /Users/maximiliantagher/.stack/build-plan-cache/x86_64-osx/lts-9.13.cache
@(Data/Store/VersionTagged.hs:76:13)
2017-11-16 14:30:58.216823: [debug] Using standard GHC build
@(Stack/Setup.hs:606:9)
2017-11-16 14:30:58.217278: [debug] Asking GHC for its version
@(Stack/Setup/Installed.hs:103:13)
2017-11-16 14:30:58.217771: [debug] Getting Cabal package version
@(Stack/GhcPkg.hs:189:5)
2017-11-16 14:30:58.217928: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc --numeric-version
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.217994: [debug] Getting global package database location
@(Stack/GhcPkg.hs:55:5)
2017-11-16 14:30:58.218600: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.218962: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.266831: [debug] Process finished in 47ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.267122: [debug] Process finished in 47ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.292619: [debug] Process finished in 74ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc --numeric-version
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.292831: [debug] Resolving package entries
@(Stack/Setup.hs:260:5)
2017-11-16 14:30:58.293326: [debug] Starting to execute command inside EnvConfig
@(Stack/Runners.hs:175:18)
2017-11-16 14:30:58.293480: [debug] Parsing the cabal files of the local packages
@(Stack/Build/Source.hs:328:5)
2017-11-16 14:30:58.293688: [debug] Running hpack on /Users/maximiliantagher/Documents/tmp/stack-issue/package.yaml
@(Stack/Package.hs:1193:9)
2017-11-16 14:30:58.297724: [debug] hpack output unchanged in /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:1204:38)
2017-11-16 14:30:58.299205: [debug] Parsing the targets
@(Stack/Build/Source.hs:265:5)
2017-11-16 14:30:58.299557: [debug] Exception ignored when attempting to load /Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/stack-build-cache: /Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:90:9)
2017-11-16 14:30:58.299821: [debug] Start: getPackageFiles /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:259:21)
2017-11-16 14:30:58.302507: [debug] Finished in 2ms: getPackageFiles /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:259:21)
2017-11-16 14:30:58.303605: [debug] Parsing the cabal files of the local packages
@(Stack/Build/Source.hs:328:5)
2017-11-16 14:30:58.312328: [debug] Running hpack on /Users/maximiliantagher/Documents/tmp/stack-issue/package.yaml
@(Stack/Package.hs:1193:9)
2017-11-16 14:30:58.317554: [debug] hpack output unchanged in /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:1204:38)
2017-11-16 14:30:58.319156: [debug] Parsing the targets
@(Stack/Build/Source.hs:265:5)
2017-11-16 14:30:58.319507: [debug] Running hpack on /Users/maximiliantagher/Documents/tmp/stack-issue/package.yaml
@(Stack/Package.hs:1193:9)
2017-11-16 14:30:58.327343: [debug] hpack output unchanged in /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:1204:38)
2017-11-16 14:30:58.346444: [debug] Parsing the cabal files of the local packages
@(Stack/Build/Source.hs:328:5)
2017-11-16 14:30:58.346738: [debug] Running hpack on /Users/maximiliantagher/Documents/tmp/stack-issue/package.yaml
@(Stack/Package.hs:1193:9)
2017-11-16 14:30:58.351921: [debug] hpack output unchanged in /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:1204:38)
2017-11-16 14:30:58.353617: [debug] Parsing the targets
@(Stack/Build/Source.hs:265:5)
2017-11-16 14:30:58.353845: [debug] Exception ignored when attempting to load /Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/stack-build-cache: /Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:90:9)
2017-11-16 14:30:58.354164: [debug] Start: getPackageFiles /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:259:21)
2017-11-16 14:30:58.356780: [debug] Finished in 2ms: getPackageFiles /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:259:21)
2017-11-16 14:30:58.357397: [debug] Finding out which packages are already installed
@(Stack/Build/Installed.hs:69:5)
2017-11-16 14:30:58.368350: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.416513: [debug] Process finished in 48ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.437156: [debug] Ignoring package haskeline due to wanting version 0.7.4.0 instead of 0.7.3.0
@(Stack/Build/Installed.hs:199:5)
2017-11-16 14:30:58.437275: [debug] Ignoring package terminfo due to wanting version 0.4.1.0 instead of 0.4.0.2
@(Stack/Build/Installed.hs:199:5)
2017-11-16 14:30:58.437430: [debug] Ignoring package xhtml due to wanting version 3000.2.2 instead of 3000.2.1
@(Stack/Build/Installed.hs:199:5)
2017-11-16 14:30:58.437681: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --user --no-user-package-db --package-db /Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.13/8.0.2/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.588222: [debug] Process finished in 150ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --user --no-user-package-db --package-db /Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.13/8.0.2/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.590936: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --user --no-user-package-db --package-db /Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/install/x86_64-osx/lts-9.13/8.0.2/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.631317: [debug] Process finished in 40ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --user --no-user-package-db --package-db /Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/install/x86_64-osx/lts-9.13/8.0.2/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.631956: [debug] Constructing the build plan
@(Stack/Build/ConstructPlan.hs:188:5)
2017-11-16 14:30:58.635688: [debug] Checking if we are going to build multiple executables with the same name
@(Stack/Build.hs:210:5)
2017-11-16 14:30:58.636012: [debug] Executing the build plan
@(Stack/Build/Execute.hs:478:5)
2017-11-16 14:30:58.636820: [debug] Getting global package database location
@(Stack/GhcPkg.hs:55:5)
2017-11-16 14:30:58.637017: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.682781: [debug] Process finished in 45ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.683837: [info] stack-issue-0.0.0: initial-build-steps (lib + exe)
@(Stack/Build/Execute.hs:830:23)
2017-11-16 14:30:58.684093: [debug] Run process: /Users/maximiliantagher/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 repl stack-initial-build-steps
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.701409: [debug] Process finished in 17ms: /Users/maximiliantagher/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 repl stack-initial-build-steps
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.701878: [debug] Finding out which packages are already installed
@(Stack/Build/Installed.hs:69:5)
2017-11-16 14:30:58.701974: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.750311: [debug] Process finished in 48ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.750455: [debug] Ignoring package haskeline due to wanting version 0.7.4.0 instead of 0.7.3.0
@(Stack/Build/Installed.hs:199:5)
2017-11-16 14:30:58.750522: [debug] Ignoring package terminfo due to wanting version 0.4.1.0 instead of 0.4.0.2
@(Stack/Build/Installed.hs:199:5)
2017-11-16 14:30:58.750650: [debug] Ignoring package xhtml due to wanting version 3000.2.2 instead of 3000.2.1
@(Stack/Build/Installed.hs:199:5)
2017-11-16 14:30:58.751010: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --user --no-user-package-db --package-db /Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.13/8.0.2/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.880680: [debug] Process finished in 129ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --user --no-user-package-db --package-db /Users/maximiliantagher/.stack/snapshots/x86_64-osx/lts-9.13/8.0.2/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.882469: [debug] Run process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --user --no-user-package-db --package-db /Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/install/x86_64-osx/lts-9.13/8.0.2/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.922243: [debug] Process finished in 39ms: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc-pkg --user --no-user-package-db --package-db /Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/install/x86_64-osx/lts-9.13/8.0.2/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-11-16 14:30:58.924609: [debug] Start: getPackageFiles /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:259:21)
2017-11-16 14:30:58.928870: [debug] Finished in 4ms: getPackageFiles /Users/maximiliantagher/Documents/tmp/stack-issue/stack-issue.cabal
@(Stack/Package.hs:259:21)
2017-11-16 14:30:58.932325: [warn] The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
@(Stack/Ghci.hs:349:9)
2017-11-16 14:30:58.932409: [info] Configuring GHCi with the following packages: stack-issue
@(Stack/Ghci.hs:356:5)
2017-11-16 14:30:58.932996: [debug] Run process: ghc --version
@(Stack/Exec.hs:85:10)
2017-11-16 14:30:58.933161: [debug] Creating process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc --version
@(System/Process/Run.hs:118:5)
2017-11-16 14:30:59.015999: [debug] Process finished in 82ms: ghc --version
@(Stack/Exec.hs:85:10)
2017-11-16 14:30:59.016166: [warn]
@(Stack/Ghci.hs:689:5)
2017-11-16 14:30:59.016212: [warn] * * * * * * * *
@(Stack/Ghci.hs:690:5)
2017-11-16 14:30:59.016246: [warn] The main module to load is ambiguous. Candidates are:
@(Stack/Ghci.hs:458:13)
2017-11-16 14:30:59.016358: [warn] 1. Package `stack-issue' component exe:second-executable with main-is file: /Users/maximiliantagher/Documents/tmp/stack-issue/executable/Main2.hs
@(Stack/Ghci.hs:459:52)
2017-11-16 14:30:59.016420: [warn] 2. Package `stack-issue' component exe:stack-issue with main-is file: /Users/maximiliantagher/Documents/tmp/stack-issue/executable/Main.hs
@(Stack/Ghci.hs:459:52)
2017-11-16 14:30:59.016461: [warn] You can specify which one to pick by:
@(Stack/Ghci.hs:460:13)
2017-11-16 14:30:59.016532: [warn] * Specifying targets to stack ghci e.g. stack ghci stack-issue:exe:second-executable
@(Stack/Ghci.hs:462:13)
2017-11-16 14:30:59.016694: [warn] * Specifying what the main is e.g. stack ghci --main-is stack-issue:exe:second-executable
@(Stack/Ghci.hs:465:13)
2017-11-16 14:30:59.016743: [warn] * Choosing from the candidate above [1..2]
@(Stack/Ghci.hs:468:13)
2017-11-16 14:30:59.016795: [warn] * * * * * * * *
@(Stack/Ghci.hs:692:5)
2017-11-16 14:30:59.016837: [warn]
@(Stack/Ghci.hs:693:5)
Specify main module to use (press enter to load none):
Not loading any main modules, as no valid module selected
2017-11-16 14:31:01.090674: [debug] Run process: ghc --interactive -i -odir=/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/odir -hidir=/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/odir -hide-all-packages -i/Users/maximiliantagher/Documents/tmp/stack-issue/library -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build -stubdir=/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build -package-id=base-4.9.1.0 -i/Users/maximiliantagher/Documents/tmp/stack-issue/executable -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/second-executable/second-executable-tmp -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/stack-issue/stack-issue-tmp -Wall -Wall -rtsopts -with-rtsopts=-N -Wall -rtsopts -with-rtsopts=-N -optP-include -optP/private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/ghci92794/cabal_macros.h -ghci-script=/private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/ghci92794/ghci-script
@(Stack/Exec.hs:76:10)
2017-11-16 14:31:01.091045: [debug] Creating process: /Users/maximiliantagher/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc --interactive -i -odir=/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/odir -hidir=/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/odir -hide-all-packages -i/Users/maximiliantagher/Documents/tmp/stack-issue/library -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build -stubdir=/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build -package-id=base-4.9.1.0 -i/Users/maximiliantagher/Documents/tmp/stack-issue/executable -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/second-executable/second-executable-tmp -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/stack-issue/stack-issue-tmp -Wall -Wall -rtsopts -with-rtsopts=-N -Wall -rtsopts -with-rtsopts=-N -optP-include -optP/private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/ghci92794/cabal_macros.h -ghci-script=/private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/ghci92794/ghci-script
@(System/Process/Run.hs:102:5)
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
/Users/maximiliantagher/Documents/tmp/stack-issue/executable/Main2.hs:1:1: error:
File name does not match module name:
Saw: ‘Main’
Expected: ‘Main2’
Failed, modules loaded: none.
<no location info>: error:
Could not find module ‘Example’
It is not a module in the current program, or in any known package.
Loaded GHCi configuration from /private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/ghci92794/ghci-script
Prelude> import Example
<no location info>: error:
Could not find module ‘Example’
It is not a module in the current program, or in any known package.
Prelude>
Leaving GHCi.
2017-11-16 14:32:53.448223: [debug] Process finished in 112355ms: ghc --interactive -i -odir=/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/odir -hidir=/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/odir -hide-all-packages -i/Users/maximiliantagher/Documents/tmp/stack-issue/library -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build -stubdir=/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build -package-id=base-4.9.1.0 -i/Users/maximiliantagher/Documents/tmp/stack-issue/executable -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/second-executable/second-executable-tmp -i/Users/maximiliantagher/Documents/tmp/stack-issue/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/stack-issue/stack-issue-tmp -Wall -Wall -rtsopts -with-rtsopts=-N -Wall -rtsopts -with-rtsopts=-N -optP-include -optP/private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/ghci92794/cabal_macros.h -ghci-script=/private/var/folders/v7/5k06hq7d3wbb4cvk8smv6kl00000gn/T/ghci92794/ghci-script
@(Stack/Exec.hs:76:10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment