postgresql-fay scaffold and yesod-fay dependency problem

Skip to first unread message

Willem van den Ende

Apr 7, 2014, 7:35:22 AM4/7/14

I've played around with various yesod tutorials, getting some things to work, including a previous version of the postgresql-fay scaffold. I wanted to start actually building something, so I thought it would be a good idea to start with the latest yesod-bin and a fresh scaffold. I must be doing something wrong, because some things (not all) work on another machine with an older yesod-bin (, at least I can compile the yesod-fay master from github, not on the machine with (as far as I can tell) cleanly installed packages. On the clean machine:

yesod-bin version: 1.2.8

Any help would be greatly appreciated... (including, but not limited to tips to end up with a sane set of versions. happy to help keeping this scaffold up to date if I'd know what I'm doing ;) ).

Summary: the scaffolded application tries to install fay- depends on language-ecmascript-0.15.2 and that fails to install. I've tried to comment out the fay version spec in the scaffolded app's cabal file, no luck. Also tried increasing the fay version number, so it installs the same version as yesod-fay (fay 0.19.)   I've also cloned yesod-fay from github, and that also fails on the ecmascript library, while trying to install fay 0.17. I have tried increasing the version requirement for fay to >= 0.18, and that gives yet other errors.

Yesod-bin installed fresh after removing it with ghc-pkg and manually removing the binaries from .cabal/bin. also removed yesod-platfrom from the global environment so it exists only in the sandbox.

Output from installing dependencies in  the sandboxed app and yesod-fay below.



Failed to install language-ecmascript-0.15.2
Last 10 lines of the build log ( /home/willem/dev/spikes/haskell/yesod-split-testing/.cabal-sandbox/logs/language-ecmascript-0.15.2.log ):
[ 2 of 13] Compiling Language.ECMAScript3.Parser.Type ( src/Language/ECMAScript3/Parser/Type.hs, dist/dist-sandbox-f8ff9df1/build/Language/ECMAScript3/Parser/Type.o )
[ 3 of 13] Compiling Language.ECMAScript3.Lexer ( src/Language/ECMAScript3/Lexer.hs, dist/dist-sandbox-f8ff9df1/build/Language/ECMAScript3/Lexer.o )
[ 4 of 13] Compiling Language.ECMAScript3.Syntax ( src/Language/ECMAScript3/Syntax.hs, dist/dist-sandbox-f8ff9df1/build/Language/ECMAScript3/Syntax.o )
[ 5 of 13] Compiling Language.ECMAScript3.PrettyPrint ( src/Language/ECMAScript3/PrettyPrint.hs, dist/dist-sandbox-f8ff9df1/build/Language/ECMAScript3/PrettyPrint.o )
[ 6 of 13] Compiling Language.ECMAScript3.Syntax.Annotations ( src/Language/ECMAScript3/Syntax/Annotations.hs, dist/dist-sandbox-f8ff9df1/build/Language/ECMAScript3/Syntax/Annotations.o )
[ 7 of 13] Compiling Language.ECMAScript3.Parser ( src/Language/ECMAScript3/Parser.hs, dist/dist-sandbox-f8ff9df1/build/Language/ECMAScript3/Parser.o )
[ 8 of 13] Compiling Language.ECMAScript3.Syntax.Arbitrary ( src/Language/ECMAScript3/Syntax/Arbitrary.hs, dist/dist-sandbox-f8ff9df1/build/Language/ECMAScript3/Syntax/Arbitrary.o )

    Module `Test.QuickCheck' does not export `Prop'

Building yesod-
Installed yesod-
Configuring yesod-platform-
Building yesod-platform-
Installed yesod-platform-
cabal: Error: some packages failed to install:
fay- depends on language-ecmascript-0.15.2 which failed to install.
language-ecmascript-0.15.2 failed during the building phase. The exception
ExitFailure 1
yesod-fay- depends on language-ecmascript-0.15.2 which failed to
yesod-split-testing-0.0.0 depends on language-ecmascript-0.15.2 which failed
to install.


