News aggregator

Can you explain this?

Haskell on Reddit - Wed, 04/08/2015 - 8:32pm
  1. Launch ghci

  2. Enter this number https://gist.github.com/eccstartup/382579e0a4ef9133eb16 1312414124532675478362532543571329085712389578957198523598236057236457230478923749028357328974892375829037589230748923569823604327894723589072389547328957238907523895789207589230758932758903274892305692803567892037145892137580927389573289475238956729803659028375892037698023716891205237509812759807589263108972589236589237489326589325790238502156728013523809759823

  3. Enter it^2 for 9 times

I get a Bus error: 10.

I use ghcformacosx, with version 7.10.1 in Yosemite. I notice that not all really large numbers can reproduces this, but this one can cause bus error again and again, even after a restart. I admit that this number is typed randomly if you want to know how I get it. What could be the reason?

submitted by eccstartup
[link] [21 comments]
Categories: Incoming News

When is sequenceA an applicative morphism?

Haskell on Reddit - Wed, 04/08/2015 - 8:05pm

Suppose T is traversable and applicative, and F is applicative. We have the map

sequenceA :: T (F a) -> F (T a)

which I'd like to think of as a natural transformation TF -> FT. If you like we can be explicit about this by writing

sequenceC :: Compose T F a -> Compose F T a sequenceC = Compose . sequenceA . getCompose

Since F and T are applicative, Compose F T and Compose T F are as well. When is it the case that sequenceC satisfies the following equations?

sequenceC . pure = pure sequenceC (f <*> x) = sequenceC f <*> sequenceC x

I suspect the first equation always holds, so I'm more interested in the second.

The second equation often fails. For example, for T = Maybe, F = (,) String:

f :: Compose Maybe ((,) String) (a -> Bool) f = Compose $ Just ("a", \_ -> True) x :: Compose Maybe ((,) String) a x = Compose Nothing

and we have

sequenceC (f <*> x) == Compose ("", Nothing) sequenceC f <*> sequenceC x == Compose ("a", Nothing)

As another example, it holds if we take T = (,) String and F = Maybe.

submitted by seriousreddit
[link] [3 comments]
Categories: Incoming News

Haskell logo Keycaps finally up for group-buy

Haskell on Reddit - Wed, 04/08/2015 - 5:41pm

So, we did it! The Haskell Keycap group-buy is finally up! See it here: http://www.pimpmykeyboard.com/deals/haskell-logo-keycaps/?nowforsale

Note that you'll initially be charged the 'full' amount, though you'll be refunded if we get more than 50, 75, 100, or 250 keys!

There is also a sub-deal for 1x (normal size), whereas the main deal is for a 1.25x (OS key).

submitted by NFATracker
[link] [5 comments]
Categories: Incoming News

Last CFP Bx'15: 4th International Workshop onBidirectional Transformations

General haskell list - Wed, 04/08/2015 - 5:06pm
LAST CALL FOR PAPERS Fourth International Workshop on Bidirectional Transformations (Bx 2015) L'Aquila, Italy (co-located with STAF, July 24, 2015) http://bx-community.wikidot.com/bx2015:home Bidirectional transformations (Bx) are a mechanism for maintaining the consistency of at least two related sources of information. Such sources can be relational databases, software models and code, or any other document following standard or ad-hoc formats. Bx are an emerging topic in a wide range of research areas, with prominent presence at top conferences in several different fields (namely databases, programming languages, software engineering, and graph transformation), but with results in one field often getting limited exposure in the others. Bx 2015 is a dedicated venue for Bx in all relevant fields, and is part of a workshop series that was created in order to promote cross-disciplinary research and awareness in the area. A
Categories: Incoming News

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

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: http://haskell.1045720.n5.nabble.com/skip-hpc-during-build-tp5768327.html Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com.
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: http://haskell.1045720.n5.nabble.com/runghc-and-GhcWithInterpreter-tp5768326.html Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com.
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: https://github.com/haskell/random/issues/25#issuecomment-87423142. Furthermore, this is recorded in at least two published papers: http://dl.acm.org/citation.cfm?id=2660195 and http://publications.lib.chalmers.se/records/fulltext/183348/local_183348.pdf. 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
https://ghc.haskell.org/trac/ghc/ticket/10235#ticket 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 >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
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!

~d

Categories: Incoming News