Skip to content

Instantly share code, notes, and snippets.

@noteed
Last active March 18, 2018 12:38

Revisions

  1. noteed revised this gist Mar 18, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion troubleshooting.md
    Original file line number Diff line number Diff line change
    @@ -79,4 +79,4 @@ Loading (above) the script in GHCi was failing, but compiling it (via `cabal ins
    :set -package mtl-2.2.1
    ```

    Both of them were available in my stack:8.0.2 image; I have to find out why.
    Both of them were available in my `stack:8.0.2` image; I have to find out why.
  2. noteed revised this gist Mar 18, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion troubleshooting.md
    Original file line number Diff line number Diff line change
    @@ -72,7 +72,7 @@ reesd-debug/bin/reesd-debug.hs:24:36: error:
    Failed, modules loaded: none.
    ```

    Loading (above) the script in GHCi was failing, but compiling it (with `cabal install` was succeeding). I found out that hding mtl-2.2.2 (and exposing mtl-2.2.1) was resolving the problem, e.g. something like this in the `ghci.conf` file:
    Loading (above) the script in GHCi was failing, but compiling it (via `cabal install`) was succeeding. I found out that hding mtl-2.2.2 (and exposing mtl-2.2.1) was resolving the problem, e.g. something like this in the `ghci.conf` file:

    ```
    :set -hide-package mtl-2.2.2
  3. noteed revised this gist Mar 18, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion troubleshooting.md
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,7 @@ Hledger/Cli/DocFiles.hs:37:6: error:
    cabal: Leaving directory '/tmp/cabal-tmp-1506/hledger-1.2'
    ```

    Exporting the LANG environment variable did the tricl (here, using a Dockerfile):
    Exporting the LANG environment variable did the trick (here, using a Dockerfile):

    ```
    ENV LANG=en_US.UTF-8
  4. noteed revised this gist Mar 18, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion troubleshooting.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Haskell troubleshooting

    Notes about problem I had and what I did about them.
    Notes about problems I had and what I did about them.


    ## 1
  5. noteed revised this gist Mar 18, 2018. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions troubleshooting.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,9 @@
    # Haskell troubleshooting

    Notes about problem I had and what I did about them.


    ## 1

    ```
    gusdev@d6a1d607e6fe:~$ cabal install newtype-generics-0.5.2.2
    @@ -11,6 +17,9 @@ exist (No such file or directory)

    It meant that `newtype-generics-0.5.2.2` failed to download. Indeed my mirror (hackage.reesd.com) was not up-to-date.


    ## 2

    ```
    Downloading hledger-1.2...
    Configuring hledger-1.2...
    @@ -41,6 +50,9 @@ Exporting the LANG environment variable did the tricl (here, using a Dockerfile)
    ENV LANG=en_US.UTF-8
    ```


    ## 3

    ```
    gusdev@ad10b59b282f:~$ ghci
    GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
  6. noteed revised this gist Mar 18, 2018. 1 changed file with 29 additions and 1 deletion.
    30 changes: 29 additions & 1 deletion troubleshooting.md
    Original file line number Diff line number Diff line change
    @@ -39,4 +39,32 @@ Exporting the LANG environment variable did the tricl (here, using a Dockerfile)

    ```
    ENV LANG=en_US.UTF-8
    ```
    ```

    ```
    gusdev@ad10b59b282f:~$ ghci
    GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
    Prelude> :l reesd-debug/bin/
    .reesd-debug.hs.swp reesd-debug.hs
    Prelude> :l reesd-debug/bin/reesd-debug.hs
    [1 of 1] Compiling Main ( reesd-debug/bin/reesd-debug.hs, interpreted )
    reesd-debug/bin/reesd-debug.hs:24:36: error:
    • No instance for (Control.Monad.State.Class.MonadState
    Postgres (Handler b Postgres))
    arising from a use of ‘get’
    • In the second argument of ‘with’, namely ‘get’
    In the expression: with database get
    In an equation for ‘getPostgresState’:
    getPostgresState = with database get
    Failed, modules loaded: none.
    ```

    Loading (above) the script in GHCi was failing, but compiling it (with `cabal install` was succeeding). I found out that hding mtl-2.2.2 (and exposing mtl-2.2.1) was resolving the problem, e.g. something like this in the `ghci.conf` file:

    ```
    :set -hide-package mtl-2.2.2
    :set -package mtl-2.2.1
    ```

    Both of them were available in my stack:8.0.2 image; I have to find out why.
  7. noteed created this gist Mar 17, 2018.
    42 changes: 42 additions & 0 deletions troubleshooting.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@

    ```
    gusdev@d6a1d607e6fe:~$ cabal install newtype-generics-0.5.2.2
    Resolving dependencies...
    Downloading newtype-generics-0.5.2.2...
    Failed to install newtype-generics-0.5.2.2
    Build log ( /home/gusdev/.cabal/logs/newtype-generics-0.5.2.2.log ):
    /home/gusdev/.cabal/logs/newtype-generics-0.5.2.2.log: openFile: does not
    exist (No such file or directory)
    ```

    It meant that `newtype-generics-0.5.2.2` failed to download. Indeed my mirror (hackage.reesd.com) was not up-to-date.

    ```
    Downloading hledger-1.2...
    Configuring hledger-1.2...
    Building hledger-1.2...
    Failed to install hledger-1.2
    Build log ( /home/gusdev/.cabal/logs/hledger-1.2.log ):
    cabal: Entering directory '/tmp/cabal-tmp-1506/hledger-1.2'
    Configuring hledger-1.2...
    Building hledger-1.2...
    Preprocessing library hledger-1.2...
    [ 1 of 23] Compiling Text.Tabular.AsciiWide ( Text/Tabular/AsciiWide.hs, dist/build/Text/Tabular/AsciiWide.o )
    [ 2 of 23] Compiling Paths_hledger ( dist/build/autogen/Paths_hledger.hs, dist/build/Paths_hledger.o )
    [ 3 of 23] Compiling Hledger.Cli.Version ( Hledger/Cli/Version.hs, dist/build/Hledger/Cli/Version.o )
    [ 4 of 23] Compiling Hledger.Cli.DocFiles ( Hledger/Cli/DocFiles.hs, dist/build/Hledger/Cli/DocFiles.o )
    Hledger/Cli/DocFiles.hs:37:6: error:
    * Exception when trying to run compile-time code:
    /tmp/cabal-tmp-1506/hledger-1.2/doc/hledger.1: hGetContents: invalid argument (invalid byte sequence)
    Code: (>>=) makeRelativeToProject "doc/hledger.1" embedStringFile
    * In the untyped splice:
    $(makeRelativeToProject "doc/hledger.1" >>= embedStringFile)
    cabal: Leaving directory '/tmp/cabal-tmp-1506/hledger-1.2'
    ```

    Exporting the LANG environment variable did the tricl (here, using a Dockerfile):

    ```
    ENV LANG=en_US.UTF-8
    ```