building yesod-fay:
willem@angel:~/dev/spikes/haskell/yesod-fay$ cabal install --only-dependencies
Resolving dependencies...
Notice: installing into a sandbox located at
Configuring Diff-0.3.0...
Configuring ansi-terminal-
Configuring async-
Configuring base64-bytestring-
Configuring base-unicode-symbols-
Configuring byteorder-1.0.4...
Building ansi-terminal-
Configuring byteable-0.1.1...
Configuring data-default-class-0.0.1...
Building base-unicode-symbols-
Building Diff-0.3.0...
Building async-
Building base64-bytestring-
Building byteorder-1.0.4...
Configuring dlist-
Installed base-unicode-symbols-
Building byteable-0.1.1...
Building data-default-class-0.0.1...
Configuring cereal-
Installed async-
Configuring entropy-
Installed byteorder-1.0.4
Configuring file-embed-0.0.6...
Installed Diff-0.3.0
Building dlist-
Configuring exceptions-0.5...
Installed base64-bytestring-
Configuring ghc-paths-
Installed data-default-class-0.0.1
Configuring haskell-lexer-1.0...
Installed byteable-0.1.1
Configuring blaze-builder-
Installed ansi-terminal-
Building cereal-
Configuring hostname-1.0...
Installed dlist-
Building file-embed-0.0.6...
Building entropy-
Building exceptions-0.5...
Building haskell-lexer-1.0...
Building blaze-builder-
Building hostname-1.0...
Configuring language-haskell-extract-0.2.4...
Installed entropy-
Configuring mime-types-
Installed file-embed-0.0.6
Building ghc-paths-
Configuring mmorph-1.0.2...
Installed hostname-1.0
Configuring hashable-
Installed exceptions-0.5
Configuring monad-loops-0.4.2...
Installed ghc-paths-
Building language-haskell-extract-0.2.4...
Building mime-types-
Configuring path-pieces-
Installed language-haskell-extract-0.2.4
Building mmorph-1.0.2...
Building hashable-
Building monad-loops-0.4.2...
Configuring nats-0.1.2...
Installed mmorph-1.0.2
Building path-pieces-
Configuring safe-0.3.4...
Installed blaze-builder-
Configuring primitive-
Installed hashable-
Building nats-0.1.2...
Configuring polyparse-1.9...
Installed path-pieces-
Configuring silently-
Installed monad-loops-0.4.2
Installed cereal-
Configuring split-0.2.2...
Configuring simple-sendfile-0.2.13...
Installed nats-0.1.2
Building safe-0.3.4...
Building primitive-
Configuring stm-chans-2.0.0...
Installed safe-0.3.4
Building polyparse-1.9...
Building split-0.2.2...
Building silently-
Building simple-sendfile-0.2.13...
Configuring system-filepath-0.4.10...
Installed silently-
Configuring stringsearch-
Installed split-0.2.2
Configuring tagged-0.7.1...
Installed primitive-
Installed simple-sendfile-0.2.13
Configuring streaming-commons-
Building stm-chans-2.0.0...
Building stringsearch-
Building tagged-0.7.1...
Building streaming-commons-
Building system-filepath-0.4.10...
Configuring terminfo-
Installed haskell-lexer-1.0
Configuring tagsoup-0.13.1...
Installed stm-chans-2.0.0
Configuring transformers-base-0.4.1...
Installed tagged-0.7.1
Building tagsoup-0.13.1...
Building transformers-base-0.4.1...
Configuring text-stream-decode-
Installed transformers-base-0.4.1
Building terminfo-
Configuring unix-compat-
Installed polyparse-1.9
Building text-stream-decode-
Configuring unix-time-0.2.2...
Installed streaming-commons-
Configuring utf8-string-0.3.7...
Installed system-filepath-0.4.10
Configuring word8-0.0.4...
Installed terminfo-
Building unix-compat-
Configuring xml-1.3.13...
Installed stringsearch-
Installed unix-compat-
Building utf8-string-0.3.7...
Building word8-0.0.4...
Configuring data-default-instances-base-0.0.1...
Building xml-1.3.13...
Configuring data-default-instances-containers-0.0.1...
Installed text-stream-decode-
Building unix-time-0.2.2...
Configuring data-default-instances-old-locale-0.0.1...
Installed word8-0.0.4
Building data-default-instances-base-0.0.1...
Configuring cryptohash-0.11.4...
Installed data-default-instances-base-0.0.1
Building data-default-instances-containers-0.0.1...
Building data-default-instances-old-locale-0.0.1...
Configuring securemem-0.1.3...
Installed unix-time-0.2.2
Configuring ansi-wl-pprint-
Installed data-default-instances-containers-0.0.1
Configuring data-default-instances-dlist-0.0.1...
Installed data-default-instances-old-locale-0.0.1
Configuring blaze-markup-
Installed utf8-string-0.3.7
Building cryptohash-0.11.4...
Building securemem-0.1.3...
Configuring fast-logger-2.1.5...
Installed xml-1.3.13
Configuring case-insensitive-
Building ansi-wl-pprint-
Installed tagsoup-0.13.1
Building data-default-instances-dlist-0.0.1...
Configuring scientific-
Installed securemem-0.1.3
Building blaze-markup-
Configuring unordered-containers-
Installed data-default-instances-dlist-0.0.1
Configuring tf-random-0.4...
Installed ansi-wl-pprint-
Building fast-logger-2.1.5...
Building case-insensitive-
Building scientific-
Building unordered-containers-
Building tf-random-0.4...
Configuring vector-
Installed fast-logger-2.1.5
Configuring pretty-show-1.6.7...
Installed case-insensitive-
Building vector-
Building pretty-show-1.6.7...
Configuring crypto-api-0.13...
Installed cryptohash-0.11.4
Configuring monad-control-
Installed scientific-
Configuring cpphs-1.18.4...
Installed blaze-markup-
Building crypto-api-0.13...
Configuring system-fileio-0.3.12...
Installed tf-random-0.4
Building monad-control-
Building cpphs-1.18.4...
Building system-fileio-0.3.12...
Configuring haskeline-
Installed monad-control-
Installed pretty-show-1.6.7
Configuring language-javascript-0.5.11...
Configuring crypto-cipher-types-0.0.9...
Installed system-fileio-0.3.12
Configuring data-default-0.5.3...
Installed unordered-containers-
Building language-javascript-0.5.11...
Building crypto-cipher-types-0.0.9...
Configuring optparse-applicative-
Installed crypto-api-0.13
Building haskeline-
Building data-default-0.5.3...
Building optparse-applicative-
Configuring test-framework-
Installed data-default-0.5.3
Configuring http-types-0.8.4...
Installed crypto-cipher-types-0.0.9
Building test-framework-
Building http-types-0.8.4...
Configuring attoparsec-
Installed cpphs-1.18.4
Configuring blaze-html-
Installed optparse-applicative-
Building attoparsec-
Configuring QuickCheck-2.7.3...
Installed test-framework-
Configuring lifted-base-
Installed http-types-0.8.4
Building blaze-html-
Building QuickCheck-2.7.3...
Building lifted-base-
Failed to install language-javascript-0.5.11
Last 10 lines of the build log ( /home/willem/dev/spikes/haskell/yesod-fay/.cabal-sandbox/logs/language-javascript-0.5.11.log ):
[ 5 of 12] Compiling Language.JavaScript.Parser.ParserMonad ( src/Language/JavaScript/Parser/ParserMonad.hs, dist/dist-sandbox-41dac409/build/Language/JavaScript/Parser/ParserMonad.o )
[ 6 of 12] Compiling Language.JavaScript.Parser.Lexer ( dist/dist-sandbox-41dac409/build/Language/JavaScript/Parser/Lexer.hs, dist/dist-sandbox-41dac409/build/Language/JavaScript/Parser/Lexer.o )

    Couldn't match expected type `AlexInput'
                with actual type `(t0, t1, t2)'
    In the return type of a call of `ignorePendingBytes'
    In the first argument of `action', namely
      `(ignorePendingBytes inp)'
    In a stmt of a 'do' block: action (ignorePendingBytes inp) len
