Thursday, 15 August 2013

javascript - escape from cabal hell with haste, binary and zip-archive -



javascript - escape from cabal hell with haste, binary and zip-archive -

i'd utilize haste-compiler bundle haskell-to-javascript thing:

jsnavely@beefy:~/project$ cabal install haste-compiler resolving dependencies... ... configuring zip-archive-0.2.3... building zip-archive-0.2.3... preprocessing library zip-archive-0.2.3... [1 of 1] compiling codec.archive.zip ( src/codec/archive/zip.hs, dist/build/codec/archive/zip.o ) src/codec/archive/zip.hs:163:27: not in scope: `decodeorfail' failed install zip-archive-0.2.3 cabal: error: packages failed install: haste-compiler-0.3 depends on zip-archive-0.2.3 failed install. zip-archive-0.2.3 failed during building phase. exception was: exitfailure 1

i noticed there newer version of zip-archive bumped version of binary >= 0.7, supplies decodeorfail function. tried checking out haste-compiler repo , bumping zip-archive version new zip-archive 0.2.3.2. doesn't help:

jsnavely@beefy:~/project/haste-compiler$ cabal install resolving dependencies... cabal: not resolve dependencies: trying: haste-compiler-0.3 (user goal) trying: zip-archive-0.2.3.2/installed-208... (dependency of haste-compiler-0.3) trying: ghc-7.6.3/installed-0d1... (dependency of haste-compiler-0.3) next goal: bin-package-db (dependency of ghc-7.6.3/installed-0d1...) rejecting: bin-package-db-0.0.0.0/installed-837... (conflict: zip-archive => binary==0.7.1.0/installed-961..., bin-package-db => binary==0.5.1.1/installed-5b8...) dependency tree exhaustively searched.

i tried manually installing zip-archive, , binary, , doing in sandbox. don't know - i'd replace javascript well-typed haskelly goodness. experience same problem on macbookpro , linux box, both running latest haskell-platform, ghc version 7.6.3

your dependency tree looks sort of this:

class="lang-none prettyprint-override"> ┌────────────────────┐ ┌─────────┤ haste─compiler─0.3 │ │ depends └─────────────────┬──┘ v │ ┌───────────┐ │ depends │ ghc─7.6.3 │ │ └─────┬─────┘ v │ depends ┌─────────────────────┐ v │ zip─archive─0.2.3.2 │ ┌────────────────────────┐ └───────────┬─────────┘ │ bin─package─db─0.0.0.0 │ │ └───────────┬────────────┘ │ depends │ depends │ v v ┌────────────────┐ conflicts ┌────────────────┐ │ binary─0.5.1.1 │<────────────────>│ binary─0.7.1.0 │ └────────────────┘ └────────────────┘

since it’s infeasible reinstall ghc, , , below ‘fixed in place’ us, we’ll have seek alter zip-archive-0.2.3.2 , binary-0.7.1.0. let’s @ constraints of haste-compiler-0.3:

class="lang-none prettyprint-override">zip-archive

so doesn’t specify version @ all. do. if @ previous versions of zip-archive, see version 0.2.2.1 earliest version has constraint on binary compatible installed binary-0.5.1.1 built on hackage. here’s how should resolve it:

unregister zip-archive-0.2.3.2 , binary-0.7.1.0 in order:

class="lang-none prettyprint-override">% ghc-pkg unregister zip-archive-0.2.3.2 % ghc-pkg unregister binary-0.7.1.0

delete 2 packages ghc library directory. varies depending on installation, take in ~/.ghc, ~/.cabal, , ~/library/haskell lib directory (possibly within subdirectory or two) , see if can find packages in there somewhere.

install haste-compiler-0.3 constraint on zip-archive version:

class="lang-none prettyprint-override">% cabal install --constraint='zip-archive==0.2.2.1' haste-compiler==0.3

that should work, haven’t tried myself, go wrong.

javascript haskell cabal

No comments:

Post a Comment