News aggregator

SmallCheck Depth

haskell-cafe - Thu, 02/05/2015 - 3:23am
The original SmallCheck paper [0] gives a type data Name = P | Q | R and states that all values of type Name have depth 0. To me this suggests that all values of type Bool would have depth 0 as well, seeing as Bool would simply be data Bool = True | False Sure enough, if I load up ghci with SmallCheck 0.2.1, I get [True, False] But in QuickCheck 1.1.1 I get [] Very puzzling to me is that it seems the definition of series for Bool has not changed in the new version. Both versions have something like series = cons0 True \/ cons0 False So what explains the different behavior? Thanks. --Omari [0] http://www.cs.york.ac.uk/fp/smallcheck/smallcheck.pdf
Categories: Offsite Discussion

learn you a good haskell exercises

haskell-cafe - Wed, 02/04/2015 - 11:07pm
Hello, If I want to look if I understand the contents of the book , are these good exercises : https://github.com/noelmarkham/learn-you-a-haskell-exercises Roelof
Categories: Offsite Discussion

Haskell opportunities at Facebook

haskell-cafe - Wed, 02/04/2015 - 9:57pm
Hi, friends – I have a number of very interesting openings at Facebook HQ in Menlo Park, California. There are two different teams hiring. The first set of positions are for an entirely new team. This project involves distributed systems, data mining, and machine learning. There may be roles on this team for less experienced candidates in a few months, but right now we are looking for people who have written a reasonable amount of Haskell, have built real production systems in some language or other (and have the scars to prove it), and can contribute in major ways to the design and construction of a demanding new system that we're building from scratch. The second set of positions are for a cousin team, which is building on the success of our Haxl project to extend our capability to fight spam and malware. For these roles, we're open to a broader range of experience levels. If you're interested, please drop me an email with a current CV. Cheers, Bryan. _______________________________________________
Categories: Offsite Discussion

Prisms and [Monad]Errors

Haskell on Reddit - Wed, 02/04/2015 - 9:09pm

In the same way that you can use classy lenses to avoid committing to a concrete state monad, you can use classy prisms to avoid committing to a concrete error monad.

There's a fair bit of prior art that demonstrate the use of classy lenses. A browse through Quine will uncover some examples, and there have been discussions here in the past about the technique.

However, there's much less material about classy prisms, and I only realised they could be assembled this way last night, so I've encoded what I've learnt in this gist:

https://gist.github.com/nkpart/c3bcb48c97c5ded6e277

submitted by nkpart
[link] [4 comments]
Categories: Incoming News

Proposal: Add mapWithIndex to Data.List

libraries list - Sun, 02/01/2015 - 3:21am
Vectors offer `imap` and sequences offer `mapWithIndex`. I think lists deserve to have something like this too. The obvious implementation, using `zipWith`, is unlikely to be the most efficient (because foldr/build fusion doesn't handle zips so wonderfully). To a first approximation: mapWithIndex :: (Int -> a -> b) -> [a] -> [b] mapWithIndex f xs = build $ \c n -> let go x cont !i = f i x `c` cont (i+1) in foldr go (`seq` n) 0
Categories: Offsite Discussion

Upcoming GHC version (was: Re: Drastic Prelude changes imminent)

libraries list - Wed, 01/28/2015 - 1:16am
If BBP is going to be released as-is, can we please call the next release GHC 8.0? Good stuff: http://semver.org/ Thanks, Greg On Tue, Jan 27, 2015 at 10:22 AM, David Luposchainsky <dluposchainsky< at >googlemail.com> wrote:
Categories: Offsite Discussion

Drastic Prelude changes imminent

libraries list - Tue, 01/27/2015 - 12:32pm
The next version (7.10) of GHC is slated to have a drastically changed Prelude. This message is very late in the release process, but I would urge caution before changing. The changes are (aptly) named the Burning Bridges Proposal (BBP). Even though the work has been going on for a while, it seems that this change is coming as a surprise to many people (including Simon Peyton Jones). In summary, it generalizes many list operation, e.g., foldr, to be overloaded. There is much to welcome in BBP, but changing the Prelude cannot be done lightly since it really is like changing the language. So I think it's really important for a large number of people to be able to try out such changes before they come into effect, and to have time to let the changes stabilize (you rarely get it right the first time). I've discussed this with a number of people, including Simon PJ, and we have concrete proposals. Proposal 1: * Add a new pragma {-# LANGUAGE Prelude=AlternativePrelude #-} * This is a new fe
Categories: Offsite Discussion

Problem using Text.Regex on OS X.

libraries list - Mon, 01/26/2015 - 1:29am
Hi, I'm new to Haskell so I'm not sure how to solve this issue, yet. I was directed to this list from the IRC channel. Here's the issue: Using GHCi on OS X: Prelude Data.Text> :m Text.Regex Prelude Text.Regex> let r = mkRegex "_" ... eliding successful "Loading package ..." lines ... Loading package regex-compat-0.95.1 ... can't load .so/.DLL for: /Library/Haskell/ghc-7.8.3-x86_64/lib/regex-compat-0.95.1/libHSregex-compat-0.95.1-ghc7.8.3.dylib (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/regex-compat-0.95.1/libHSregex-compat-0.95.1-ghc7.8.3.dylib, 9): Library not loaded: < at >rpath/libHSmtl-2.1.3.1-ghc7.8.3.dylib Referenced from: /Library/Haskell/ghc-7.8.3-x86_64/lib/regex-compat-0.95.1/libHSregex-compat-0.95.1-ghc7.8.3.dylib Reason: image not found) After running otool over the regex-compat dylib I can see lines like: ... Load command 24 cmd LC_RPATH cmdsize 80 path /Users/mark/Projects/hp/build/package/mtl-2.1.3.1/build/dist/build (offset 12) ... Which is not a path that is
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