Configuring semigroups-0.12.2...
Configuring uniplate-1.6.12...
Installed lifted-base-
Building semigroups-0.12.2...
Building uniplate-1.6.12...
Configuring vault-
Installed mime-types-
Configuring pureMD5-
Installed haskeline-
Building vault-
Building pureMD5-
Configuring skein-1.0.9...
Installed semigroups-0.12.2
Building skein-1.0.9...
Configuring cookie-
Installed QuickCheck-2.7.3
Configuring cipher-aes-0.2.7...
Installed vault-
Building cookie-
Configuring haskell-src-exts-
Installed uniplate-1.6.12
Building cipher-aes-0.2.7...
Configuring test-framework-hunit-
Installed pureMD5-
Installed blaze-html-
Configuring resourcet-1.1.1...
Configuring void-0.6.1...
Installed skein-1.0.9
Configuring language-ecmascript-0.15.2...
Installed cookie-
Installed cipher-aes-0.2.7
Building test-framework-hunit-
Building haskell-src-exts-
Building void-0.6.1...
Building resourcet-1.1.1...
Installed test-framework-hunit-
Building language-ecmascript-0.15.2...
Installed void-0.6.1
Installed resourcet-1.1.1
Configuring conduit-1.1.0...
Building conduit-1.1.0...
Installed attoparsec-
Configuring css-text-
Configuring email-validate-2.0.1...
Configuring http-date-0.0.4...
Building http-date-0.0.4...
Building css-text-
Building email-validate-2.0.1...
Installed conduit-1.1.0
Configuring attoparsec-conduit-1.1.0...
Configuring blaze-builder-conduit-1.1.0...
Building attoparsec-conduit-1.1.0...
Building blaze-builder-conduit-1.1.0...
Installed http-date-0.0.4
Configuring conduit-extra-1.1.0...
Configuring monad-logger-
Installed attoparsec-conduit-1.1.0
Configuring network-conduit-1.1.0...
Installed blaze-builder-conduit-1.1.0
Configuring zlib-conduit-1.1.0...
Installed email-validate-2.0.1
Building conduit-extra-1.1.0...
Installed css-text-
Configuring xss-sanitize-
Building monad-logger-
Building network-conduit-1.1.0...
Building zlib-conduit-1.1.0...
Building xss-sanitize-
Installed network-conduit-1.1.0
Installed zlib-conduit-1.1.0
Installed monad-logger-
Installed vector-
Configuring aeson-
Configuring crypto-random-0.0.7...
Configuring resource-pool-
Configuring yesod-routes-
Installed conduit-extra-1.1.0
Configuring cryptohash-conduit-0.1.1...
Building aeson-
Building crypto-random-0.0.7...
Building resource-pool-
Building yesod-routes-
Building cryptohash-conduit-0.1.1...
Configuring wai-
Installed cryptohash-conduit-0.1.1
Installed resource-pool-
Installed crypto-random-0.0.7
Configuring cprng-aes-0.5.2...
Building wai-
Building cprng-aes-0.5.2...
Installed yesod-routes-
Installed wai-
Configuring wai-logger-2.1.1...
Configuring warp-
Installed cprng-aes-0.5.2
Configuring clientsession-
Building wai-logger-2.1.1...
Building warp-
Building clientsession-
Installed clientsession-
Installed wai-logger-2.1.1
Configuring wai-extra-
Building wai-extra-
Failed to install language-ecmascript-0.15.2
Last 10 lines of the build log ( /home/willem/dev/spikes/haskell/yesod-fay/.cabal-sandbox/logs/language-ecmascript-0.15.2.log ):
[ 2 of 13] Compiling Language.ECMAScript3.Parser.Type ( src/Language/ECMAScript3/Parser/Type.hs, dist/dist-sandbox-41dac409/build/Language/ECMAScript3/Parser/Type.o )
[ 3 of 13] Compiling Language.ECMAScript3.Lexer ( src/Language/ECMAScript3/Lexer.hs, dist/dist-sandbox-41dac409/build/Language/ECMAScript3/Lexer.o )
[ 4 of 13] Compiling Language.ECMAScript3.Syntax ( src/Language/ECMAScript3/Syntax.hs, dist/dist-sandbox-41dac409/build/Language/ECMAScript3/Syntax.o )
[ 5 of 13] Compiling Language.ECMAScript3.PrettyPrint ( src/Language/ECMAScript3/PrettyPrint.hs, dist/dist-sandbox-41dac409/build/Language/ECMAScript3/PrettyPrint.o )
[ 6 of 13] Compiling Language.ECMAScript3.Syntax.Annotations ( src/Language/ECMAScript3/Syntax/Annotations.hs, dist/dist-sandbox-41dac409/build/Language/ECMAScript3/Syntax/Annotations.o )
[ 7 of 13] Compiling Language.ECMAScript3.Parser ( src/Language/ECMAScript3/Parser.hs, dist/dist-sandbox-41dac409/build/Language/ECMAScript3/Parser.o )
[ 8 of 13] Compiling Language.ECMAScript3.Syntax.Arbitrary ( src/Language/ECMAScript3/Syntax/Arbitrary.hs, dist/dist-sandbox-41dac409/build/Language/ECMAScript3/Syntax/Arbitrary.o )

    Module `Test.QuickCheck' does not export `Prop'
