haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 210 forks source link

hie 1.0.0.0 "cabal-helper: Saved package config file is outdated" #1568

Closed sureyeaah closed 4 years ago

sureyeaah commented 4 years ago

I'm using hie-8.6.5 v1.0.0.0 on pretty-simple.

HIE starts fine but throws an error message if I try to perform some action (e.g. go-to-definition).

cabal-helper: Saved package config file is outdated:
• the Cabal version changed from Cabal-2.4.1.0 to Cabal-2.4.0.1
Re-run the 'configure' command.

stack build works just fine. I had no issues while using v0.14.0.0.

Log:

2020-01-09 23:04:31.535900631 [ThreadId 4] - run entered for hie-wrapp
er(hie-wrapper) Version 1.0.0.0, Git revision 059f354ae473f173b939f266
d097c2020dfda741 (dirty) (358
2 commits) 
x86_64 ghc
-8.6.5
20
20-01-09 23:04:
31.543979231
 [ThreadId 4] - Current di
rectory:/mnt/DATA/Code/pret
ty-simple
2020-01-09 23:
04:31.544322735 
[ThreadId 4] - Op
erating system:linux
2020-01-09 23:04:31.544546954 [Th
readId 4] - args:[
"--lsp"]
202
0-01-09 23:04:31.546769
419 [ThreadId 4] - Ca
bal-Helper decided to u
se: ProjLocStackYa
ml {plStackYaml = "/
mnt/DATA/Code/pretty-s
imple/stack.yaml"}
2020-01
-09 23:04:33.000977728 [ThreadId 4] - Module "/mnt/DATA/Code/pretty-simple/Fil
e.hs" is loaded by Cradle: Cr
adle {cradleRootDir = 
"/mnt/DATA/Code/pre
tty-simple", cradle
OptsProg = CradleAct
ion: Cabal-Helper-Sta
ck}
2020-0
1-09 23:04:33.0
01552355 [ThreadId 4]
 - Cradle directory:
/mnt/DATA/Code/pret
ty-simple
202
0-01-09 23:04:33.001
890798 [ThreadId 4] -
 Use Stack GHC
2020-01-09 23
:04:33.326223393 [ThreadId 4] - Project GHC version:8.6.5
2020-01-09 23:04:33
.326495495 [ThreadId 
4] - hie exe candidate
s :["hie-8.6.5","hi
e-8.6","hie"]
2020-01-09 23:04
:33.327125352 [ThreadId 4] - found 
hie exe at:/home/shaurya/.lo
cal/bin/hie-8.6.5
2020-01-09 23:
04:33.32740742 
[ThreadId 4] - args:
["--lsp"]
2
020-01-09 23:04:3
3.327589609 [Thre
adId 4] - launching 
....

2020-01-09 23:04:33.330139137 [ThreadId 4] - Run entered for HIE(hie-8.6.5) Version 1.0.0.0, Git revision 059f354ae473f173b939f266d097c2020dfda741 (dirty) (3582 commits) x86_64 ghc-8.6.5
2020-01-09 23:04:33.330382229 [ThreadId 4] - Operating as a LSP server on stdio
2020-01-09 23:04:33.330427918 [ThreadId 4] - Current directory:/mnt/DATA/Code/pretty-simple
2020-01-09 23:04:33.330471634 [ThreadId 4] - Operating system:linux
2020-01-09 23:04:33.330512222 [ThreadId 4] - args:["--lsp"]
2020-01-09 23:04:33.356306095 [ThreadId 4] - Cabal-Helper decided to use: ProjLocStackYaml {plStackYaml = "/mnt/DATA/Code/pretty-simple/stack.yaml"}
2020-01-09 23:04:34.763831263 [ThreadId 4] - Module "/mnt/DATA/Code/pretty-simple/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/mnt/DATA/Code/pretty-simple", cradleOptsProg = CradleAction: Cabal-Helper-Stack}
2020-01-09 23:04:34.763959429 [ThreadId 4] - Use Stack GHC
2020-01-09 23:04:35.083053167 [ThreadId 29] - Use Stack GHC
Using hie version: Version 1.0.0.0, Git revision 059f354ae473f173b939f266d097c2020dfda741 (dirty) (3582 commits) x86_64 ghc-8.6.5
Using hoogle db at: /home/shaurya/.hoogle/default-haskell-5.0.17.hoo
2020-01-09 23:04:35.428124196 [ThreadId 35] - New cradle: /mnt/DATA/Code/pretty-simple/src/Debug/Pretty/Simple.hs
2020-01-09 23:04:35.43058184 [ThreadId 35] - Cabal-Helper decided to use: ProjLocStackYaml {plStackYaml = "/mnt/DATA/Code/pretty-simple/stack.yaml"}
2020-01-09 23:04:36.816028553 [ThreadId 35] - Module "/mnt/DATA/Code/pretty-simple/src/Debug/Pretty/Simple.hs" is loaded by Cradle: Cradle {cradleRootDir = "/mnt/DATA/Code/pretty-simple", cradleOptsProg = CradleAction: Cabal-Helper-Stack}
2020-01-09 23:04:36.816118642 [ThreadId 35] - Found cradle: Cradle {cradleRootDir = "/mnt/DATA/Code/pretty-simple", cradleOptsProg = CradleAction: Cabal-Helper-Stack}
cabal-helper: Saved package config file is outdated:
• the Cabal version changed from Cabal-2.4.1.0 to Cabal-2.4.0.1
Re-run the 'configure' command.
2020-01-09 23:04:37.316241076 [ThreadId 29] - Scheduler thread exited unexpectedly: panic! invokeHelper: /mnt/DATA/Code/pretty-simple/.stack-work/cabal-helper/cabal-helper "/mnt/DATA/Code/pretty-simple/pretty-simple.cabal" "/mnt/DATA/Code/pretty-simple/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1" "v2" "package-id" "compiler-id" "flags" "config-flags" "non-default-config-flags" "component-info" failed!
fendor commented 4 years ago

Same question as in https://github.com/Infinisil/all-hies/issues/40 Can not reproduce with all-hies. Please more information, does it happen on all projects or only one? If only one, can you maybe share it?

mpickering commented 4 years ago

Looks simple - hie uses cabal when the user expects to use stack?

fendor commented 4 years ago

It is using the stack cradle: 2020-01-09 23:04:36.816118642 [ThreadId 35] - Found cradle: Cradle {cradleRootDir = "/mnt/DATA/Code/pretty-simple", cradleOptsProg = CradleAction: Cabal-Helper-Stack} Problem is somehow related to Cabal. Stack still uses Cabal right?

sureyeaah commented 4 years ago

Same question as in Infinisil/all-hies#40 Can not reproduce with all-hies. Please more information, does it happen on all projects or only one? If only one, can you maybe share it?

It happens with the pretty-simple project only.

fendor commented 4 years ago

Can reproduce on pretty-simple with cabal-helper. Adding hie.yaml

cradle:
  stack:

works though.

fendor commented 4 years ago

Interesting observation: cabal says the Cabal version ought to be Cabal 2.4.0.1 in the stack lts, a Cabal version of Cabal 2.4.1.0 is specified.

fendor commented 4 years ago

Relevant cabal-helper logs: https://gist.github.com/fendor/e572957ef3523d60a6653e77654beba9

Inlined logs ``` 2020-01-10 15:57:00.466747082 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 1.0.0.0 x86_64 ghc-8.6.5 2020-01-10 15:57:00.482114385 [ThreadId 4] - Current directory:/home/baldr/Documents/haskell/pretty-simple 2020-01-10 15:57:00.535033173 [ThreadId 4] - Operating system:linux 2020-01-10 15:57:00.543910847 [ThreadId 4] - args:["--debug","--lsp"] 2020-01-10 15:57:00.546681078 [ThreadId 4] - Cabal-Helper found these projects: ["ProjLocStackYaml {plStackYaml = \"/home/baldr/Documents/haskell/pretty-simple/stack.yaml\"}","ProjLocV2Dir {plProjectDirV2 = \"/home/baldr/Documents/haskell/pretty-simple\"}","ProjLocV1Dir {plProjectDirV1 = \"/home/baldr/Documents/haskell/pretty-simple\"}"] 2020-01-10 15:57:00.60664283 [ThreadId 4] - These projects have the build tools installed: ["ProjLocStackYaml {plStackYaml = \"/home/baldr/Documents/haskell/pretty-simple/stack.yaml\"}","ProjLocV2Dir {plProjectDirV2 = \"/home/baldr/Documents/haskell/pretty-simple\"}","ProjLocV1Dir {plProjectDirV1 = \"/home/baldr/Documents/haskell/pretty-simple\"}"] 2020-01-10 15:57:00.659039049 [ThreadId 4] - Cabal-Helper decided to use: ProjLocStackYaml {plStackYaml = "/home/baldr/Documents/haskell/pretty-simple/stack.yaml"} 2020-01-10 15:57:00.659683954 [ThreadId 4] - Cabal-Helper dirs: ["/home/baldr/Documents/haskell/pretty-simple","/home/baldr/Documents/haskell/pretty-simple/File.hs"] cd /home/baldr/Documents/haskell/pretty-simple; stack path --stack-yaml=/home/baldr/Documents/haskell/pretty-simple/stack.yaml => snapshot-doc-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-doc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-hoogle-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/hoogle/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5 => stack-root: /home/baldr/.stack => project-root: /home/baldr/Documents/haskell/pretty-simple => config-location: /home/baldr/Documents/haskell/pretty-simple/stack.yaml => bin-path: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/bin:/home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/lb3hli8d9536g45mndwfwyi6fpny0blh-bash-interactive-4.4-p23/bin:/nix/store/2xwxj5qrrc71asdk1wyq19nz9k845pzs-patchelf-0.9/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/bin:/nix/store/62x7m20m7lm8y8s17cbgha0sf3cmma19-gcc-8.3.0/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/gwwycf3w6cbj0gd2mpgblrdjc24f3cys-binutils-wrapper-2.31.1/bin:/nix/store/ajrrkivdfvp8dp4vdg5hp1h5hblmanc9-binutils-2.31.1/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/bin:/nix/store/my5v4x1n5568vgziyc63vmc97nk8ril9-ncurses-6.1-20190112/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/0zdsw4qdrwi41mfdwqpxknsvk9fz3gkb-findutils-4.7.0/bin:/nix/store/dys98skw6ifw5qsqrhjxjjiydyfbg3nq-diffutils-3.7/bin:/nix/store/g2h4491kab7l06v9rf1lnyjvzdwy5ak0-gnused-4.7/bin:/nix/store/71y5ddyz8vmsw9wgi3gzifcls53r60i9-gnugrep-3.3/bin:/nix/store/84yafwjc6sga23vwsbahhymikjhfbnw4-gawk-5.0.1/bin:/nix/store/aawf0q16ql39w2gwv52qyjfzgbg5f22r-gnutar-1.32/bin:/nix/store/afyqk8219zfv5and3pqahzvn6bpmx3dq-gzip-1.10/bin:/nix/store/iws7dm1jij4lv09mbpwf9i8lc1d4b798-bzip2-1.0.6.0.1-bin/bin:/nix/store/j8fq1ksp37w88rx80blzazldi17f3x7s-gnumake-4.2.1/bin:/nix/store/rm1hz1lybxangc8sdl7xvzs5dcvigvf7-bash-4.4-p23/bin:/nix/store/lmi2nqb1cfzr3ps2zkq97q88zzkhp4mj-patch-2.7.6/bin:/nix/store/y04xj2mbc66zs53fackn1wwlrv31bv3y-xz-5.2.4-bin/bin => programs: /home/baldr/.stack/programs/x86_64-linux-nix => compiler-exe: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-8.6.5 => compiler-bin: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin => compiler-tools-bin: /home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin => local-bin: /home/baldr/.local/bin => extra-include-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/include, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/include, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include, /nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include => extra-library-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/lib, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib, /nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib => snapshot-pkg-db: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => local-pkg-db: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => global-pkg-db: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => ghc-package-path: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => snapshot-install-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => local-install-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => dist-dir: .stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1 => local-hpc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/hpc => local-bin-path: /home/baldr/.local/bin => ghc-paths: /home/baldr/.stack/programs/x86_64-linux-nix cd /home/baldr/Documents/haskell/pretty-simple; PATH=EnvPrepend "/tmp/cabal-helper-symlinks3718:" stack ide packages --cabal-files --stdout => /home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal cd /home/baldr/Documents/haskell/pretty-simple; PATH=EnvPrepend "/tmp/cabal-helper-symlinks3718:" stack path --stack-yaml=/home/baldr/Documents/haskell/pretty-simple/stack.yaml => snapshot-doc-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-doc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-hoogle-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/hoogle/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5 => stack-root: /home/baldr/.stack => project-root: /home/baldr/Documents/haskell/pretty-simple => config-location: /home/baldr/Documents/haskell/pretty-simple/stack.yaml => bin-path: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/bin:/home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/lb3hli8d9536g45mndwfwyi6fpny0blh-bash-interactive-4.4-p23/bin:/nix/store/2xwxj5qrrc71asdk1wyq19nz9k845pzs-patchelf-0.9/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/bin:/nix/store/62x7m20m7lm8y8s17cbgha0sf3cmma19-gcc-8.3.0/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/gwwycf3w6cbj0gd2mpgblrdjc24f3cys-binutils-wrapper-2.31.1/bin:/nix/store/ajrrkivdfvp8dp4vdg5hp1h5hblmanc9-binutils-2.31.1/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/bin:/nix/store/my5v4x1n5568vgziyc63vmc97nk8ril9-ncurses-6.1-20190112/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/0zdsw4qdrwi41mfdwqpxknsvk9fz3gkb-findutils-4.7.0/bin:/nix/store/dys98skw6ifw5qsqrhjxjjiydyfbg3nq-diffutils-3.7/bin:/nix/store/g2h4491kab7l06v9rf1lnyjvzdwy5ak0-gnused-4.7/bin:/nix/store/71y5ddyz8vmsw9wgi3gzifcls53r60i9-gnugrep-3.3/bin:/nix/store/84yafwjc6sga23vwsbahhymikjhfbnw4-gawk-5.0.1/bin:/nix/store/aawf0q16ql39w2gwv52qyjfzgbg5f22r-gnutar-1.32/bin:/nix/store/afyqk8219zfv5and3pqahzvn6bpmx3dq-gzip-1.10/bin:/nix/store/iws7dm1jij4lv09mbpwf9i8lc1d4b798-bzip2-1.0.6.0.1-bin/bin:/nix/store/j8fq1ksp37w88rx80blzazldi17f3x7s-gnumake-4.2.1/bin:/nix/store/rm1hz1lybxangc8sdl7xvzs5dcvigvf7-bash-4.4-p23/bin:/nix/store/lmi2nqb1cfzr3ps2zkq97q88zzkhp4mj-patch-2.7.6/bin:/nix/store/y04xj2mbc66zs53fackn1wwlrv31bv3y-xz-5.2.4-bin/bin => programs: /home/baldr/.stack/programs/x86_64-linux-nix => compiler-exe: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-8.6.5 => compiler-bin: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin => compiler-tools-bin: /home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin => local-bin: /home/baldr/.local/bin => extra-include-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/include, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/include, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include, /nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include => extra-library-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/lib, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib, /nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib => snapshot-pkg-db: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => local-pkg-db: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => global-pkg-db: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => ghc-package-path: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => snapshot-install-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => local-install-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => dist-dir: .stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1 => local-hpc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/hpc => local-bin-path: /home/baldr/.local/bin => ghc-paths: /home/baldr/.stack/programs/x86_64-linux-nix /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 list --simple-output Cabal --package-conf=/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => Cabal-2.4.0.1 2020-01-10 15:57:04.691227968 [ThreadId 4] - Cabal-Helper cradle package: Package {pPackageName = "pretty-simple", pSourceDir = "/home/baldr/Documents/haskell/pretty-simple", pCabalFile = CabalFile "/home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal", pFlags = [], pUnits = Unit {uUnitId = UnitId "pretty-simple", uPackage = Package {pPackageName = "pretty-simple", pSourceDir = "/home/baldr/Documents/haskell/pretty-simple", pCabalFile = CabalFile "/home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal", pFlags = [], pUnits = ()}, uDistDir = DistDirLib "/home/baldr/Documents/haskell/pretty-simple/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1", uImpl = UnitImplStack} :| []} 2020-01-10 15:57:04.693996158 [ThreadId 4] - Cabal-Helper normalisedPackageLocation: /home/baldr/Documents/haskell/pretty-simple 2020-01-10 15:57:04.694381902 [ThreadId 4] - Module "/home/baldr/Documents/haskell/pretty-simple/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/baldr/Documents/haskell/pretty-simple", cradleOptsProg = CradleAction: Cabal-Helper-Stack} 2020-01-10 15:57:04.695211669 [ThreadId 4] - Cradle directory:/home/baldr/Documents/haskell/pretty-simple 2020-01-10 15:57:04.695816181 [ThreadId 4] - Use Stack GHC 2020-01-10 15:57:06.134705087 [ThreadId 4] - GHC Output: "Just "8.6.5"" 2020-01-10 15:57:06.135036144 [ThreadId 4] - Project GHC version:8.6.5 2020-01-10 15:57:06.135334757 [ThreadId 4] - hie exe candidates :["hie-8.6.5","hie-8.6","hie"] 2020-01-10 15:57:06.136007441 [ThreadId 4] - found hie exe at:/home/baldr/.local/bin/hie-8.6.5 2020-01-10 15:57:06.136278117 [ThreadId 4] - args:["--debug","--lsp"] 2020-01-10 15:57:06.136511695 [ThreadId 4] - launching .... 2020-01-10 15:57:06.13917702 [ThreadId 4] - Run entered for HIE(hie-8.6.5) Version 1.0.0.0 x86_64 ghc-8.6.5 2020-01-10 15:57:06.139398525 [ThreadId 4] - Operating as a LSP server on stdio 2020-01-10 15:57:06.139459598 [ThreadId 4] - Current directory:/home/baldr/Documents/haskell/pretty-simple 2020-01-10 15:57:06.139507521 [ThreadId 4] - Operating system:linux 2020-01-10 15:57:06.139557735 [ThreadId 4] - args:["--debug","--lsp"] 2020-01-10 15:57:06.139713867 [ThreadId 4] - haskell-lsp:Starting up server ... 2020-01-10 15:57:06.140503798 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":3655,"clientInfo":{"name":"vscode","version":"1.41.0"},"rootPath":"/home/baldr/Documents/haskell/pretty-simple","rootUri":"file:///home/baldr/Documents/haskell/pretty-simple","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"trace":"off","workspaceFolders":[{"uri":"file:///home/baldr/Documents/haskell/pretty-simple","name":"pretty-simple"}]}} 2020-01-10 15:57:06.142500709 [ThreadId 4] - haskell-lsp:initializeRequestHandler: setting current dir to project root:/home/baldr/Documents/haskell/pretty-simple 2020-01-10 15:57:06.142715538 [ThreadId 4] - Dummy Cradle file result: /home/baldr/Documents/haskell/pretty-simple/File.hs 2020-01-10 15:57:06.170244661 [ThreadId 4] - Cabal-Helper found these projects: ["ProjLocStackYaml {plStackYaml = \"/home/baldr/Documents/haskell/pretty-simple/stack.yaml\"}","ProjLocV2Dir {plProjectDirV2 = \"/home/baldr/Documents/haskell/pretty-simple\"}","ProjLocV1Dir {plProjectDirV1 = \"/home/baldr/Documents/haskell/pretty-simple\"}"] 2020-01-10 15:57:06.170751463 [ThreadId 4] - These projects have the build tools installed: ["ProjLocStackYaml {plStackYaml = \"/home/baldr/Documents/haskell/pretty-simple/stack.yaml\"}","ProjLocV2Dir {plProjectDirV2 = \"/home/baldr/Documents/haskell/pretty-simple\"}","ProjLocV1Dir {plProjectDirV1 = \"/home/baldr/Documents/haskell/pretty-simple\"}"] 2020-01-10 15:57:06.170830437 [ThreadId 4] - Cabal-Helper decided to use: ProjLocStackYaml {plStackYaml = "/home/baldr/Documents/haskell/pretty-simple/stack.yaml"} 2020-01-10 15:57:06.170878065 [ThreadId 4] - Cabal-Helper dirs: ["/home/baldr/Documents/haskell/pretty-simple","/home/baldr/Documents/haskell/pretty-simple/File.hs"] cd /home/baldr/Documents/haskell/pretty-simple; stack path --stack-yaml=/home/baldr/Documents/haskell/pretty-simple/stack.yaml => snapshot-doc-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-doc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-hoogle-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/hoogle/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5 => stack-root: /home/baldr/.stack => project-root: /home/baldr/Documents/haskell/pretty-simple => config-location: /home/baldr/Documents/haskell/pretty-simple/stack.yaml => bin-path: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/bin:/home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/lb3hli8d9536g45mndwfwyi6fpny0blh-bash-interactive-4.4-p23/bin:/nix/store/2xwxj5qrrc71asdk1wyq19nz9k845pzs-patchelf-0.9/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/bin:/nix/store/62x7m20m7lm8y8s17cbgha0sf3cmma19-gcc-8.3.0/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/gwwycf3w6cbj0gd2mpgblrdjc24f3cys-binutils-wrapper-2.31.1/bin:/nix/store/ajrrkivdfvp8dp4vdg5hp1h5hblmanc9-binutils-2.31.1/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/bin:/nix/store/my5v4x1n5568vgziyc63vmc97nk8ril9-ncurses-6.1-20190112/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/0zdsw4qdrwi41mfdwqpxknsvk9fz3gkb-findutils-4.7.0/bin:/nix/store/dys98skw6ifw5qsqrhjxjjiydyfbg3nq-diffutils-3.7/bin:/nix/store/g2h4491kab7l06v9rf1lnyjvzdwy5ak0-gnused-4.7/bin:/nix/store/71y5ddyz8vmsw9wgi3gzifcls53r60i9-gnugrep-3.3/bin:/nix/store/84yafwjc6sga23vwsbahhymikjhfbnw4-gawk-5.0.1/bin:/nix/store/aawf0q16ql39w2gwv52qyjfzgbg5f22r-gnutar-1.32/bin:/nix/store/afyqk8219zfv5and3pqahzvn6bpmx3dq-gzip-1.10/bin:/nix/store/iws7dm1jij4lv09mbpwf9i8lc1d4b798-bzip2-1.0.6.0.1-bin/bin:/nix/store/j8fq1ksp37w88rx80blzazldi17f3x7s-gnumake-4.2.1/bin:/nix/store/rm1hz1lybxangc8sdl7xvzs5dcvigvf7-bash-4.4-p23/bin:/nix/store/lmi2nqb1cfzr3ps2zkq97q88zzkhp4mj-patch-2.7.6/bin:/nix/store/y04xj2mbc66zs53fackn1wwlrv31bv3y-xz-5.2.4-bin/bin => programs: /home/baldr/.stack/programs/x86_64-linux-nix => compiler-exe: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-8.6.5 => compiler-bin: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin => compiler-tools-bin: /home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin => local-bin: /home/baldr/.local/bin => extra-include-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/include, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/include, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include, /nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include => extra-library-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/lib, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib, /nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib => snapshot-pkg-db: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => local-pkg-db: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => global-pkg-db: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => ghc-package-path: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => snapshot-install-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => local-install-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => dist-dir: .stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1 => local-hpc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/hpc => local-bin-path: /home/baldr/.local/bin => ghc-paths: /home/baldr/.stack/programs/x86_64-linux-nix cd /home/baldr/Documents/haskell/pretty-simple; PATH=EnvPrepend "/tmp/cabal-helper-symlinks3883:" stack ide packages --cabal-files --stdout => /home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal cd /home/baldr/Documents/haskell/pretty-simple; PATH=EnvPrepend "/tmp/cabal-helper-symlinks3883:" stack path --stack-yaml=/home/baldr/Documents/haskell/pretty-simple/stack.yaml => snapshot-doc-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-doc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-hoogle-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/hoogle/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5 => stack-root: /home/baldr/.stack => project-root: /home/baldr/Documents/haskell/pretty-simple => config-location: /home/baldr/Documents/haskell/pretty-simple/stack.yaml => bin-path: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/bin:/home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/lb3hli8d9536g45mndwfwyi6fpny0blh-bash-interactive-4.4-p23/bin:/nix/store/2xwxj5qrrc71asdk1wyq19nz9k845pzs-patchelf-0.9/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/bin:/nix/store/62x7m20m7lm8y8s17cbgha0sf3cmma19-gcc-8.3.0/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/gwwycf3w6cbj0gd2mpgblrdjc24f3cys-binutils-wrapper-2.31.1/bin:/nix/store/ajrrkivdfvp8dp4vdg5hp1h5hblmanc9-binutils-2.31.1/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/bin:/nix/store/my5v4x1n5568vgziyc63vmc97nk8ril9-ncurses-6.1-20190112/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/0zdsw4qdrwi41mfdwqpxknsvk9fz3gkb-findutils-4.7.0/bin:/nix/store/dys98skw6ifw5qsqrhjxjjiydyfbg3nq-diffutils-3.7/bin:/nix/store/g2h4491kab7l06v9rf1lnyjvzdwy5ak0-gnused-4.7/bin:/nix/store/71y5ddyz8vmsw9wgi3gzifcls53r60i9-gnugrep-3.3/bin:/nix/store/84yafwjc6sga23vwsbahhymikjhfbnw4-gawk-5.0.1/bin:/nix/store/aawf0q16ql39w2gwv52qyjfzgbg5f22r-gnutar-1.32/bin:/nix/store/afyqk8219zfv5and3pqahzvn6bpmx3dq-gzip-1.10/bin:/nix/store/iws7dm1jij4lv09mbpwf9i8lc1d4b798-bzip2-1.0.6.0.1-bin/bin:/nix/store/j8fq1ksp37w88rx80blzazldi17f3x7s-gnumake-4.2.1/bin:/nix/store/rm1hz1lybxangc8sdl7xvzs5dcvigvf7-bash-4.4-p23/bin:/nix/store/lmi2nqb1cfzr3ps2zkq97q88zzkhp4mj-patch-2.7.6/bin:/nix/store/y04xj2mbc66zs53fackn1wwlrv31bv3y-xz-5.2.4-bin/bin => programs: /home/baldr/.stack/programs/x86_64-linux-nix => compiler-exe: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-8.6.5 => compiler-bin: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin => compiler-tools-bin: /home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin => local-bin: /home/baldr/.local/bin => extra-include-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/include, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/include, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include, /nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include => extra-library-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/lib, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib, /nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib => snapshot-pkg-db: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => local-pkg-db: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => global-pkg-db: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => ghc-package-path: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => snapshot-install-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => local-install-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => dist-dir: .stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1 => local-hpc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/hpc => local-bin-path: /home/baldr/.local/bin => ghc-paths: /home/baldr/.stack/programs/x86_64-linux-nix /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 list --simple-output Cabal --package-conf=/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => Cabal-2.4.0.1 2020-01-10 15:57:09.800027213 [ThreadId 4] - Cabal-Helper cradle package: Package {pPackageName = "pretty-simple", pSourceDir = "/home/baldr/Documents/haskell/pretty-simple", pCabalFile = CabalFile "/home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal", pFlags = [], pUnits = Unit {uUnitId = UnitId "pretty-simple", uPackage = Package {pPackageName = "pretty-simple", pSourceDir = "/home/baldr/Documents/haskell/pretty-simple", pCabalFile = CabalFile "/home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal", pFlags = [], pUnits = ()}, uDistDir = DistDirLib "/home/baldr/Documents/haskell/pretty-simple/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1", uImpl = UnitImplStack} :| []} 2020-01-10 15:57:09.800313796 [ThreadId 4] - Cabal-Helper normalisedPackageLocation: /home/baldr/Documents/haskell/pretty-simple 2020-01-10 15:57:09.80036299 [ThreadId 4] - Module "/home/baldr/Documents/haskell/pretty-simple/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/baldr/Documents/haskell/pretty-simple", cradleOptsProg = CradleAction: Cabal-Helper-Stack} 2020-01-10 15:57:09.800683168 [ThreadId 4] - Use Stack GHC 2020-01-10 15:57:11.278270973 [ThreadId 4] - GHC Output: "Just "8.6.5"" 2020-01-10 15:57:11.278695306 [ThreadId 32] - Use Stack GHC 2020-01-10 15:57:11.279233741 [ThreadId 33] - ****** reactor: top of loop 2020-01-10 15:57:11.279504279 [ThreadId 5] - <--2--{"result":{"capabilities":{"typeDefinitionProvider":true,"foldingRangeProvider":false,"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":false}},"workspace":{},"implementationProvider":true,"documentRangeFormattingProvider":true,"documentHighlightProvider":true,"executeCommandProvider":{"commands":["3883:applyrefact:applyOne","3883:applyrefact:applyAll","3883:generic:type","3883:ghcmod:check","3883:ghcmod:type","3883:ghcmod:casesplit","3883:hsimport:import","3883:package:add","3883:pragmas:addPragma"]},"renameProvider":false,"colorProvider":false,"definitionProvider":true,"hoverProvider":true,"codeActionProvider":true,"completionProvider":{"triggerCharacters":["."],"resolveProvider":true},"documentSymbolProvider":true,"documentFormattingProvider":true,"referencesProvider":true}},"jsonrpc":"2.0","id":0} 2020-01-10 15:57:11.281320889 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"initialized","params":{}} 2020-01-10 15:57:11.281462414 [ThreadId 33] - ****** reactor: got message number:0 2020-01-10 15:57:11.281508365 [ThreadId 33] - ****** reactor: processing Initialized Notification 2020-01-10 15:57:11.281544882 [ThreadId 33] - ****** reactor: top of loop 2020-01-10 15:57:11.281617568 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"type":4,"message":"Using hie version: Version 1.0.0.0 x86_64 ghc-8.6.5"},"method":"window/logMessage"} 2020-01-10 15:57:11.28253083 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"languageServerHaskell":{"hlintOn":true,"maxNumberOfProblems":100,"diagnosticsOnChange":true,"liquidOn":false,"completionSnippetsOn":true,"formatOnImportOn":true,"formattingProvider":"brittany","hieExecutablePath":"","useCustomHieWrapper":true,"useCustomHieWrapperPath":"~/.local/bin/hie-wrapper-debug","showTypeForSelection":{"onHover":true,"command":{"location":"dropdown"}},"trace":{"server":"off"},"enableHIE":true,"useHieWrapper":true}}}} 2020-01-10 15:57:11.282792254 [ThreadId 33] - ****** reactor: got message number:1 2020-01-10 15:57:11.282831695 [ThreadId 33] - reactor:didChangeConfiguration notification:NotificationMessage {_jsonrpc = "2.0", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [("languageServerHaskell",Object (fromList [("useHieWrapper",Bool True),("useCustomHieWrapper",Bool True),("useCustomHieWrapperPath",String "~/.local/bin/hie-wrapper-debug"),("hlintOn",Bool True),("formatOnImportOn",Bool True),("hieExecutablePath",String ""),("enableHIE",Bool True),("liquidOn",Bool False),("showTypeForSelection",Object (fromList [("onHover",Bool True),("command",Object (fromList [("location",String "dropdown")]))])),("diagnosticsOnChange",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 100.0),("formattingProvider",String "brittany"),("trace",Object (fromList [("server",String "off")]))]))])}} 2020-01-10 15:57:11.282909598 [ThreadId 33] - reactor:didChangeConfiguration diagsOn:True 2020-01-10 15:57:11.282940968 [ThreadId 33] - ****** reactor: top of loop Using hie version: Version 1.0.0.0 x86_64 ghc-8.6.5 2020-01-10 15:57:11.283933211 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs","languageId":"haskell","version":1,"text":"{-# LANGUAGE CPP #-}\n{-# LANGUAGE DeriveDataTypeable #-}\n{-# LANGUAGE DeriveGeneric #-}\n{-# LANGUAGE FlexibleContexts #-}\n{-# LANGUAGE RankNTypes #-}\n{-# LANGUAGE ScopedTypeVariables #-}\n{-# LANGUAGE TemplateHaskell #-}\n\n{-|\nModule : Text.Pretty.Simple\nCopyright : (c) Dennis Gosnell, 2016\nLicense : BSD-style (see LICENSE file)\nMaintainer : cdep.illabout@gmail.com\nStability : experimental\nPortability : POSIX\n\nThis module contains the functions 'pPrint', 'pShow', and 'pString' for\npretty-printing any Haskell data type with a 'Show' instance.\n\n'pPrint' is the main go-to function when debugging Haskell code. 'pShow' and\n'pString' are slight variations on 'pPrint'.\n\n'pPrint', 'pShow', and 'pString' will pretty-print in color using ANSI escape\ncodes. They look good on a console with a dark (black) background. The\nvariations 'pPrintLightBg', 'pShowLightBg', and 'pStringLightBg' are for\nprinting in color to a console with a light (white) background. The variations\n'pPrintNoColor', 'pShowNoColor', and 'pStringNoColor' are for pretty-printing\nwithout using color.\n\n'pPrint' and 'pPrintLightBg' will intelligently decide whether or not to use\nANSI escape codes for coloring depending on whether or not the output is\na TTY. This works in most cases. If you want to force color output,\nyou can use the 'pPrintForceColor' or 'pPrintForceColorLightBg' functions.\n\nThe variations 'pPrintOpt', 'pShowOpt', and 'pStringOpt' are used when\nspecifying the 'OutputOptions'. Most users can ignore these.\n\nThere are a few other functions available that are similar to 'pPrint'.\n\nSee the Examples section at the end of this module for examples of acutally\nusing 'pPrint'. See the\n\nfor examples of printing in color.\n-}\nmodule Text.Pretty.Simple\n (\n -- * Output with color on dark background\n pPrint\n , pHPrint\n , pPrintString\n , pHPrintString\n , pPrintForceColor\n , pHPrintForceColor\n , pPrintStringForceColor\n , pHPrintStringForceColor\n , pShow\n , pString\n -- * Aliases for output with color on dark background\n , pPrintDarkBg\n , pHPrintDarkBg\n , pPrintStringDarkBg\n , pHPrintStringDarkBg\n , pPrintForceColorDarkBg\n , pHPrintForceColorDarkBg\n , pPrintStringForceColorDarkBg\n , pHPrintStringForceColorDarkBg\n , pShowDarkBg\n , pStringDarkBg\n -- * Output with color on light background\n , pPrintLightBg\n , pHPrintLightBg\n , pPrintStringLightBg\n , pHPrintStringLightBg\n , pPrintForceColorLightBg\n , pHPrintForceColorLightBg\n , pPrintStringForceColorLightBg\n , pHPrintStringForceColorLightBg\n , pShowLightBg\n , pStringLightBg\n -- * Output with NO color\n , pPrintNoColor\n , pHPrintNoColor\n , pPrintStringNoColor\n , pHPrintStringNoColor\n , pShowNoColor\n , pStringNoColor\n -- * Output With 'OutputOptions'\n , pPrintOpt\n , pHPrintOpt\n , pPrintStringOpt\n , pHPrintStringOpt\n , pShowOpt\n , pStringOpt\n -- * 'OutputOptions'\n , OutputOptions(..)\n , defaultOutputOptionsDarkBg\n , defaultOutputOptionsLightBg\n , defaultOutputOptionsNoColor\n , CheckColorTty(..)\n -- * 'ColorOptions'\n -- $colorOptions\n , defaultColorOptionsDarkBg\n , defaultColorOptionsLightBg\n -- * Examples\n -- $examples\n ) where\n\n#if __GLASGOW_HASKELL__ < 710\n-- We don't need this import for GHC 7.10 as it exports all required functions\n-- from Prelude\nimport Control.Applicative\n#endif\n\nimport Control.Monad.IO.Class (MonadIO, liftIO)\nimport Data.Foldable (toList)\nimport Data.Text.Lazy (Text)\nimport Data.Text.Lazy.IO as LText\nimport System.IO (Handle, stdout)\n\nimport Text.Pretty.Simple.Internal\n (CheckColorTty(..), OutputOptions(..), defaultColorOptionsDarkBg,\n defaultColorOptionsLightBg, defaultOutputOptionsDarkBg,\n defaultOutputOptionsLightBg, defaultOutputOptionsNoColor,\n hCheckTTY, expressionParse, expressionsToOutputs, render)\n\n-- $setup\n-- >>> import Data.Text.Lazy (unpack)\n\n----------------------------------------------------------\n-- functions for printing in color to a dark background --\n----------------------------------------------------------\n\n-- | Pretty-print any data type that has a 'Show' instance.\n--\n-- If you've never seen 'MonadIO' before, you can think of this function as\n-- having the following type signature:\n--\n-- @\n-- pPrint :: Show a => a -> IO ()\n-- @\n--\n-- This function will only use colors if it detects it's printing to a TTY.\n--\n-- This function is for printing to a dark background. Use 'pPrintLightBg' for\n-- printing to a terminal with a light background. Different colors are used.\n--\n-- Prints to 'stdout'. Use 'pHPrint' to print to a different 'Handle'.\n--\n-- >>> pPrint [Just (1, \"hello\")]\n-- [ Just\n-- ( 1\n-- , \"hello\"\n-- )\n-- ]\npPrint :: (MonadIO m, Show a) => a -> m ()\npPrint = pPrintOpt CheckColorTty defaultOutputOptionsDarkBg\n\n-- | Similar to 'pPrint', but take a 'Handle' to print to.\n--\n-- >>> pHPrint stdout [Just (1, \"hello\")]\n-- [ Just\n-- ( 1\n-- , \"hello\"\n-- )\n-- ]\npHPrint :: (MonadIO m, Show a) => Handle -> a -> m ()\npHPrint = pHPrintOpt CheckColorTty defaultOutputOptionsDarkBg\n\n-- | Similar to 'pPrint', but the first argument is a 'String' representing a\n-- data type that has already been 'show'ed.\n--\n-- >>> pPrintString $ show [ Just (1, \"hello\"), Nothing ]\n-- [ Just\n-- ( 1\n-- , \"hello\"\n-- )\n-- , Nothing\n-- ]\npPrintString :: MonadIO m => String -> m ()\npPrintString = pPrintStringOpt CheckColorTty defaultOutputOptionsDarkBg\n\n-- | Similar to 'pHPrintString', but take a 'Handle' to print to.\n--\n-- >>> pHPrintString stdout $ show [ Just (1, \"hello\"), Nothing ]\n-- [ Just\n-- ( 1\n-- , \"hello\"\n-- )\n-- , Nothing\n-- ]\npHPrintString :: MonadIO m => Handle -> String -> m ()\npHPrintString = pHPrintStringOpt CheckColorTty defaultOutputOptionsDarkBg\n\n-- | Similar to 'pPrint', but print in color regardless of whether the output\n-- goes to a TTY or not.\n--\n-- See 'pPrint' for an example of how to use this function.\npPrintForceColor :: (MonadIO m, Show a) => a -> m ()\npPrintForceColor = pPrintOpt NoCheckColorTty defaultOutputOptionsDarkBg\n\n-- | Similar to 'pPrintForceColor', but take a 'Handle' to print to.\n--\n-- See 'pHPrint' for an example of how to use this function.\npHPrintForceColor :: (MonadIO m, Show a) => Handle -> a -> m ()\npHPrintForceColor = pHPrintOpt NoCheckColorTty defaultOutputOptionsDarkBg\n\n-- | Similar to 'pPrintString', but print in color regardless of whether the\n-- output goes to a TTY or not.\n--\n-- See 'pPrintString' for an example of how to use this function.\npPrintStringForceColor :: MonadIO m => String -> m ()\npPrintStringForceColor = pPrintStringOpt NoCheckColorTty defaultOutputOptionsDarkBg\n\n-- | Similar to 'pHPrintString', but print in color regardless of whether the\n-- output goes to a TTY or not.\n--\n-- See 'pHPrintString' for an example of how to use this function.\npHPrintStringForceColor :: MonadIO m => Handle -> String -> m ()\npHPrintStringForceColor = pHPrintStringOpt NoCheckColorTty defaultOutputOptionsDarkBg\n\n-- | Similar to 'pPrintForceColor', but just return the resulting pretty-printed\n-- data type as a 'Text' instead of printing it to the screen.\n--\n-- This function is for printing to a dark background.\n--\n-- See 'pShowNoColor' for an example of how to use this function.\npShow :: Show a => a -> Text\npShow = pShowOpt defaultOutputOptionsDarkBg\n\n-- | Similar to 'pShow', but the first argument is a 'String' representing a\n-- data type that has already been 'show'ed.\n--\n-- This will work on any 'String' that is similar to a Haskell data type. The\n-- only requirement is that the strings are quoted, and braces, parentheses, and\n-- brackets are correctly used to represent indentation. For example,\n-- 'pString' will correctly pretty-print JSON.\n--\n-- This function is for printing to a dark background.\n--\n-- See 'pStringNoColor' for an example of how to use this function.\npString :: String -> Text\npString = pStringOpt defaultOutputOptionsDarkBg\n\n--------------------------------------------------------\n-- aliases for printing in color to a dark background --\n--------------------------------------------------------\n\n-- | Alias for 'pPrint'.\npPrintDarkBg :: (MonadIO m, Show a) => a -> m ()\npPrintDarkBg = pPrint\n\n-- | Alias for 'pHPrint'.\npHPrintDarkBg :: (MonadIO m, Show a) => Handle -> a -> m ()\npHPrintDarkBg = pHPrint\n\n-- | Alias for 'pPrintString'.\npPrintStringDarkBg :: MonadIO m => String -> m ()\npPrintStringDarkBg = pPrintString\n\n-- | Alias for 'pHPrintString'.\npHPrintStringDarkBg :: MonadIO m => Handle -> String -> m ()\npHPrintStringDarkBg = pHPrintString\n\n-- | Alias for 'pPrintForceColor'.\npPrintForceColorDarkBg :: (MonadIO m, Show a) => a -> m ()\npPrintForceColorDarkBg = pPrintForceColor\n\n-- | Alias for 'pHPrintForceColor'.\npHPrintForceColorDarkBg :: (MonadIO m, Show a) => Handle -> a -> m ()\npHPrintForceColorDarkBg = pHPrintForceColor\n\n-- | Alias for 'pPrintStringForceColor'.\npPrintStringForceColorDarkBg :: MonadIO m => String -> m ()\npPrintStringForceColorDarkBg = pPrintStringForceColor\n\n-- | Alias for 'pHPrintStringForceColor'.\npHPrintStringForceColorDarkBg :: MonadIO m => Handle -> String -> m ()\npHPrintStringForceColorDarkBg = pHPrintStringForceColor\n\n-- | Alias for 'pShow'.\npShowDarkBg :: Show a => a -> Text\npShowDarkBg = pShow\n\n-- | Alias for 'pString'.\npStringDarkBg :: String -> Text\npStringDarkBg = pString\n\n-----------------------------------------------------------\n-- functions for printing in color to a light background --\n-----------------------------------------------------------\n\n-- | Just like 'pPrintDarkBg', but for printing to a light background.\npPrintLightBg :: (MonadIO m, Show a) => a -> m ()\npPrintLightBg = pPrintOpt CheckColorTty defaultOutputOptionsLightBg\n\n-- | Just like 'pHPrintDarkBg', but for printing to a light background.\npHPrintLightBg :: (MonadIO m, Show a) => Handle -> a -> m ()\npHPrintLightBg = pHPrintOpt CheckColorTty defaultOutputOptionsLightBg\n\n-- | Just like 'pPrintStringDarkBg', but for printing to a light background.\npPrintStringLightBg :: MonadIO m => String -> m ()\npPrintStringLightBg = pPrintStringOpt CheckColorTty defaultOutputOptionsLightBg\n\n-- | Just like 'pHPrintStringDarkBg', but for printing to a light background.\npHPrintStringLightBg :: MonadIO m => Handle -> String -> m ()\npHPrintStringLightBg = pHPrintStringOpt CheckColorTty defaultOutputOptionsLightBg\n\n-- | Just like 'pPrintForceColorDarkBg', but for printing to a light\n-- background.\npPrintForceColorLightBg :: (MonadIO m, Show a) => a -> m ()\npPrintForceColorLightBg = pPrintOpt NoCheckColorTty defaultOutputOptionsLightBg\n\n-- | Just like 'pHPrintForceColorDarkBg', but for printing to a light\n-- background.\npHPrintForceColorLightBg :: (MonadIO m, Show a) => Handle -> a -> m ()\npHPrintForceColorLightBg = pHPrintOpt NoCheckColorTty defaultOutputOptionsLightBg\n\n-- | Just like 'pPrintStringForceColorDarkBg', but for printing to a light\n-- background.\npPrintStringForceColorLightBg :: MonadIO m => String -> m ()\npPrintStringForceColorLightBg = pPrintStringOpt NoCheckColorTty defaultOutputOptionsLightBg\n\n-- | Just like 'pHPrintStringForceColorDarkBg', but for printing to a light\n-- background.\npHPrintStringForceColorLightBg :: MonadIO m => Handle -> String -> m ()\npHPrintStringForceColorLightBg = pHPrintStringOpt NoCheckColorTty defaultOutputOptionsLightBg\n\n-- | Just like 'pShowDarkBg', but for printing to a light background.\npShowLightBg :: Show a => a -> Text\npShowLightBg = pShowOpt defaultOutputOptionsLightBg\n\n-- | Just like 'pStringDarkBg', but for printing to a light background.\npStringLightBg :: String -> Text\npStringLightBg = pStringOpt defaultOutputOptionsLightBg\n\n------------------------------------------\n-- functions for printing without color --\n------------------------------------------\n\n-- | Similar to 'pPrint', but doesn't print in color. However, data types\n-- will still be indented nicely.\n--\n-- >>> pPrintNoColor $ Just [\"hello\", \"bye\"]\n-- Just\n-- [ \"hello\"\n-- , \"bye\"\n-- ]\npPrintNoColor :: (MonadIO m, Show a) => a -> m ()\npPrintNoColor = pPrintOpt NoCheckColorTty defaultOutputOptionsNoColor\n\n-- | Like 'pPrintNoColor', but take a 'Handle' to determine where to print to.\n--\n-- >>> pHPrintNoColor stdout $ Just [\"hello\", \"bye\"]\n-- Just\n-- [ \"hello\"\n-- , \"bye\"\n-- ]\npHPrintNoColor :: (MonadIO m, Show a) => Handle -> a -> m ()\npHPrintNoColor = pHPrintOpt NoCheckColorTty defaultOutputOptionsNoColor\n\n-- | Similar to 'pPrintString', but doesn't print in color. However, data types\n-- will still be indented nicely.\n--\n-- >>> pPrintStringNoColor $ show $ Just [\"hello\", \"bye\"]\n-- Just\n-- [ \"hello\"\n-- , \"bye\"\n-- ]\npPrintStringNoColor :: MonadIO m => String -> m ()\npPrintStringNoColor = pPrintStringOpt NoCheckColorTty defaultOutputOptionsNoColor\n\n-- | Like 'pPrintStringNoColor', but take a 'Handle' to determine where to print to.\n--\n-- >>> pHPrintStringNoColor stdout $ show $ Just [\"hello\", \"bye\"]\n-- Just\n-- [ \"hello\"\n-- , \"bye\"\n-- ]\npHPrintStringNoColor :: MonadIO m => Handle -> String -> m ()\npHPrintStringNoColor = pHPrintStringOpt NoCheckColorTty defaultOutputOptionsNoColor\n\n-- | Like 'pShow', but without color.\n--\n-- >>> pShowNoColor [ Nothing, Just (1, \"hello\") ]\n-- \"[ Nothing\\n, Just \\n ( 1\\n , \\\"hello\\\" \\n ) \\n] \"\npShowNoColor :: Show a => a -> Text\npShowNoColor = pShowOpt defaultOutputOptionsNoColor\n\n-- | LIke 'pString', but without color.\n--\n-- >>> pStringNoColor $ show [1, 2, 3]\n-- \"[ 1\\n, 2\\n, 3\\n] \"\npStringNoColor :: String -> Text\npStringNoColor = pStringOpt defaultOutputOptionsNoColor\n\n---------------------------------\n-- functions that take options --\n---------------------------------\n\n-- | Similar to 'pPrint' but takes 'OutputOptions' to change how the\n-- pretty-printing is done.\n--\n-- For example, 'pPrintOpt' can be used to make the indentation much smaller\n-- than normal.\n--\n-- This is what the normal indentation looks like:\n--\n-- >>> pPrintOpt NoCheckColorTty defaultOutputOptionsNoColor $ Just (\"hello\", \"bye\")\n-- Just\n-- ( \"hello\"\n-- , \"bye\"\n-- )\n--\n-- This is what smaller indentation looks like:\n--\n-- >>> let smallIndent = defaultOutputOptionsNoColor {outputOptionsIndentAmount = 1}\n-- >>> pPrintOpt CheckColorTty smallIndent $ Just (\"hello\", \"bye\")\n-- Just\n-- ( \"hello\"\n-- , \"bye\"\n-- )\n--\n-- Lines in strings get indented\n--\n-- >>> pPrintOpt NoCheckColorTty defaultOutputOptionsNoColor (1, (2, \"foo\\nbar\\nbaz\", 3))\n-- ( 1\n-- ,\n-- ( 2\n-- , \"foo\n-- bar\n-- baz\"\n-- , 3\n-- )\n-- )\n--\n-- Lines get indented even in custom show instances\n--\n-- >>> data Foo = Foo\n-- >>> instance Show Foo where show _ = \"foo\\nbar\\nbaz\"\n-- >>> pPrintOpt CheckColorTty defaultOutputOptionsNoColor (1, (2, Foo, 3))\n-- ( 1\n-- ,\n-- ( 2\n-- , foo\n-- bar\n-- baz\n-- , 3\n-- )\n-- )\n--\n-- 'CheckColorTty' determines whether to test 'stdout' for whether or not it is\n-- connected to a TTY.\n--\n-- If set to 'NoCheckColorTty', then 'pPrintOpt' won't\n-- check if 'stdout' is a TTY. It will print in color depending on the value\n-- of 'outputOptionsColorOptions'.\n--\n-- If set to 'CheckColorTty', then 'pPrintOpt' will check if 'stdout' is\n-- conneted to a TTY. If 'stdout' is determined to be connected to a TTY, then\n-- it will print in color depending on the value of\n-- 'outputOptionsColorOptions'. If 'stdout' is determined to NOT be connected\n-- to a TTY, then it will NOT print in color, regardless of the value of\n-- 'outputOptionsColorOptions'.\npPrintOpt :: (MonadIO m, Show a) => CheckColorTty -> OutputOptions -> a -> m ()\npPrintOpt checkColorTty outputOptions =\n pHPrintOpt checkColorTty outputOptions stdout\n\n-- | Similar to 'pPrintOpt', but take a 'Handle' to determine where to print\n-- to.\npHPrintOpt ::\n (MonadIO m, Show a)\n => CheckColorTty\n -> OutputOptions\n -> Handle\n -> a\n -> m ()\npHPrintOpt checkColorTty outputOptions handle a =\n pHPrintStringOpt checkColorTty outputOptions handle $ show a\n\n-- | Similar to 'pPrintOpt', but the last argument is a string representing a\n-- data structure that has already been 'show'ed.\n--\n-- >>> let foo = show (1, (2, \"hello\", 3))\n-- >>> pPrintStringOpt CheckColorTty defaultOutputOptionsNoColor foo\n-- ( 1\n-- ,\n-- ( 2\n-- , \"hello\"\n-- , 3\n-- )\n-- )\npPrintStringOpt :: MonadIO m => CheckColorTty -> OutputOptions -> String -> m ()\npPrintStringOpt checkColorTty outputOptions =\n pHPrintStringOpt checkColorTty outputOptions stdout\n\n-- | Similar to 'pPrintStringOpt', but take a 'Handle' to determine where to\n-- print to.\n--\n-- >>> let foo = show (1, (2, \"hello\", 3))\n-- >>> pHPrintStringOpt CheckColorTty defaultOutputOptionsNoColor stdout foo\n-- ( 1\n-- ,\n-- ( 2\n-- , \"hello\"\n-- , 3\n-- )\n-- )\npHPrintStringOpt ::\n MonadIO m\n => CheckColorTty\n -> OutputOptions\n -> Handle\n -> String\n -> m ()\npHPrintStringOpt checkColorTty outputOptions handle str = do\n realOutputOpts <-\n case checkColorTty of\n CheckColorTty -> hCheckTTY handle outputOptions\n NoCheckColorTty -> pure outputOptions\n liftIO $ LText.hPutStrLn handle $ pStringOpt realOutputOpts str\n\n-- | Like 'pShow' but takes 'OutputOptions' to change how the\n-- pretty-printing is done.\npShowOpt :: Show a => OutputOptions -> a -> Text\npShowOpt outputOptions = pStringOpt outputOptions . show\n\n-- | Like 'pString' but takes 'OutputOptions' to change how the\n-- pretty-printing is done.\npStringOpt :: OutputOptions -> String -> Text\npStringOpt outputOptions =\n render outputOptions . toList . expressionsToOutputs . expressionParse\n\n-- $colorOptions\n--\n-- Additional settings for color options can be found in\n-- \"Text.Pretty.Simple.Internal.Color\".\n\n-- $examples\n--\n-- Here are some examples of using 'pPrint' on different data types. You can\n-- look at these examples to get an idea of what 'pPrint' will output.\n--\n-- __Simple Haskell data type__\n--\n-- >>> data Foo a = Foo a String Char deriving Show\n--\n-- >>> pPrint $ Foo 3 \"hello\" 'a'\n-- Foo 3 \"hello\" 'a'\n--\n-- __List__\n--\n-- >>> pPrint $ [1,2,3]\n-- [ 1\n-- , 2\n-- , 3\n-- ]\n--\n-- __Slightly more complicated list__\n--\n-- >>> pPrint $ [ Foo [ (), () ] \"hello\" 'b' ]\n-- [ Foo\n-- [ ()\n-- , ()\n-- ] \"hello\" 'b'\n-- ]\n--\n-- >>> pPrint $ [ Foo [ \"bar\", \"baz\" ] \"hello\" 'a', Foo [] \"bye\" 'b' ]\n-- [ Foo\n-- [ \"bar\"\n-- , \"baz\"\n-- ] \"hello\" 'a'\n-- , Foo [] \"bye\" 'b'\n-- ]\n--\n-- __Record__\n--\n-- >>> :{\n-- data Bar b = Bar\n-- { barInt :: Int\n-- , barA :: b\n-- , barList :: [Foo Double]\n-- } deriving Show\n-- :}\n--\n-- >>> pPrint $ Bar 1 [10, 11] [Foo 1.1 \"\" 'a', Foo 2.2 \"hello\" 'b']\n-- Bar\n-- { barInt = 1\n-- , barA =\n-- [ 10\n-- , 11\n-- ]\n-- , barList =\n-- [ Foo 1.1 \"\" 'a'\n-- , Foo 2.2 \"hello\" 'b'\n-- ]\n-- }\n--\n-- __Newtype__\n--\n-- >>> newtype Baz = Baz { unBaz :: [String] } deriving Show\n--\n-- >>> pPrint $ Baz [\"hello\", \"bye\"]\n-- Baz\n-- { unBaz =\n-- [ \"hello\"\n-- , \"bye\"\n-- ]\n-- }\n--\n-- __Newline Rules__\n--\n-- >>> data Foo = A | B Foo | C [Foo] [Foo] deriving Show\n--\n-- >>> pPrint $ B ( B A )\n-- B ( B A )\n--\n-- >>> pPrint $ B ( B ( B A ) )\n-- B\n-- ( B ( B A ) )\n--\n-- >>> pPrint $ B ( B ( B ( B A ) ) )\n-- B\n-- ( B\n-- ( B ( B A ) )\n-- )\n--\n-- >>> pPrint $ B ( C [A, A] [B A, B (B (B A))] )\n-- B\n-- ( C\n-- [ A\n-- , A\n-- ]\n-- [ B A\n-- , B\n-- ( B ( B A ) )\n-- ]\n-- )\n--\n-- __Laziness__\n--\n-- >>> take 100 . unpack . pShowNoColor $ [1..]\n-- \"[ 1\\n, 2\\n, 3\\n, 4\\n, 5\\n, 6\\n, 7\\n, 8\\n, 9\\n, 10\\n, 11\\n, 12\\n, 13\\n, 14\\n, 15\\n, 16\\n, 17\\n, 18\\n, 19\\n, 20\\n, 21\\n, 22\"\n--\n-- __Unicode__\n--\n-- >>> pPrint $ Baz [\"猫\", \"犬\", \"ヤギ\"]\n-- Baz\n-- { unBaz =\n-- [ \"猫\"\n-- , \"犬\"\n-- , \"ヤギ\"\n-- ]\n-- }\n--\n-- __Other__\n--\n-- Making sure the spacing after a string is correct.\n--\n-- >>> data Foo = Foo String Int deriving Show\n--\n-- >>> pPrint $ Foo \"bar\" 0\n-- Foo \"bar\" 0\n--\n-- Non-printable characters will get escaped.\n--\n-- >>> pPrint \"this string has non-printable characters: \\x8 and \\x9\"\n-- \"this string has non-printable characters: \\x8 and \\x9\"\n"}}} 2020-01-10 15:57:11.309626281 [ThreadId 33] - ****** reactor: got message number:2 2020-01-10 15:57:11.309812477 [ThreadId 33] - ****** reactor: processing NotDidOpenTextDocument 2020-01-10 15:57:11.309912665 [ThreadId 33] - requestDiagnostics: no diagFunc for:DiagnosticOnOpen 2020-01-10 15:57:11.30998677 [ThreadId 33] - ****** reactor: top of loop 2020-01-10 15:57:11.31179166 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs"}}} 2020-01-10 15:57:11.312113312 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":2,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs"},"range":{"start":{"line":275,"character":32},"end":{"line":275,"character":32}},"context":{"diagnostics":[]}}} 2020-01-10 15:57:11.31230516 [ThreadId 33] - ****** reactor: got message number:3 2020-01-10 15:57:11.312577975 [ThreadId 33] - reactor:got Document symbol request:RequestMessage {_jsonrpc = "2.0", _id = IdInt 1, _method = TextDocumentDocumentSymbol, _params = DocumentSymbolParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs"}}, _workDoneToken = Nothing}} 2020-01-10 15:57:11.312693585 [ThreadId 33] - ****** reactor: top of loop 2020-01-10 15:57:11.312741829 [ThreadId 33] - ****** reactor: got message number:4 2020-01-10 15:57:11.312782028 [ThreadId 33] - reactor:got CodeActionRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = TextDocumentCodeAction, _params = CodeActionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs"}}, _range = Range {_start = Position {_line = 275, _character = 32}, _end = Position {_line = 275, _character = 32}}, _context = CodeActionContext {_diagnostics = List [], only = Nothing}, _workDoneToken = Nothing}} 2020-01-10 15:57:11.312990038 [ThreadId 33] - ****** reactor: top of loop 2020-01-10 15:57:12.763459251 [ThreadId 32] - GHC Output: "Just "/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5"" 2020-01-10 15:57:12.766743897 [ThreadId 38] - ghcDispatcher: top of loop 2020-01-10 15:57:12.766823143 [ThreadId 38] - ghcDispatcher:got request 0 with id: Nothing 2020-01-10 15:57:12.763653947 [ThreadId 39] - ideDispatcher: top of loop 2020-01-10 15:57:12.766980788 [ThreadId 38] - ghcDispatcher: top of loop Using hoogle db at: /home/baldr/.hoogle/default-haskell-5.0.17.hoo 2020-01-10 15:57:12.767047951 [ThreadId 39] - ideDispatcher: got request 3 with id: IdInt 1 2020-01-10 15:57:12.767139636 [ThreadId 38] - ghcDispatcher:got request 2 with id: Nothing 2020-01-10 15:57:12.767200853 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"type":4,"message":"Using hoogle db at: /home/baldr/.hoogle/default-haskell-5.0.17.hoo"},"method":"window/logMessage"} 2020-01-10 15:57:12.768069726 [ThreadId 39] - ideDispatcher: top of loop 2020-01-10 15:57:12.768134694 [ThreadId 38] - ghcDispatcher:Processing request as version matches 2020-01-10 15:57:12.768198064 [ThreadId 39] - ideDispatcher: got request 4 with id: IdInt 2 2020-01-10 15:57:12.768406384 [ThreadId 39] - ideDispatcher: top of loop 2020-01-10 15:57:12.768464924 [ThreadId 39] - ideDispatcher: got request 4 with id: IdInt 2 2020-01-10 15:57:12.768543758 [ThreadId 38] - New cradle: /home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs 2020-01-10 15:57:12.768624557 [ThreadId 39] - ideDispatcher: top of loop 2020-01-10 15:57:12.769737928 [ThreadId 38] - Cabal-Helper found these projects: ["ProjLocStackYaml {plStackYaml = \"/home/baldr/Documents/haskell/pretty-simple/stack.yaml\"}","ProjLocV2Dir {plProjectDirV2 = \"/home/baldr/Documents/haskell/pretty-simple\"}","ProjLocV1Dir {plProjectDirV1 = \"/home/baldr/Documents/haskell/pretty-simple\"}"] 2020-01-10 15:57:12.769821529 [ThreadId 39] - ideDispatcher: got request 4 with id: IdInt 2 2020-01-10 15:57:12.770305197 [ThreadId 38] - These projects have the build tools installed: ["ProjLocStackYaml {plStackYaml = \"/home/baldr/Documents/haskell/pretty-simple/stack.yaml\"}","ProjLocV2Dir {plProjectDirV2 = \"/home/baldr/Documents/haskell/pretty-simple\"}","ProjLocV1Dir {plProjectDirV1 = \"/home/baldr/Documents/haskell/pretty-simple\"}"] 2020-01-10 15:57:12.770405926 [ThreadId 39] - ideDispatcher: top of loop 2020-01-10 15:57:12.770531825 [ThreadId 38] - Cabal-Helper decided to use: ProjLocStackYaml {plStackYaml = "/home/baldr/Documents/haskell/pretty-simple/stack.yaml"} 2020-01-10 15:57:12.770586689 [ThreadId 39] - ideDispatcher: got request 4 with id: IdInt 2 2020-01-10 15:57:12.770632884 [ThreadId 38] - Cabal-Helper dirs: ["/home/baldr/Documents/haskell/pretty-simple","/home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs"] cd /home/baldr/Documents/haskell/pretty-simple; stack path --stack-yaml=/home/baldr/Documents/haskell/pretty-simple/stack.yaml 2020-01-10 15:57:12.770693999 [ThreadId 39] - ideDispatcher: top of loop 2020-01-10 15:57:12.773951676 [ThreadId 39] - ideDispatcher: got request 4 with id: IdInt 2 2020-01-10 15:57:12.774121567 [ThreadId 39] - ideDispatcher: top of loop 2020-01-10 15:57:12.774187683 [ThreadId 39] - ideDispatcher: got request 4 with id: IdInt 2 2020-01-10 15:57:12.774271672 [ThreadId 39] - ideDispatcher: top of loop 2020-01-10 15:57:12.774613617 [ThreadId 5] - <--2--{"result":[],"jsonrpc":"2.0","id":2} => snapshot-doc-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-doc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-hoogle-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/hoogle/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5 => stack-root: /home/baldr/.stack => project-root: /home/baldr/Documents/haskell/pretty-simple => config-location: /home/baldr/Documents/haskell/pretty-simple/stack.yaml => bin-path: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/bin:/home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/lb3hli8d9536g45mndwfwyi6fpny0blh-bash-interactive-4.4-p23/bin:/nix/store/2xwxj5qrrc71asdk1wyq19nz9k845pzs-patchelf-0.9/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/bin:/nix/store/62x7m20m7lm8y8s17cbgha0sf3cmma19-gcc-8.3.0/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/gwwycf3w6cbj0gd2mpgblrdjc24f3cys-binutils-wrapper-2.31.1/bin:/nix/store/ajrrkivdfvp8dp4vdg5hp1h5hblmanc9-binutils-2.31.1/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/bin:/nix/store/my5v4x1n5568vgziyc63vmc97nk8ril9-ncurses-6.1-20190112/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/0zdsw4qdrwi41mfdwqpxknsvk9fz3gkb-findutils-4.7.0/bin:/nix/store/dys98skw6ifw5qsqrhjxjjiydyfbg3nq-diffutils-3.7/bin:/nix/store/g2h4491kab7l06v9rf1lnyjvzdwy5ak0-gnused-4.7/bin:/nix/store/71y5ddyz8vmsw9wgi3gzifcls53r60i9-gnugrep-3.3/bin:/nix/store/84yafwjc6sga23vwsbahhymikjhfbnw4-gawk-5.0.1/bin:/nix/store/aawf0q16ql39w2gwv52qyjfzgbg5f22r-gnutar-1.32/bin:/nix/store/afyqk8219zfv5and3pqahzvn6bpmx3dq-gzip-1.10/bin:/nix/store/iws7dm1jij4lv09mbpwf9i8lc1d4b798-bzip2-1.0.6.0.1-bin/bin:/nix/store/j8fq1ksp37w88rx80blzazldi17f3x7s-gnumake-4.2.1/bin:/nix/store/rm1hz1lybxangc8sdl7xvzs5dcvigvf7-bash-4.4-p23/bin:/nix/store/lmi2nqb1cfzr3ps2zkq97q88zzkhp4mj-patch-2.7.6/bin:/nix/store/y04xj2mbc66zs53fackn1wwlrv31bv3y-xz-5.2.4-bin/bin => programs: /home/baldr/.stack/programs/x86_64-linux-nix => compiler-exe: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-8.6.5 => compiler-bin: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin => compiler-tools-bin: /home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin => local-bin: /home/baldr/.local/bin => extra-include-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/include, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/include, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include, /nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include => extra-library-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/lib, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib, /nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib => snapshot-pkg-db: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => local-pkg-db: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => global-pkg-db: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => ghc-package-path: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => snapshot-install-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => local-install-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => dist-dir: .stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1 => local-hpc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/hpc => local-bin-path: /home/baldr/.local/bin => ghc-paths: /home/baldr/.stack/programs/x86_64-linux-nix cd /home/baldr/Documents/haskell/pretty-simple; PATH=EnvPrepend "/tmp/cabal-helper-symlinks3883:" stack ide packages --cabal-files --stdout => /home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal cd /home/baldr/Documents/haskell/pretty-simple; PATH=EnvPrepend "/tmp/cabal-helper-symlinks3883:" stack path --stack-yaml=/home/baldr/Documents/haskell/pretty-simple/stack.yaml => snapshot-doc-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-doc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5/doc => local-hoogle-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/hoogle/x86_64-linux-nix/94be3184e693cf77a97a47791cfc1c5ff577a63314a7a4bccdf063e6a830f9ac/8.6.5 => stack-root: /home/baldr/.stack => project-root: /home/baldr/Documents/haskell/pretty-simple => config-location: /home/baldr/Documents/haskell/pretty-simple/stack.yaml => bin-path: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/bin:/home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/lb3hli8d9536g45mndwfwyi6fpny0blh-bash-interactive-4.4-p23/bin:/nix/store/2xwxj5qrrc71asdk1wyq19nz9k845pzs-patchelf-0.9/bin:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin:/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/bin:/nix/store/62x7m20m7lm8y8s17cbgha0sf3cmma19-gcc-8.3.0/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/gwwycf3w6cbj0gd2mpgblrdjc24f3cys-binutils-wrapper-2.31.1/bin:/nix/store/ajrrkivdfvp8dp4vdg5hp1h5hblmanc9-binutils-2.31.1/bin:/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/bin:/nix/store/my5v4x1n5568vgziyc63vmc97nk8ril9-ncurses-6.1-20190112/bin:/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31/bin:/nix/store/0zdsw4qdrwi41mfdwqpxknsvk9fz3gkb-findutils-4.7.0/bin:/nix/store/dys98skw6ifw5qsqrhjxjjiydyfbg3nq-diffutils-3.7/bin:/nix/store/g2h4491kab7l06v9rf1lnyjvzdwy5ak0-gnused-4.7/bin:/nix/store/71y5ddyz8vmsw9wgi3gzifcls53r60i9-gnugrep-3.3/bin:/nix/store/84yafwjc6sga23vwsbahhymikjhfbnw4-gawk-5.0.1/bin:/nix/store/aawf0q16ql39w2gwv52qyjfzgbg5f22r-gnutar-1.32/bin:/nix/store/afyqk8219zfv5and3pqahzvn6bpmx3dq-gzip-1.10/bin:/nix/store/iws7dm1jij4lv09mbpwf9i8lc1d4b798-bzip2-1.0.6.0.1-bin/bin:/nix/store/j8fq1ksp37w88rx80blzazldi17f3x7s-gnumake-4.2.1/bin:/nix/store/rm1hz1lybxangc8sdl7xvzs5dcvigvf7-bash-4.4-p23/bin:/nix/store/lmi2nqb1cfzr3ps2zkq97q88zzkhp4mj-patch-2.7.6/bin:/nix/store/y04xj2mbc66zs53fackn1wwlrv31bv3y-xz-5.2.4-bin/bin => programs: /home/baldr/.stack/programs/x86_64-linux-nix => compiler-exe: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-8.6.5 => compiler-bin: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin => compiler-tools-bin: /home/baldr/.stack/compiler-tools/x86_64-linux-nix/ghc-8.6.5/bin => local-bin: /home/baldr/.local/bin => extra-include-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/include, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/include, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include, /nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include => extra-library-dirs: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib, /nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1/lib, /nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib, /nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib => snapshot-pkg-db: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => local-pkg-db: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb => global-pkg-db: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => ghc-package-path: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb:/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => snapshot-install-root: /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => local-install-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5 => dist-dir: .stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1 => local-hpc-root: /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/hpc => local-bin-path: /home/baldr/.local/bin => ghc-paths: /home/baldr/.stack/programs/x86_64-linux-nix /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 list --simple-output Cabal --package-conf=/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d => Cabal-2.4.0.1 2020-01-10 15:57:16.367704287 [ThreadId 38] - Cabal-Helper cradle package: Package {pPackageName = "pretty-simple", pSourceDir = "/home/baldr/Documents/haskell/pretty-simple", pCabalFile = CabalFile "/home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal", pFlags = [], pUnits = Unit {uUnitId = UnitId "pretty-simple", uPackage = Package {pPackageName = "pretty-simple", pSourceDir = "/home/baldr/Documents/haskell/pretty-simple", pCabalFile = CabalFile "/home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal", pFlags = [], pUnits = ()}, uDistDir = DistDirLib "/home/baldr/Documents/haskell/pretty-simple/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1", uImpl = UnitImplStack} :| []} 2020-01-10 15:57:16.367981136 [ThreadId 38] - Cabal-Helper normalisedPackageLocation: /home/baldr/Documents/haskell/pretty-simple 2020-01-10 15:57:16.368029217 [ThreadId 38] - Module "/home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/baldr/Documents/haskell/pretty-simple", cradleOptsProg = CradleAction: Cabal-Helper-Stack} 2020-01-10 15:57:16.368079095 [ThreadId 38] - Found cradle: Cradle {cradleRootDir = "/home/baldr/Documents/haskell/pretty-simple", cradleOptsProg = CradleAction: Cabal-Helper-Stack} 2020-01-10 15:57:16.368208516 [ThreadId 66] - Relative Module FilePath: src/Text/Pretty/Simple.hs 2020-01-10 15:57:16.368558247 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"token":0},"method":"window/workDoneProgress/create","id":0} 2020-01-10 15:57:16.368674328 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","cancellable":false,"title":"Initializing Stack project","percentage":0},"token":0},"method":"$/progress"} cd /home/baldr/Documents/haskell/pretty-simple; PATH=EnvPrepend "/tmp/cabal-helper-symlinks3883:" stack --stack-yaml=/home/baldr/Documents/haskell/pretty-simple/stack.yaml build . --only-configure 2020-01-10 15:57:16.370533611 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"result":null} 2020-01-10 15:57:16.370718612 [ThreadId 4] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":0,\"result\":null}" 2020-01-10 15:57:16.370881355 [ThreadId 33] - ****** reactor: got message number:5 2020-01-10 15:57:16.370979429 [ThreadId 33] - reactor:got RspFromClient:ResponseMessage {_jsonrpc = "2.0", _id = IdRspInt 0, _result = Just Null, _error = Nothing} 2020-01-10 15:57:16.371061457 [ThreadId 33] - ****** reactor: top of loop 2020-01-10 15:57:18.064726435 [ThreadId 32] - Scheduler thread exited unexpectedly: Saved package config file is outdated: • the Cabal version changed from Cabal-2.4.1.0 to Cabal-2.4.0.1 Re-run the 'configure' command. 2020-01-10 15:57:41.153982134 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":3,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs"},"range":{"start":{"line":318,"character":14},"end":{"line":318,"character":14}},"context":{"diagnostics":[]}}} 2020-01-10 15:57:41.154757888 [ThreadId 33] - ****** reactor: got message number:6 2020-01-10 15:57:41.15506816 [ThreadId 33] - reactor:got CodeActionRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = TextDocumentCodeAction, _params = CodeActionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/baldr/Documents/haskell/pretty-simple/src/Text/Pretty/Simple.hs"}}, _range = Range {_start = Position {_line = 318, _character = 14}, _end = Position {_line = 318, _character = 14}}, _context = CodeActionContext {_diagnostics = List [], only = Nothing}, _workDoneToken = Nothing}} 2020-01-10 15:57:41.155341412 [ThreadId 33] - ****** reactor: top of loop ```
fendor commented 4 years ago

Output of stack -v build

> stack -v build
2.1.3.1 x86_64 hpack-0.33.0
2020-01-10 16:30:19.753304: [debug] Checking for project config at: /home/baldr/Documents/haskell/pretty-simple/stack.yaml
2020-01-10 16:30:19.753755: [debug] Loading project config file stack.yaml
2020-01-10 16:30:19.765430: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2020-01-09 15:30:19.765338609 UTC]
2020-01-10 16:30:19.766173: [debug] Using package location completions from a lock file
2020-01-10 16:30:19.925613: [debug] PATH is: Just "/home/baldr/.cabal/bin:/home/baldr/.local/bin:/nix/store/r7k59wvjl8x21m6a61xy52clydwmkdc5-kitty-0.14.6/bin:/nix/store/js1paxhg4x6qhs0q8rqm7fbz2lk0m0ka-imagemagick-6.9.10-71/bin:/nix/store/ia8n9p2bnidx3jfbj4a9q61hzyim6x0y-xsel-unstable-2018-01-10/bin:/nix/store/jwhd7yi26sfbi5djclxrr3ims6r5796i-ncurses-6.1-20190112-dev/bin:/home/baldr/bin:/run/wrappers/bin:/home/baldr/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/home/baldr/.nix-profile/bin:/etc/profiles/per-user/baldr/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"
2020-01-10 16:30:19.925715: [debug] Using a nix-shell environment with nix packages: haskell.compiler.ghc865, git, gcc, gmp
2020-01-10 16:30:19.926060: [debug] Run process: /home/baldr/.nix-profile/bin/nix-shell --pure -E "with (import <nixpkgs> {}); let inputs = [haskell.compiler.ghc865 git gcc gmp]; libPath = lib.makeLibraryPath inputs; stackExtraArgs = lib.concatMap (pkg: [ ''--extra-lib-dirs=${lib.getLib pkg}/lib''   ''--extra-include-dirs=${lib.getDev pkg}/include'' ]) inputs; in runCommand ''myEnv'' { buildInputs = lib.optional stdenv.isLinux glibcLocales ++ inputs; STACK_PLATFORM_VARIANT=''nix''; STACK_IN_NIX_SHELL=1; LD_LIBRARY_PATH = libPath;STACK_IN_NIX_EXTRA_ARGS = stackExtraArgs; LANG=\"en_US.UTF-8\";} \"\"" --run "'/nix/store/8h0dkdjxjdrnvwsp8l0wp9infn9j010l-stack-2.1.3.1/bin/stack' $STACK_IN_NIX_EXTRA_ARGS '--internal-re-exec-version=2.1.3.1' '-v' 'build'"
2.1.3.1 x86_64 hpack-0.33.0
2020-01-10 16:30:21.198191: [debug] Checking for project config at: /home/baldr/Documents/haskell/pretty-simple/stack.yaml
2020-01-10 16:30:21.198342: [debug] Loading project config file stack.yaml
2020-01-10 16:30:21.201440: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2020-01-09 15:30:21.201411315 UTC]
2020-01-10 16:30:21.202115: [debug] Using package location completions from a lock file
2020-01-10 16:30:21.348285: [debug] Asking for a supported GHC version
2020-01-10 16:30:21.348356: [debug] Getting system compiler version
2020-01-10 16:30:21.349030: [debug] SELECT "id","actual_version","arch","ghc_path","ghc_size","ghc_modified","ghc_pkg_path","runghc_path","haddock_path","cabal_version","global_db","global_db_cache_size","global_db_cache_modified","info","global_dump" FROM "compiler_cache" WHERE "ghc_path"=?; [PersistText "/nix/st
ore/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-8.6.5"]
2020-01-10 16:30:21.403662: [debug] Loaded compiler information from cache
2020-01-10 16:30:21.403990: [debug] Asking for a supported GHC version
2020-01-10 16:30:21.404262: [debug] Resolving package entries
2020-01-10 16:30:21.404446: [debug] Parsing the targets
2020-01-10 16:30:21.416565: [debug] Checking flags
2020-01-10 16:30:21.416661: [debug] SourceMap constructed
2020-01-10 16:30:21.423797: [debug] Starting to execute command inside EnvConfig
2020-01-10 16:30:21.428288: [debug] Finding out which packages are already installed
2020-01-10 16:30:21.428513: [debug] Run process: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 --global --no-user-package-db dump --expand-pkgroot
2020-01-10 16:30:21.481412: [debug] Process finished in 53ms: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 --global --no-user-package-db dump --expand-pkgroot
2020-01-10 16:30:21.493900: [debug] Ignoring package Cabal due to wanting version 2.4.1.0 instead of 2.4.0.1
2020-01-10 16:30:21.494494: [debug] Ignoring package haskeline due to wanting version 0.7.5.0 instead of 0.7.4.3
2020-01-10 16:30:21.496508: [debug] Run process: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 --user --no-user-package-db --package-db /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb dump --expand-pkgroot
2020-01-10 16:30:21.536515: [debug] Process finished in 40ms: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 --user --no-user-package-db --package-db /home/baldr/.stack/snapshots/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb dump --expand-pkgroot
2020-01-10 16:30:21.539220: [debug] Run process: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 --user --no-user-package-db --package-db /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb dump --expand-pkgroot
2020-01-10 16:30:21.576523: [debug] Process finished in 37ms: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 --user --no-user-package-db --package-db /home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/pkgdb dump --expand-pkgroot
2020-01-10 16:30:21.577398: [debug] Constructing the build plan
2020-01-10 16:30:21.578688: [debug] SELECT "id","directory","type","pkg_src","active","path_env_var","haddock" FROM "config_cache" WHERE "directory"=? AND "type"=?; [PersistText "/home/baldr/Documents/haskell/pretty-simple/.stack-work/install/x86_64-linux-nix/bde0d1ad09d89b6666bde10aa3c5c44645a8cca66e37d594dfeee85be7c21f3d/8.6.5/",PersistText "lib:pretty-simple-3.2.0.0-1YUugJ2stCkGqd2EY55KQU"]
2020-01-10 16:30:21.579034: [debug] SELECT "id", "config_cache_id", "index", "option" FROM "config_cache_dir_option" WHERE ("config_cache_id"=?) ORDER BY "index"; [PersistInt64 6]
2020-01-10 16:30:21.579225: [debug] SELECT "id", "config_cache_id", "index", "option" FROM "config_cache_no_dir_option" WHERE ("config_cache_id"=?) ORDER BY "index"; [PersistInt64 6]
2020-01-10 16:30:21.579429: [debug] SELECT "id", "config_cache_id", "ghc_pkg_id" FROM "config_cache_dep" WHERE ("config_cache_id"=?); [PersistInt64 6]
2020-01-10 16:30:21.579553: [debug] SELECT "id", "config_cache_id", "component" FROM "config_cache_component" WHERE ("config_cache_id"=?); [PersistInt64 6]
2020-01-10 16:30:21.580340: [debug] Start: getPackageFiles /home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal
2020-01-10 16:30:21.594169: [debug] Finished in 14ms: getPackageFiles /home/baldr/Documents/haskell/pretty-simple/pretty-simple.cabal
2020-01-10 16:30:21.596244: [debug] Checking if we are going to build multiple executables with the same name
2020-01-10 16:30:21.596350: [debug] Executing the build plan

Lines I think are important:


2020-01-10 16:30:21.481412: [debug] Process finished in 53ms: /nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/bin/ghc-pkg-8.6.5 --global --no-user-package-db dump --expand-pkgroot
2020-01-10 16:30:21.493900: [debug] Ignoring package Cabal due to wanting version 2.4.1.0 instead of 2.4.0.1
2020-01-10 16:30:21.494494: [debug] Ignoring package haskeline due to wanting version 0.7.5.0 instead of 0.7.4.3
fendor commented 4 years ago

Another side note: Modifying stack.yaml to use Cabal-2.4.0.1 works, too.

resolver: lts-13.30

# Local packages, usually specified by relative directory name
packages:
- '.'

# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps:
- Cabal-2.4.0.1

Then it works even without hie.yaml

DanielG commented 4 years ago

This looks very similar to DanielG/cabal-helper#78 but the failure mode is somewhat different. Over in that issue we're getting a GHC error when trying to compile the helper but here we seem to get past that stage to actually running the helper.

It appears here the problem is that Stack is choosing to pull in the lib:Cabal from the snapshot package-db rather than GHC's global db due to build-type:custom in pretty-simple's cabal file.

Unfortunately we've had assumed the invariant that stack can only have one Cabal version for so long that this now causes a bit of a staging problem in the implementation where we need to know the Cabal version we're going to use before telling Stack to actually run configuration, which would make it possible to read it out from the setup-config header.

An easy fix would be to just always configure immediately for stack but that sucks performance wise. I'll have to do some reading of the scriptures (aka Stack source code) to figure out if we can do any better.

In the meantime either modifying the setup-depends section in the cabal file or adding extra-deps in stack.yaml to force the correct Cabal version seems like a good workaround.

fendor commented 4 years ago

Should be fixed now by the update to cabal-helper 1.1