News aggregator

ANNOUNCE: Frown, Ralf Hinze's LALR(k) parser generator for Haskell, now slightly upkept ☺

haskell-cafe - Sun, 03/13/2016 - 8:05pm
Some years ago, Ralf Hinze wrote this parser generator [0], and i have since been using it, so i cleaned it up and uploaded it to Hackage as "frown" [1]. My repo is here: https://github.com/strake/frown [0] http://www.cs.ox.ac.uk/ralf.hinze/frown/ [1] https://hackage.haskell.org/package/frown
Categories: Offsite Discussion

Module name to package name index

haskell-cafe - Sun, 03/13/2016 - 1:10pm
Is there something available which can answer questions like this - what all packages on Hackage export "Data.List" module? Another useful question could be - what all packages export symbol named 'x'? Hackage search or hoogle are not helpful in providing a precise answer to these. I am assuming that related functionality usually lands up in the same part of the module namespace. This fact can help us in discovering related or alternative packages or functions available in a given area. For example when I am looking for list related functions I can search for who all exports "Data.List". I guess creating such an index should not be difficult. All the necessary information is available in the packages' .cabal files, we just need to extract it and create a module name to package name index. -harendra _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Can't get any memory profile data

haskell-cafe - Sat, 03/12/2016 - 6:54am
Here is the command line log of my attempt following real world haskell's memory profiling example: src λ stack exec -- ghc --version The Glorious Glasgow Haskell Compilation System, version 7.10.3 src λ cat Main.hs module Main where main :: IO () main = do let x = {-# SCC sum #-}sum [1..500] print x {-# SCC helloworld #-} putStrLn "hello world" src λ stack exec -- ghc -O2 --make Main.hs -prof -auto-all -caf-all -fforce-recomp [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... src λ ./Main +RTS -hc -p 125250 hello world src λ cat Main.hp JOB "Main +RTS -hc -p" DATE "Fri Mar 11 22:51 2016" SAMPLE_UNIT "seconds" VALUE_UNIT "bytes" BEGIN_SAMPLE 0.00 END_SAMPLE 0.00 BEGIN_SAMPLE 0.00 END_SAMPLE 0.00 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

CFP SBLP 2016: 20th Brazilian Symposium on ProgrammingLanguages

General haskell list - Fri, 03/11/2016 - 11:34pm
[Apologies if you receive multiple copies of this CFP] ======================================================= 20th Brazilian Symposium on Programming Languages http://cbsoft.org/sblp2016/call-for-papers The Brazilian Symposium on Programming Languages is a well-established symposium which provides a venue for researchers and practitioners interested in the fundamental principles and innovations in the design and implementation of programming languages and systems. SBLP 2016 will be held in Maringá, in the Southern region of Brazil, and will be the 20th edition of the symposium. IMPORTANT DATES Abstract submission: April 8th 2016 Paper submission: April 15th 2016 Author notification: May 27th 2016 Camera ready deadline: June 10th 2016 Authors are invited to submit original research on any relevant topic which can be either in the form of regular or short papers. TOPICS Topics of interest include, but are not limited to: - Program generation and transformation, including domain-specific languag
Categories: Incoming News

MPTC vs. constructor class

haskell-cafe - Fri, 03/11/2016 - 8:13pm
I've been messing around with type-aligned sequences for a while, and I'm currently exploring the design space of classes for them. The type-aligned package uses this: class TASequence s where tempty :: s c x x Source tsingleton :: c x y -> s c x y
Categories: Offsite Discussion

Prelude.head: empty list

haskell-cafe - Fri, 03/11/2016 - 5:56pm
In a rather large program I made some changes, and now I get the runtime error: ampersand.exe: Prelude.head: empty list Of course I know that head is partial, and should be used with care. It is used many times (we have 100+ modules in the program). Is there an elegant way to get some information about where the specific call to head is being made? Thanks! _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Alternative Proxy

libraries list - Thu, 03/10/2016 - 12:49am
This is the only possible definition...so it should exist instance Alternative Proxy where empty = Proxy _ <|> _ Proxy _______________________________________________ Libraries mailing list Libraries< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Categories: Offsite Discussion

Implement traverseMaybe in Data.Map, Data.IntMap, etc

libraries list - Tue, 03/08/2016 - 10:43am
As far as I know, the most general form of a function that allows traversing and filtering is: type Filter s t a b = foall f. Applicative f => (a -> f (Maybe b)) -> s -> f t In my witherable[0] package, I defined `Witherable` as a subclass of `Traversable` to provide such operation for various containers. class T.Traversable t => Witherable t where wither :: Applicative f => (a -> f (Maybe b)) -> t a -> f (t b) ... However, the `wither` for `Map` is currently inefficient because it is defined in terms of `traverse` and `mapMaybe`, so it traverses the container twice. Efficient implementation.would have to use the hidden constructors. I would like to propose adding `traverseMaybe` and `traverseMaybeWithKey` for `Data.Map`, `Data.IntMap`, and their strict variants (I'm suggesting more conservative name because wither might sound too unusual or poetic for a standard library. I like 'wither' though). A possible implementation would be like this: traverseMaybeWithKey :: Applicative f => (k -> a ->
Categories: Offsite Discussion

Add `take`/`drop`/`splitAt` to `Data.Map`/`Data.Set`

libraries list - Tue, 03/08/2016 - 2:14am
I would like to propose adding `take`/`drop`/`splitAt` to both `Data.Map` and `Data.Set` as originally requested in: https://github.com/haskell/containers/issues/135 <https://github.com/haskell/containers/issues/135> The motivation behind this proposal is three-fold: * for convenience - these functions are commonly used to implement pagination or previews of maps/sets * for type accuracy - the public API impose an unnecessary `Ord` constraint * for efficiency - these can be implemented more efficiently using the internal API Currently the only way you can implement this functionality via the public API is to use `lookupIndex`/`elemAt` + `split`. For example, one way to implement `Data.Set.take` is: take :: Ord a => Int -> Set a -> Set a take n m | n < 0 = empty | size m <= n = m | otherwise = lt where (lt, _) = split k m k = elemAt n m {-# INLINE take #-} This implementation incurs an unnecessary `Ord` constraint due to a roundabout way of computing `take`: this ext
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