Installed warp-
Installed xss-sanitize-
Installed wai-extra-
Configuring wai-app-static-2.0.1...
Building wai-app-static-2.0.1...
Installed aeson-
Configuring persistent-
Building persistent-
Installed wai-app-static-2.0.1
Configuring shakespeare-
Building shakespeare-
Installed persistent-
Configuring persistent-template-
Building persistent-template-
Installed shakespeare-
Configuring hamlet-1.2.0...
Configuring shakespeare-css-1.1.0...
Configuring shakespeare-i18n-1.1.0...
Configuring shakespeare-js-1.3.0...
Building shakespeare-js-1.3.0...
Installed persistent-template-
Building shakespeare-i18n-1.1.0...
Building hamlet-1.2.0...
Building shakespeare-css-1.1.0...
Installed shakespeare-js-1.3.0
Installed shakespeare-i18n-1.1.0
Installed shakespeare-css-1.1.0
Installed hamlet-1.2.0
Configuring yesod-core-1.2.11...
Building yesod-core-1.2.11...
Installed yesod-core-1.2.11
Configuring yesod-persistent-
Building yesod-persistent-
Installed yesod-persistent-
Configuring yesod-form-
Building yesod-form-
Installed haskell-src-exts-
Configuring test-framework-th-0.2.4...
Building test-framework-th-0.2.4...
Installed test-framework-th-0.2.4
Installed yesod-form-
cabal: Error: some packages failed to install:
fay- depends on language-ecmascript-0.15.2 which failed to install.
hjsmin- depends on language-javascript-0.5.11 which failed to install.
language-ecmascript-0.15.2 failed during the building phase. The exception
ExitFailure 1
language-javascript-0.5.11 failed during the building phase. The exception
ExitFailure 1
yesod-static- depends on language-javascript-0.5.11 which failed to

Michael Snoyman

Apr 7, 2014, 7:40:56 AM4/7/14
Do you have any idea why it's trying to install fay- There's no upper bound in the scaffolded cabal file, and there are more recent versions of fay available.

