hackage

Haskell: Flaw in the description of applicative functor laws in the hackage Control.Applicative article?: it says Applicative determines Functor

烂漫一生 提交于 2021-02-08 12:30:49
问题 I think I found a flaw in the hackage article for Control.Applicative. As a description of the applicative functor laws, it says: class Functor f => Applicative f where A functor with application, providing operations to embed pure expressions ( pure ), and sequence computations and combine their results ( <*> ). A minimal complete definition must include implementations of these functions satisfying the following laws: identity pure id <*> v = v composition pure (.) <*> u <*> v <*> w = u <*>

Which dialect of Markdown does Hackage use to render READMEs?

纵饮孤独 提交于 2021-01-02 17:04:25
问题 Hackage has been able to display Markdown READMEs for a while. But as one can see for example on the Hackage page for hpack, Hackage doesn't seem to support the same table syntax as GitHub. Markdown: #### <a name="flags"></a>Flags | Hpack | Cabal | Default | Notes | | --- | --- | --- | --- | | `description` | `description` | | Optional | | `manual` | `manual` | | Required (unlike Cabal) | | `default` | `default` | | Required (unlike Cabal) | Rendered on GitHub: Rendered on Hackage: So, I'm

Regular Expression on Yesod type Text

家住魔仙堡 提交于 2020-01-25 00:59:08
问题 Currently, I am changing my Text to String then using Text.Regex.Posix to do my matching. Is there a idiomatic and efficient way to do regular expression in Yesod? 回答1: Have you taken a look at the regex-tdfa-text package? It provides backend support for using the regex-base library with Text strings. 来源: https://stackoverflow.com/questions/31160216/regular-expression-on-yesod-type-text

Which Haskell package for JSON

心不动则不痛 提交于 2019-12-21 06:46:32
问题 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.? 回答1: 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

Control.Monad.State found in multiple packages haskell

安稳与你 提交于 2019-12-20 09:16:03
问题 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? 回答1: 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

How are all graphic and web libraries implemented in Haskell?

北战南征 提交于 2019-12-12 10:49:20
问题 I only begin to learn Haskell. I've read that it is a pure functional language and everything in it is immutable. So things like input output, writing and reading databases cause mutability of the state. I know there is a thing in Haskell called monads which allow to use imperative features in Haskell like IO Monad . But I'm interesting is everything imperative in Haskell is implemented with the help of monads? On the HackageDB there are a lot of packages which allow to work with 3d-graphics,

Installing packages (via cabal) from “local hackage”

馋奶兔 提交于 2019-12-10 14:04:44
问题 Is it possible to get cabal to Download a particular package source, including all dependency packages sources. At a later stage (when internet connectivity can no longer be relied upon) install these packages via cabal, from the locally downloaded files, automatically in the right order so that the desired package is build? I know that you can use cabal unpack to view the source of a particular package, but I am not sure how to achieve above. Also note that in this post Can't get cabal

Haskell, Hackage, GHC and productivity. What to do? [closed]

醉酒当歌 提交于 2019-12-10 03:48:58
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . For a year I've been a rookie haskeller ("rookie haskeller" forever, I think). I have coded little haskell programs (eg. a very simple

mysterious cabal-install problems

℡╲_俬逩灬. 提交于 2019-12-10 03:17:16
问题 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

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

送分小仙女□ 提交于 2019-12-09 02:51:51
问题 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