News aggregator

Template Haskell changes to names and package keys

libraries list - Fri, 05/01/2015 - 6:09pm
In GHC 7.10, we changed the internal representation of names to be based on package keys (base_XXXXXX) rather than package IDs (base-, however, we forgot to update the Template Haskell API to track these changes. This lead to some bugs in TH code which was synthesizing names by using package name and version directly, e.g. We now propose the following changes to the TH API in order to track these changes: 1. Currently, a TH NameG contains a PkgName, defined as: newtype PkgName = PkgName String This is badly misleading, even in the old world order, since these needed version numbers as well. We propose that this be renamed to PkgKey: newtype PkgKey = PkgKey String mkPackageKey :: String -> PackageKey mkPackageKey = PkgKey 2. Package keys are somewhat hard to synthesize, so we also offer an API for querying the package database of the GHC which is compiling your code for infor
Categories: Offsite Discussion

Agda and cpphs 1.19

libraries list - Wed, 04/29/2015 - 3:42pm
Hi, The current version of Agda ( in Hackage doesn't install with the current version of cpphs (1.19) in Hackage due to the following restriction: build-tools: cpphs >= 1.18.6 && < 1.19 Although I'm a maintainer of Agda, using the Hackage web interface I couldn't increase the upper bound for cpphs to 1.20 because this upper bound is inside a cabal flag. Since this problem has been repeatedly reported by Agda's users, could some Hackage trustee fix the problem, please. Thanks,
Categories: Offsite Discussion

Proposal: Add "fma" to the RealFloat class

libraries list - Wed, 04/29/2015 - 8:21am
This proposal is very much in the spirit of the earlier proposal on adding new float/double functions; for instance see here: "fma" (a.k.a. fused-multiply-add) is one of those functions; which is the workhorse in many HPC applications. The idea is to multiply two floats and add a third with just one rounding, and thus preserving more precision. There are a multitude of applications for this operation in engineering data-analysis, and modern processors come with custom implementations and a lot of hardware to support it natively. I created a ticket along these lines already: Edward suggested that the matter should further be discussed here. I think the proposal is rather straightforward, and should be noncontroversial. To wit, we shall add a new method to the RealFloat class: class (RealFrac a, Floating a) => RealFloat a where ... fma :: a -> a -> a -> a The intention is that
Categories: Offsite Discussion

Looking for retainers of PINNED objects

glasgow-user - Wed, 04/29/2015 - 5:37am
Hi all, I'm profiling a fairly large program which seems to have a space leak. The heap profiling (-hc) shows that PINNED objects are accumulated over time. In order to check the retainers of the objects, I ran the retainer profiling. Unfortunately it didn't output anything with -hr -hcPINNED. Also, this is just a guess though, the retainer profiling without any filters (I mean just -hr) doesn't seem to include PINNED objects at all. Is there a way to check what retains the PINNED objects? Thanks, Mitsutoshi _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >
Categories: Offsite Discussion

monad-peel takeover

libraries list - Tue, 04/28/2015 - 11:47pm
I'd like to take the maintenance of monad-peel as it's currently broken and Anders seems unavailable.
Categories: Offsite Discussion

Maintainship of edit-distance and lattices

libraries list - Sun, 04/26/2015 - 2:52pm
Hi, I’d like to help with maintaining of mentioned packages: - <> - <> Max doesn’t seem to be active on GitHub, there are - a PR to edit-distance fixing the build on GHC 7.10, open for 26 days: <> - a PR to lattices opened at Jan 8 2015 (open for over 3 months already) <> I could take over the maintainership of the packages, if Max doesn’t respond in two weeks - Oleg Grenrus _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Ord for partially ordered sets

libraries list - Fri, 04/24/2015 - 2:06pm
What is the validity of defining an Ord instance for types for which mathematically the `compare` function is partially ordered? Specifically, I have a pull request for fgl [1] to add Ord instances for the graph types (based upon the Ord instances for Data.Map and Data.IntMap, which I believe are themselves partially ordered), and I'm torn as to the soundness of adding these instances. It might be useful in Haskell code (the example given is to use graphs as keys in a Map) but mathematically-speaking it is not possible to compare two arbitrary graphs. What are people's thoughts on this? What's more important: potential usefulness/practicality or mathematical correctness? (Of course, the correct answer is to have a function of type a -> a -> Maybe Ordering :p) [1]:
Categories: Offsite Discussion

Export ($!) from Data.Function

libraries list - Fri, 04/24/2015 - 1:29pm
Hello, Right now ($!) operator can be imported either from Prelude or GHC.Base. The later is specific to GHC, so it makes sense to avoid it. There are reasons to avoid Prelude too (e.g. because it pollutes name space, changes too often, etc.) We need a home module for all identifies from Prelude, so that one can import them without importing Prelude. Data.Functor seems to be a good candidate for ($!) operator home module. It already exports ($) operator. Thanks, Yuras
Categories: Offsite Discussion

Applicative instance of ExceptT is wrong

libraries list - Thu, 04/23/2015 - 5:02pm
I've recently discovered a flaw in the Applicative and Alternative instances of EitherT. I've posted the following pull request to fix them: The pull request contains the description of the problem. ExceptT of "transformers" contains exactly the same flaw. However it's not hosted on GitHub, so I don't know a better place to report the issue then here. Best regards, Nikita Volkov _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Exceptions with Context Re: Proposal: Add exception info

libraries list - Wed, 04/22/2015 - 3:23am
hrm, i like this proposal more, and it seems like with some fleshing out it can be strictly more extensible yet backwards compatible than michael's I'll need to mull it a bit more before I cast my vote, but this seems to sketch out a design that provides the same information, but in a more extensible/backwards compatible fashion (at least in a first cut of thinking about it) (i'm splitting this into a new thread so the discussions dont get mixed up) On Tue, Apr 21, 2015 at 9:40 PM, davean <davean< at >> wrote: _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Proposal: add alterLookupWithKey to Data.Map.Lazy (containers)

libraries list - Tue, 04/21/2015 - 10:23pm
Github issue: Summary: add alterLookupWithKey :: Ord k => (k -> Maybe a -> Maybe a) -> k -> Map k a -> (Maybe a, Map k a) function to Data.Map.Lazy. Details: implement alterLookupWithKey function which takes an update function, key and map, allowing to insert, delete or update a value in a Map and return updated map with a new value. Motivations: For insert/update/delete: same as for alter :: Ord k => (Maybe a -> Maybe a) -> k -> Map k a -> Map k a - it allows to perform insert/update/delete within single lookup. For returning updated value: same as for *LookupWithKey functions - in case of update we mind be interested in the updated value. For a "key" parameter: hornestly, don't know. *LookupWithKey functions are having (k -> .. ) -> k -> <a> -> Map k a -> (Maybe a, Map k a) signatures, but I don't see any reason to pass the key to the update function, because we always can capture the key in a closure if we whant to. The only reason is to respect exist
Categories: Offsite Discussion

Data.Tree traversals

libraries list - Tue, 04/21/2015 - 4:20am
Data.Tree makes Tree into a Traversable in only one way: depth-first. It seems to me that we should have a newtype to traverse in breadth-first order. David Feuer _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Proposal: liftData for Template Haskell

libraries list - Fri, 04/17/2015 - 12:21pm
I propose adding the following function to Language.Haskell.TH: -- | 'liftData' is a variant of 'lift' in the 'Lift' type class which -- works for any type with a 'Data' instance. liftData :: Data a => a -> Q Exp liftData = dataToExpQ (const Nothing) I don't really know which submodule this should come from; since it uses 'dataToExpQ', you might put it in Language.Haskell.TH.Quote but arguably 'dataToExpQ' doesn't belong in this module either, and it only lives there because it is a useful function for defining quasiquoters and it was described in the quasiquoting paper. I might propose getting rid of the 'Lift' class entirely, but you might prefer that class since it doesn't go through SYB (and have the attendant slowdown). This mode of use of 'dataToExpQ' deserves more attention. Discussion period: 1 month Cheers, Edward
Categories: Offsite Discussion

bed & breakfast library update?

libraries list - Wed, 04/15/2015 - 7:52pm
I've asked a couple of times over the last eight moths for an update of this library that would compile on 7.8 to be published, and gotten no response. If you're not able or interested in maintaining this library any longer, please let the community know so that someone else can take over those duties. If you can't or don't respond, I'll have to assume you're no longer able to, and see about getting another maintainer. Thank you, Mike _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Floating and Data.Fixed

libraries list - Wed, 04/15/2015 - 1:43am
Hello libraries list, (Warning: this whole message may be a waste of time, you may wish to skip it.) I'd like to inquire about the possibility of a Floating instance for Data.Fixed. (Unfortunately, not knowing of the existence of this list or the appropriate procedure, I created a trac ticket to ask about this, because that was the only forum I knew of. It's Sorry.) The original idea was along these lines: lift :: (HasResolution a) => (Double -> Double) -> Fixed a -> Fixed a lift f = realToFrac . f . realToFrac instance (HasResolution a) => Floating (Fixed a) where pi = realToFrac pi sin = lift sin -- etc, similar lift2 function for (**), logBase This allows the use of transcendental functions on Fixed values. Conceptually, transcendental functions on fixed point values aren't problematic, and are actually pretty widely used in certain gaming/simulation/signal processing applications. I've since learned that this may not be a good idea. A commenter
Categories: Offsite Discussion

Proposal: Add exception info

libraries list - Tue, 04/14/2015 - 7:38pm
Control.Exception currently lacks a good way to supply extra information along with exceptions. For example, exceptions could be thrown along with their callstack[1] or implicit stack[2], but we have no generic way to include this information with exceptions. Proposed Solution ================= The proposed solution is to add a list of `SomeExceptionInfo` to the `SomeException` datatype. This list stores additional information about the exception. These `ExceptionInfo` instances use a mechanism which is pretty much identical to the dynamic way the `Exception` type works: data SomeException = forall e . Exception e => SomeExceptionWithInfo e [SomeExceptionInfo] data SomeExceptionInfo = forall a . ExceptionInfo a => SomeExceptionInfo a class Typeable a => ExceptionInfo a where displayExceptionInfo :: a -> String addExceptionInfo :: (ExceptionInfo a, Exception e) => a -> e -> SomeException addExceptionInfo x (toException -> SomeExceptionWithIn
Categories: Offsite Discussion

Bed & Breakfast maintainer?

libraries list - Tue, 04/14/2015 - 6:05pm
Anyone out there maintaining (or willing to take over) the bed-and-breakfast package? 0.4.3 (the latest release) doesn't compile with 7.8 because of the changes to Typeable. The git repo has fixes for this in it, along with some other stuff, but that's nearly a year old, and hasn't been released yet. My requests to the author & maintainer (Julian Fleischer < julian.fleischer< at >>) have gone unanswered. _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion


glasgow-user - Sat, 04/11/2015 - 5:44pm
What’s the story with this? I tried to follow the instructions here: <> but I get Dominic Steinitz dominic< at > _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >
Categories: Offsite Discussion

New gtk2hs 0.12.4 release

gtk2hs - Wed, 11/21/2012 - 12:56pm

Thanks to John Lato and Duncan Coutts for the latest bugfix release! The latest packages should be buildable on GHC 7.6, and the cairo package should behave a bit nicer in ghci on Windows. Thanks to all!


Categories: Incoming News