You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Willem van den Ende

Apr 7, 2014, 9:56:32 AM4/7/14
Good question, It made me wonder as well. I've tried making sure I've got a clean environment once more (scripts pasted below). 

I'm now getting another error that is telling me that something is very wrong:

fay- depends on language-ecmascript-0.15.2 which failed to install.
haskeline- failed during the configure step. The exception was:
user error (The package 'haskeline' requires Cabal library version -any &&
>=1.16 but no suitable version is installed.)

Haskeline complaines about not finding a suitable cabal library, but cabal reports:
cabal-install version
using version of the Cabal library

So sometimes the correct version of the Cabal library can't be found ??? I searched around for similar error messages, found some cabal issues from the past, but have not been enlightened so far...

/home/willem/.cabal/bin/cabal . 

ghc is  ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.1 

installed with the haskell platform on ubuntu 12.04.

I accidentally also installed the Cabal library in the sandbox, but that makes no difference... I made a few scripts to keep me sane, and explain to the list a bit more of what my config looks like.

inspired by I made two bash functions to reinstall yesod-bin in my global environment, and a script to clean out a sandbox. My ghc-pkg-reset is a bit more extreme, it only leaves the cabal executable, so that I'm sure that I have the latest yesod executable. Maybe I should go a bit further, and remove and reinstall cabal entirely, but I like the one line config change I made to run the compile jobs in parallel (I'll try that after sending this mail and see what it gives).

