Hi,
I am writing because I want to install a program called hpodder which is written in Haskell. I am using Fedora 19 beta with these Haskell packages installed: $ rpm -qa | grep haskell ghc-haskell98-2.0.0.1-11.fc19.x86_64 ghc-haskell-platform-devel-2012.4.0.0-22.fc19.x86_64 ghc-template-haskell-2.7.0.0-11.fc19.x86_64 ghc-haskell2010-devel-1.1.0.1-11.fc19.x86_64 ghc-haskell-src-devel-1.0.1.5-22.fc19.x86_64 ghc-haskell98-devel-2.0.0.1-11.fc19.x86_64 ghc-template-haskell-devel-2.7.0.0-11.fc19.x86_64 haskell-platform-2012.4.0.0-22.fc19.x86_64 ghc-haskell2010-1.1.0.1-11.fc19.x86_64 ghc-haskell-src-1.0.1.5-22.fc19.x86_64
My attempts to compile this program fails and my Haskell skills are quite limited.
To reproduce:
1. git clone https://github.com/jgoerzen/hpodder.git 2. cd hpodder 3. cabal install Resolving dependencies... Configuring HaXml-1.20.2... Building HaXml-1.20.2... Preprocessing library HaXml-1.20.2...
src/Text/XML/HaXml.hs:1:1: Ambiguous module name `Prelude': it was found in multiple packages: base haskell98-2.0.0.1 cabal: Error: some packages failed to install: HaXml-1.20.2 failed during the building phase. The exception was: ExitFailure 1
4. ./setup configure Configuring hpodder-1.1.6... setup: At least the following dependencies are missing: ConfigFile -any, HDBC >=1.1.0, HDBC-sqlite3 >=1.1.0, HaXml ==1.20.*, MissingH >=1.0.0, hslogger -any make: *** [all] Error 1
Regards Martin Bevar misundelsesafgifterne og cafepengene! Hurra for ældrebyrden!
Hi Martin,
Resolving dependencies... Configuring HaXml-1.20.2... Building HaXml-1.20.2... Preprocessing library HaXml-1.20.2...
src/Text/XML/HaXml.hs:1:1: Ambiguous module name `Prelude': it was found in multiple packages: base haskell98-2.0.0.1 cabal: Error: some packages failed to install: HaXml-1.20.2 failed during the building phase. The exception was: ExitFailure 1
You will probably have more luck building it with ghc-7.0...
I see the same here on F19.
I think best to contact the hpodder author for help on fixing this (ie with getting it to build with ghc-7.4). Newer (latest) HaXml seems to build ok with ghc-7.4 (f19), but current hpodder does not seem happy with it:
Commands/Ls.hs:86:11: Could not deduce (PrintfType (m a0)) arising from the ambiguity check for `printep' from the context (Monad m, PrintfType (m ()), PrintfType (m a)) bound by the inferred type for `printep': (Monad m, PrintfType (m ()), PrintfType (m a)) => Episode -> m () at Commands/Ls.hs:(86,11)-(90,69) Possible fix: add an instance declaration for (PrintfType (m a0)) When checking that `printep' has the inferred type `forall (m :: * -> *) a. (Monad m, PrintfType (m ()), PrintfType (m a)) => Episode -> m ()' Probable cause: the inferred type is ambiguous In an equation for `lsepisodes_worker': lsepisodes_worker gi (opts, casts) = do { pc <- getSelectedPodcasts (gdbh gi) casts; printf "%-5s %-5s %-4s %-60.60s" "CstId" "EpId" "Stts" "Episode Title"; when (islong) (printf " Episode URL"); .... } where printep ep = do { printf "%-5d %-5d %-4s %-60.60s" (castid (podcast ep)) (epid ep) (take 4 . show $ epstatus ep) (eptitle ep); .... } islong = lookup "l" opts == Just ""
(above error is not related to the HaXml version).
Jens
ps For posterity I attached a patch to make HaXml-1.20 library build with ghc-7.4 but that does not fix the above problem with compiling hpodder (ie hpodder /might/ perhaps build okay with latest HaXml).
I think best to contact the hpodder author for help on fixing this (ie with getting it to build with ghc-7.4). Newer (latest) HaXml seems to build ok with ghc-7.4 (f19), but current hpodder does not seem happy with it:
Commands/Ls.hs:86:11: Could not deduce (PrintfType (m a0)) arising from the ambiguity check for `printep' from the context (Monad m, PrintfType (m ()), PrintfType (m a))
Ah I think someone has probably already done the work: see https://github.com/jgoerzen/hpodder/pull/10
haskell@lists.fedoraproject.org