{"issue":{"milestone":null,"title":"Couldn't match expected type `RVar Char' against inferred type `random-fu-0.1.4:Data.Random.RVar.RVar Char'","created_at":"2011-12-30T17:16:27Z","user":{"login":"mcandre","id":5316,"url":"https://api.github.com/users/mcandre","avatar_url":"https://secure.gravatar.com/avatar/dfe88469b75efc87cbcbbbc2a975850a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"dfe88469b75efc87cbcbbbc2a975850a"},"updated_at":"2011-12-30T19:27:47Z","state":"open","labels":[],"id":2690145,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"closed_at":null,"html_url":"https://github.com/mokus0/random-fu/issues/4","body":"Something may have changed in the random-fu API, because my Haskell project, [genetics](https://github.com/mcandre/genetics), fails to compile in Ubuntu.\r\n\r\nSpecs:\r\n\r\n\t$ lsb_release -a\r\n\tNo LSB modules are available.\r\n\tDistributor ID:\tUbuntu\r\n\tDescription:\tUbuntu 10.04.3 LTS\r\n\tRelease:\t10.04\r\n\tCodename:\tlucid\r\n\r\n\t$ ghc --version\r\n\tThe Glorious Glasgow Haskell Compilation System, version 6.12.1\r\n\r\n\t$ cabal --version\r\n\tcabal-install version 0.8.0\r\n\tusing version 1.8.0.2 of the Cabal library\r\n\r\n\t$ cabal list random-fu --installed\r\n\t* random-fu\r\n\t\tSynopsis: Random number generation\r\n\t\tLatest version available: 0.2.1.0\r\n\t\tLatest version installed: 0.2.1.0\r\n\t\tHomepage: https://github.com/mokus0/random-fu\r\n\t\tLicense:  PublicDomain\r\n\r\nTrace:\r\n\r\n\t$ git clone https://github.com/mcandre/genetics.git\r\n\t$ cd genetics\r\n\t$ make\r\n\tghc --make -O2 -fforce-recomp -optl\"-Wl,-no_compact_unwind\" hellogenetics.hs genetics.hs -package base -package random-extras -package random-fu\r\n\t[1 of 2] Compiling Genetics         ( genetics.hs, genetics.o )\r\n\t[2 of 2] Compiling Main             ( hellogenetics.hs, hellogenetics.o )\r\n\r\n\thellogenetics.hs:16:22:\r\n\t\tCouldn't match expected type `RVar Char'\r\n\t\t       against inferred type `random-fu-0.1.4:Data.Random.RVar.RVar Char'\r\n\t\tIn the first argument of `runRVar', namely `(choice ['a' .. 'z'])'\r\n\t\tIn the expression: runRVar (choice ['a' .. 'z']) DevRandom\r\n\t\tIn the definition of `randomChar':\r\n\t\t    randomChar = runRVar (choice ['a' .. 'z']) DevRandom\r\n\r\n\thellogenetics.hs:25:20:\r\n\t\tCouldn't match expected type `RVar a'\r\n\t\t       against inferred type `random-fu-0.1.4:Data.Random.RVar.RVar Int'\r\n\t\tIn the first argument of `runRVar', namely\r\n\t\t    `(choice [0 .. length target - 1])'\r\n\t\tIn a stmt of a 'do' expression:\r\n\t\t    index <- runRVar (choice [0 .. length target - 1]) DevRandom\r\n\t\tIn the expression:\r\n\t\t    do { index <- runRVar (choice [0 .. length target - 1]) DevRandom;\r\n\t\t         ch <- randomChar;\r\n\t\t           return $ take index gene ++ [ch] ++ drop (index + 1) gene }\r\n\tmake: *** [all] Error 1","number":4,"url":"https://api.github.com/repos/mokus0/random-fu/issues/4","comments":1,"assignee":null},"comment":{"created_at":"2011-12-30T19:27:47Z","user":{"login":"mokus0","id":607740,"url":"https://api.github.com/users/mokus0","avatar_url":"https://secure.gravatar.com/avatar/53983ad4359dfb6f3894314cb629b5ac?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"53983ad4359dfb6f3894314cb629b5ac"},"updated_at":"2011-12-30T19:27:47Z","id":3316239,"body":"    Couldn't match expected type `RVar Char'\r\n           against inferred type `random-fu-0.1.4:Data.Random.RVar.RVar Char'\r\n\r\nThis part looks suspect to me;  something in your ghc-pkg database appears to still want an old version of random-fu.  Is 'choice' the one from \"random-extras\"?  If so, I'm not sure whether the author of that package maintains it, but its cabal file demands random-fu version 0.1.*, so that's probably the problem.  As far as I know, though, most of its \"extras\" are already in random-fu, so you may not need it anyway.  \"choice\", for example, does the same thing as \"randomElement\".  If there's a performance difference or some other reason to prefer the random-extras version, I'd like to hear about that anyway so I can fix mine ;)","url":"https://api.github.com/repos/mokus0/random-fu/issues/comments/3316239"},"action":"created"}