# ghc-pkg-reset
# Removes all installed GHC/cabal packages, including binaries
# Use this to get out of dependency hell and start over, at the cost of some rebuilding time.
function ghc-pkg-reset-all() {
    read -p 'erasing all your user ghc and cabal packages - are you sure (y/n) ? ' ans
    test x$ans == xy && ( \
        echo 'erasing directories under ~/.ghc'; rm -rf `find ~/.ghc -maxdepth 1 -type d`; \
        echo 'erasing ~/.cabal/lib'; rm -rf ~/.cabal/lib; \
        echo 'erasing ~/.cabal/packages'; rm -rf ~/.cabal/packages; \
        echo 'erasing ~/.cabal/share'; rm -rf ~/.cabal/share; \
        echo 'removing all binaries but cabal' ; mv ~/.cabal/bin/cabal /tmp ; rm ~/.cabal/bin/*; mv /tmp/cabal ~/.cabal/bin/cabal
        cabal update

function yesod-reinstall() {
  cabal install alex happy
  cabal install yesod-bin

cat ~/bin/cabal-clean-sandbox
rm -r .cabal-sandbox
rm cabal.sandbox.config
cabal sandbox init
cabal install --only-dependencies
cabal build

Adam Bergmark

Apr 7, 2014, 10:33:06 AM4/7/14
First of all I'd try to constrain everything to the latest versions --constraint='fay >= 0.19' should give you a better error if it really can't use that version, or maybe it will just work with this.

Willem van den Ende

Apr 7, 2014, 10:35:42 AM4/7/14
Still no idea why it chooses fay-0.17. I decided to update cabal (gently at first) on another box on which I had gotten the scaffold to work (with the exception of QuickCheck, so I disabled the tests... I figured I'd get the dependencies right once I decided to do more with yesod-fay...).

So there the scaffold installs its dependencies, but fails on loading the fay file inside the scaffold. I just generated a new project and used the compilation command printed at the end of yesod init:

cabal sandbox init && cabal install --enable-tests . yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals && yesod devel

Loading package persistent-postgresql- ... linking ... done.
[ 3 of 10] Compiling Settings.Development ( Settings/Development.hs, dist/dist-sandbox-ca6b4f3b/build/Settings/Development.o )
[ 4 of 10] Compiling Settings         ( Settings.hs, dist/dist-sandbox-ca6b4f3b/build/Settings.o )
[ 5 of 10] Compiling Settings.StaticFiles ( Settings/StaticFiles.hs, dist/dist-sandbox-ca6b4f3b/build/Settings/StaticFiles.o )
[ 6 of 10] Compiling Foundation       ( Foundation.hs, dist/dist-sandbox-ca6b4f3b/build/Foundation.o )
[ 7 of 10] Compiling Import           ( Import.hs, dist/dist-sandbox-ca6b4f3b/build/Import.o )
[ 8 of 10] Compiling Handler.Fay      ( Handler/Fay.hs, dist/dist-sandbox-ca6b4f3b/build/Handler/Fay.o )
[ 9 of 10] Compiling Handler.Home     ( Handler/Home.hs, dist/dist-sandbox-ca6b4f3b/build/Handler/Home.o )

    Exception when trying to run compile-time code:
      unable to find (existing) package's share dir: fay-base
tried: /home/willem/dev/spikes/haskell/yesod-pgfay-test/.cabal-sandbox/share/x86_64-linux-ghc-7.6.3/fay-base-0.19

but none of them seem to have Haskell files in them.
If you are using a sandbox you need to specify the HASKELL_PACKAGE_SANDBOX environment variable or use --package-conf.
      Code: fayFile' (Language.Haskell.TH.Syntax.ConE 'StaticR) "Home"
    In a stmt of a 'do' block: $(fayFile' (ConE 'StaticR) "Home")
    In the second argument of `($)', namely
      `do { aDomId <- newIdent;
            setTitle "Welcome To Yesod!";
            $(widgetFile "homepage");
            $(fayFile' (ConE 'StaticR) "Home") }'

    In a stmt of a 'do' block:
      $ do { aDomId <- newIdent;
             setTitle "Welcome To Yesod!";
             $(widgetFile "homepage");
             $(fayFile' (ConE 'StaticR) "Home") }

It seems to pick up the cabal sandbox allright, so the environment variable is not necessary?

I can see I have a newer ghc there:

$ which ghc
willem@w1lem:~/dev/spikes/haskell/yesod-pgfay-test$ ghc version
target `version' is not a module name or a source file
willem@w1lem:~/dev/spikes/haskell/yesod-pgfay-test$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3

at some point I'll figure it out, and be able to build this...

Willem van den Ende

Apr 7, 2014, 11:17:40 AM4/7/14
Thanks, good suggestion. I tried that as well. Specifying fay >= 0.18 did give me fay, just got other dependency errors, cabal did not even start compiling.

It's getting better, at least I can now compile (on one machine) yesod-fay with fay- So now it's just the scaffold that can't find its files apparently.

Sample output for fay >=0.19, after generating the project from scratch, trying to build it, then change the fay dependency to >= 0.19 :

willem@angel:~/dev/spikes/haskell/yesod-fay-test$ cabal install --only-dependencies
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: aeson- (user goal)
trying: yesod-fay-test-0.0.0 (user goal)
trying: fay- (dependency of yesod-fay-test-0.0.0)
next goal: haskell-packages (dependency of fay-
rejecting: haskell-packages-, (conflict: aeson =>
mtl==, haskell-packages => mtl>=2.1)
rejecting: haskell-packages- (conflict: fay =>
haskell-packages== || > && <0.3)
rejecting: haskell-packages- (conflict:
aeson==, haskell-packages => aeson==0.6.*)
rejecting: haskell-packages-0.2.3, 0.2.2, 0.2.1, 0.2, 0.1 (conflict: fay =>
haskell-packages== || > && <0.3)
Backjump limit reached (change with --max-backjumps).

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

Maybe I should go through the other dependencies and move them up as well. But where to start? (and on my other machine it mysteriously works...).

deleting the sandbox, recreating it again and running  cabal install --enable-tests . yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals && yesod devel


willem@angel:~/dev/spikes/haskell/yesod-fay-test$ cabal install --enable-tests . yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals && yesod devel
Resolving dependencies...
In order, the following would be installed:
Diff-0.3.0 (new package)
HUnit- (new version)
SHA-1.6.4 -decoderinterface (new package)
ansi-terminal- (new package)
ansi-wl-pprint- (new package)
asn1-types-0.2.3 (new package)
base-unicode-symbols- (new package)
base16-bytestring- (new package)
base64-bytestring- (new package)
byteable-0.1.1 (new package)
byteorder-1.0.4 (new package)
cereal- (new package)
crypto-pubkey-types- (new package)
cryptohash-0.11.4 (new package)
data-default-class-0.0.1 (new package)
data-default-instances-base-0.0.1 (new package)
data-default-instances-containers-0.0.1 (new package)
data-default-instances-old-locale-0.0.1 (new package)
dlist- (new package)
data-default-instances-dlist-0.0.1 (new package)
data-default-0.5.3 (new package)
entropy- (new package)
file-embed-0.0.6 (new package)
ghc-paths- (new package)
haskell-lexer-1.0 (new package)
hinotify-0.3.6 (new package)
hostname-1.0 (new package)
hspec-expectations- (new package)
monad-loops-0.4.2 (new package)
nats-0.1.2 (new package)
network-info- (new package)
postgresql-libpq- (new package)
pretty-show-1.6.7 (new package)
primitive- (new package)
pwstore-fast-2.4.1 (new package)
safe-0.3.4 (new package)
securemem-0.1.3 (new package)
crypto-cipher-types-0.0.9 (new package)
cipher-aes-0.2.7 (new package)
cipher-rc4-0.1.4 (new package)
setenv- (new package)
silently- (new package)
split-0.2.2 (new package)
stm-2.4.3 (new version)
async- (new package)
stm-chans- (new package)
stringsearch- (new package)
tagged-0.7.1 (new package)
tar- (new package)
text- (latest: (new version)
blaze-builder- (new package)
blaze-markup- (new package)
blaze-html- (new package)
cookie- (new package)
fast-logger-2.1.5 (new package)
hashable- (new package)
case-insensitive- (new package)
http-types-0.8.4 (new package)
mime-mail- (new package)
mime-types- (new package)
path-pieces- (new package)
polyparse-1.9 (new package)
cpphs-1.18.4 (new package)
haskell-src-exts- (new package)
hse-cpp-0.1 (new package)
scientific- (new package)
attoparsec- (new package)
css-text- (new package)
email-validate-2.0.1 (new package)
http-date-0.0.4 (new package)
system-filepath-0.4.10 (new package)
system-fileio-0.3.12 (new package)
fsnotify-0.0.11 (new package)
tagsoup-0.13.1 (new package)
text-stream-decode- (new package)
tf-random-0.4 (new package)
QuickCheck-2.7.3 (new version)
quickcheck-io-0.1.0 (latest: 0.1.1) (new package)
transformers- (new version)
crypto-api-0.13 (new package)
hspec-1.9.1 (latest: 1.9.2) (new package)
mmorph-1.0.2 (new package)
mtl- (new version)
MonadRandom-0.1.13 (new package)
asn1-encoding- (new package)
asn1-parse-0.8.1 (new package)
exceptions-0.5 (new package)
optparse-applicative- (new package)
parsec-3.1.5 (new version)
network- (new version)
pem-0.2.1 (new package)
pureMD5- (new package)
regex-base-0.93.2 (reinstall) changes: mtl- ->
regex-posix-0.95.2 (new version)
language-haskell-extract-0.2.4 (new package)
simple-sendfile-0.2.13 (new package)
skein-1.0.9 (new package)
socks-0.5.4 (new package)
streaming-commons- (new package)
transformers-base-0.4.1 (new package)
monad-control- (new package)
lifted-base- (new package)
resourcet-1.1.0 (latest: 1.1.1) (new package)
transformers-compat- (new package)
contravariant-0.4.4 (new package)
distributive- (new package)
traverse-with-class- (new package)
type-eq-0.4.2 (new package)
unix-compat- (new package)
unix-time-0.2.2 (new package)
unordered-containers- (new package)
semigroups-0.12.2 (new package)
comonad-4.0.1 (new package)
semigroupoids-4.0.1 (new package)
data-lens-2.10.4 (new package)
data-lens-template-2.1.8 (new package)
either-4.1.1 (new package)
uniplate-1.6.12 (new package)
language-ecmascript-0.15.2 (latest: 0.16.1) (new package)
utf8-light-0.4.2 (new package)
utf8-string-0.3.7 -bytestring-in-base (new package)
language-javascript-0.5.9 (latest: 0.5.12) (new package)
hjsmin- (new package)
publicsuffixlist-0.1 (new package)
http-client- (new package)
uuid-1.3.3 (new package)
vault- (new package)
vector- (new package)
aeson- +blaze-builder (new package)
blaze-textual- (new package)
crypto-random-0.0.7 (new package)
cprng-aes-0.5.2 (new package)
clientsession- (new package)
crypto-numbers-0.2.3 (new package)
crypto-pubkey-0.2.4 (new package)
haskell-packages- (new package)
haskell-names-0.3.3 (new package)
postgresql-simple- (new package)
resource-pool- (new package)
sourcemap- (new package)
void-0.6.1 (new package)
conduit-1.1.0 (new package)
attoparsec-conduit-1.1.0 (new package)
blaze-builder-conduit-1.1.0 (new package)
conduit-extra-1.1.0 (new package)
cryptohash-conduit-0.1.1 (new package)
monad-logger- (new package)
network-conduit-1.1.0 (new package)
persistent- (new package)
esqueleto-1.3.9 (new package)
persistent-postgresql- (new package)
persistent-template- (new package)
project-template- (new package)
wai- (new package)
wai-logger-2.1.1 (new package)
wai-test- (new package)
warp- (new package)
word8-0.0.4 (new package)
http-reverse-proxy- (latest: (new package)
x509-1.4.11 (new package)
x509-store-1.4.4 (new package)
x509-system-1.4.2 (new package)
x509-validation-1.5.0 (new package)
tls-1.2.6 (new package)
connection-0.2.0 (new package)
http-client-tls- (new package)
http-conduit-2.1.0 (new package)
warp-tls- (new package)
xml-1.3.13 (new package)
test-framework- (new package)
test-framework-hunit- (new package)
test-framework-th-0.2.4 (new package)
fay- (new package)
xml-types-0.3.4 (new package)
xml-conduit- (new package)
tagstream-conduit- (new package)
authenticate- (new package)
html-conduit- (new package)
xss-sanitize- (new package)
yaml- (new package)
yesod-routes- (new package)
zlib-conduit-1.1.0 (new package)
wai-extra- (new package)
wai-app-static-2.0.1 (new package)
shakespeare- (new package)
hamlet-1.2.0 (new package)
shakespeare-css-1.1.0 (new package)
shakespeare-i18n-1.1.0 (new package)
shakespeare-js-1.3.0 (new package)
shakespeare-text-1.1.0 (new package)
yesod-bin-1.2.8 (new package)
yesod-core-1.2.11 (new package)
yesod-persistent- (new package)
yesod-form- (new package)
yesod-auth- (new package)
yesod- (new package)
yesod-static- (new package)
yesod-fay- (new package)
yesod-test- (new package)
yesod-fay-test-0.0.0 *test (new package)
yesod-platform- (new package)
cabal: The following packages are likely to be broken by the reinstalls:
Use --force-reinstalls if you want to install anyway.

doing it with --force-reinstalls is then more interesting (only the tail, it is long):
fay- depends on language-ecmascript-0.15.2 which failed to install.
haskell-names-0.3.3 depends on type-eq-0.4.2 which failed to install.

language-ecmascript-0.15.2 failed during the building phase. The exception
ExitFailure 1
type-eq-0.4.2 failed during the configure step. The exception was:

ExitFailure 1
yesod-fay- depends on language-ecmascript-0.15.2 which failed to
yesod-fay-test-0.0.0 depends on language-ecmascript-0.15.2 which failed to

and now it gets interesting, on the machine where yesod-fay built succesfully, I got:
Installed language-ecmascript-0.16.1

going to try that and see if it helps. still strange cabal on the other machine installs higher versions automatically. Tempted to install a newer ghc on the broken machine, but I don't think that is it. I'll keep trying to understand how cabal does this, otherwise I'll be staring at this every time I try to update yesod I'm afraid.

Willem van den Ende

Apr 7, 2014, 11:30:28 AM4/7/14
From there on, it only gets scarier ;). Specified fay >=0.19 and then ecmascript>0.16 and got, amongst other things this:

Last 10 lines of the build log ( /home/willem/dev/spikes/haskell/yesod-fay/.cabal-sandbox/logs/traverse-with-class- ):
Loading package containers- ... linking ... done.
Loading package pretty- ... linking ... done.
Loading package template-haskell ... linking ... done.

Data/Generics/Traversable/Instances.hs:21:1:ghc: panic! (the 'impossible' happened)
  (GHC version 7.4.1 for x86_64-unknown-linux):
    Can't happen: pprExp (CompExp [])

Please report this as a GHC bug:

tempted to install a newer ghc like on the this machine as well. (that leaves the missing haskell files in the scaffold, but that might be fixable...).

On Monday, April 7, 2014 3:33:06 PM UTC+1, Adam Bergmark wrote:

Adam Bergmark

Apr 7, 2014, 11:33:20 AM4/7/14
>    Exception when trying to run compile-time code:
>      unable to find (existing) package's share dir: fay-base
> tried: /home/willem/dev/spikes/haskell/yesod-pgfay-test/.cabal-sandbox/share/x86_64-linux-ghc-7.6.3/fay-base-0.19
> /home/willem/dev/spikes/haskell/yesod-pgfay-test/.cabal-sandbox/share/x86_64-linux-ghc-7.6.3/fay-base-0.19/src

This is because you are running fay from a sandbox, Fay has an option `configPackageConf` that should be set to your sandbox's package config file. See
yesod-fay doesn't currently have an option to pass this through to fay, but it may work to just set the HASKELL_PACKAGE_SANDBOX env variable, or add this option to yesod-fay so it's passed through properly.

Willem van den Ende

Apr 7, 2014, 11:42:37 AM4/7/14
Thanks, I'll try that out.

Willem van den Ende

Apr 7, 2014, 2:05:27 PM4/7/14
that did the trick :). Thanks!

For other newbies passing by later: the HASKELL_PACKAGE_SANDBOX needs the conf.d directory, not the cabal.sandbox.conf. For some reason (as indicated in the fay installing and running sandboxes page) you need to cabal install fay-base by hand as well. I'll see if adding it to the projects' cabal file helps (it should, right?).

export HASKELL_PACKAGE_SANDBOX=.cabal-sandbox/x86_64-linux-ghc-7.6.3-packages.conf.d/
cabal build (complains about missing fay-base)
cabal install fay-base
cabal build
cabal test

Everything compiles (the test fails because I still need to make a new postgres database, but that's trivial :) ).

I'll try the other machine with a newer ghc. should work as well. Thanks :)

Adam Bergmark

Apr 7, 2014, 3:18:00 PM4/7/14
You can't add fay-base to the cabal file since its module names conflict with base. You can however add some other fay package (such as fay-text) as a depnedency which will force fay-base to be installed.


Willem van den Ende

Apr 7, 2014, 5:52:16 PM4/7/14
Thanks, added fay-text to the projects cabal file (looks useful in itself as well, to not have String everywhere). I'll look into yesod-fay's and see if it can pass configPackageConf on (I have no clue, but should be a good learning experience...).
Reply all
Reply to author
0 new messages