News aggregator

Monoid instance for Either that mappends both sides

Haskell on Reddit - Wed, 04/08/2015 - 12:02pm

Does something like this exist somewhere already?

newtype EitherMonoids a b = EitherMonoids (Either a b) deriving (Show) instance (Monoid a, Monoid b) => Monoid (EitherMonoids a b) where mempty = EitherMonoids $ Right mempty (EitherMonoids (Left xs)) `mappend` (EitherMonoids (Left ys)) = EitherMonoids $ Left $ xs `mappend` ys (EitherMonoids (Right xs)) `mappend` (EitherMonoids (Right ys)) = EitherMonoids $ Right $ xs `mappend` ys x@(EitherMonoids (Left _)) `mappend` (EitherMonoids (Right _)) = x (EitherMonoids (Right _)) `mappend` x@(EitherMonoids (Left _)) = x submitted by singpolyma
[link] [11 comments]
Categories: Incoming News


General haskell list - Tue, 04/07/2015 - 6:08pm
[apologies for any cross-posting] *** SUBMISSIONS ARE NOW OPEN *** Call for Papers --------------------------------------------------------------------------- 13th International Conference on Logic Programming and Non-monotonic Reasoning LPNMR 2015 Lexington, KY, USA September 27-30, 2015 (Collocated with the 4th Conference on Algorithmic Decision Theory 2015) --------------------------------------------------------------------------- AIMS AND SCOPE LPNMR 2015 is the thirteenth in the series of international meetings on logic programming and non-monotonic reasoning. LPNMR is a forum for exchanging ideas on declarative logic programming, non-monotonic reasoning, and knowledge representation. The aim of the conference is to facilitate interactions between researchers and practition
Categories: Incoming News

[EPIT2015] Call for participation to a Spring School about the Coq proof assistant

General haskell list - Tue, 04/07/2015 - 2:56pm
*** Call for participation, please distribute. *** EPIT'2015 ( Spring School in Theoretical Computer Science Mechanizing Proofs of Programs in Coq May 25 to May 29, 2015, Frejus, France * Presentation The french spring school in theoretical computer science (EPIT) is a recurrent school which was created 40 years ago by Maurice Nivat. This year, the school is about the mechanization of proofs of programs using the proof assistant Coq. As no prerequisite is needed, the school targets any computer scientist that is curious about what a proof assistant is and how it can be integrated in its daily research work. * Program The school will take place between May 24 and May 29 and it will be divided into eight sessions. A session will consist in a (rather short) lecture (given in english) followed by practical exercises on computer. The five first sessions will be dedicated to a presentation of the main concepts and techniques
Categories: Incoming News

[ Google Summer of Code] Call for Mentors

General haskell list - Tue, 04/07/2015 - 1:58am
We have had a rather large pool of potential students apply for this year's Google Summer of Code, but, ultimately, Google won't let us ask for a slot unless we have a potential mentor assigned in advance. On top of that, one thing we try to do with each project is wherever possible, assign both a primary and a backup mentor, so the available mentoring pool is drawn a little thin. Many hands make for light work, though: If you've mentored or thought about mentoring in years past, I'd encourage you to sign up on google-melange for the Google Summer of Code at: and request a connection to as a Mentor. Once you've done this you can help us vote on proposals, and should something seem appropriate to you, you can flag yourself as available as a potential mentor or backup mentor for one (or more) of the projects. We have a couple of weeks left to rate proposals and request slots, but it'd be good to make as much progress as we can this w
Categories: Incoming News

skip hpc during build

glasgow-user - Mon, 04/06/2015 - 3:35pm
I'm deleting hpc after building ghc for a vm to save space. Is there an easy way to skip building it in the first place? -- View this message in context: Sent from the Haskell - Glasgow-haskell-users mailing list archive at
Categories: Offsite Discussion

runghc and GhcWithInterpreter

glasgow-user - Mon, 04/06/2015 - 3:34pm
I've built GHC with GhcWithInterpreter = NO. runghc is built and installed, but errors out with "not built for interactive use". Is runghc supposed to work with such a build? If not, why is it built at all? -- View this message in context: Sent from the Haskell - Glasgow-haskell-users mailing list archive at
Categories: Offsite Discussion

Proposal for a generic showIntAtBase

libraries list - Sun, 04/05/2015 - 5:46pm
Hi, The current implementation of showIntAtBase in Numeric is limited to Chars currently. *showIntAtBase* * :: (Integral a, Show a) => a -> (Int -> Char) -> a -> ShowS* The 2 reasons for this constraint is: a) We only accept functions of the form (Int -> Char) b) An implicit concatenation using (:) I'd like to propose a new function showIntAtBaseGeneric that removes the (Int -> Char) function constraint and takes an additional function to replace the implicit (:) operator. *showIntAtBaseGeneric* * :: (Integral a1, Num b, Show a1) =>* * a1 -> (b -> a) -> (a -> s -> s) -> a1 -> s -> s* Now showIntAtBase may be implemented as: *showIntAtBase :: (Integral a, Show a) => a -> (Int -> Char) -> a -> ShowS* *showIntAtBase base toChr n0 r0 = showIntAtBaseGeneric base toChr (:) n0 r0* The API and behavior of showIntAtBase remains unchanged while allowing for generic conversions not limited to Chars alone. *Example: * *λ> showIntAtBaseGeneric 26 id (:) 500 [] -- convert 500 to base26 and provid
Categories: Offsite Discussion

A Random Strawman

libraries list - Sat, 04/04/2015 - 6:57pm
Hello All, Having skimmed the literature, run some tests and benchmarks: The current System.Random is broken: Furthermore, this is recorded in at least two published papers: and The tf-random package does not have this breakage and is based on good theoretical foundations. In my tests tf-random performs better than System.Random. As a result of which, I am very much inclined to suggest we replace the code in System.Random with tf-random. Before doing any more work on this, I’d like to understand what the next steps should be. How much review should be carried out? I have no reason to doubt the implementors have done a great job but should someone (who?) review the code more formally. If so what would the process / tools be? Tests in packages / applications may now fail as the (pseudo) random numbers will be different w
Categories: Offsite Discussion

immortal profiling

glasgow-user - Fri, 04/03/2015 - 6:05am Would be really useful to be able to profile code without dying, especially in the context of a long-lived server. Am I missing something that would allow me to do this? cheers mark _______________________________________________ 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