News aggregator

Any Haskell folks in New Orleans?

Haskell on Reddit - Tue, 03/17/2015 - 9:20am

My family and I might be moving down there and I wanted to learn a little more about the FP scene. If you hang out here and live in NOLA, I'd love to hear your thoughts about the FP community there. How big is it? Is it mostly hobbyists dipping their toes in the water, or are there a lot of people doing FP professionally? How is the overall local tech community?

Feel free to send me a direct message if you prefer.

I know there is a local FP meetup group, and I got in touch with the organizers.

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

In the Curry-Howard isomorphism mapping logical implication to function types, how is it that False -> True is inhabited, but True -> False uninhabited?

Haskell on Reddit - Tue, 03/17/2015 - 9:17am

Here's my understanding:

In classical logic, we define logical implication such that False -> P is true regardless of what proposition P is (even if P is false), and we define P -> False to be true if and only if P is false; P -> False is false if P is true.

Therefore, in intuitionistic logic, we say that False -> P is inhabited for all P, and P -> False is only inhabited if P is uninhabited, and vice versa.

Therefore, according to the the Curry-Howard isomorphism, there exists some function with the type Bottom -> P regardless of what type P is. There also exists some function of type Bottom -> Bottom. However, there does not exist any function of type P -> Bottom, unless P is the Bottom type.

And yet I can think of how to implement a function of type P -> Bottom (I believe in Haskell, it'd be something like const undefined; in imperative languages, you could just enter an infinite loop or throw an exception or something), but I can't see how to implement a function of type Bottom -> P without knowing P ahead of time.

How do I reconcile this?

submitted by Nebu
[link] [33 comments]
Categories: Incoming News

Qualified names in TH?

glasgow-user - Tue, 03/17/2015 - 3:54am
I'm trying to write some Template Haskell code that (among other things) manipulates IntSets. So, for example, I'd like a splice to generate a call to Data.IntSet.fromList. However, I'm not sure how IntSet will be imported in the target module. Is there a way to resolve the fully qualified name (or similar) to a TH Name, without having to know how it's imported in the splicing module? (The obvious approach---mkName "Data.IntSet.fromList"---seems not to work in GHC 7.8.) Thanks! /g
Categories: Offsite Discussion

Easy "low-hanging fruit"-ish projects for a newb to work on?

Haskell on Reddit - Tue, 03/17/2015 - 1:16am

In this thread, someone is told that an INI parser doesn't exist on Hackage yet,

Really? There's that low level hanging fruit available? I've never contributed to Haskell open source because I see such intimidating things on a regular basis that I just assumed that most trivial things were done a long time ago.

but later is told that it does.

However, this comment

OTOH, It's low-hanging fruit that a clever guy like you could just write and contribute. (How else did the other systems evolve....?)

got me thinking. (Not a "clever guy" by any stretch of the imagination, btw.)

Instead of jumping head-first into my Vim clone, is there any similar thing that a newbie like me could try to do? Let's get a small list going, so that everyone who'd like a project has something easy to chew on. It doesn't have to be something unsolved as such, though: anything that you think would make for a cool weekend project for someone with basic Haskell knowledge would be nice.

This is a good example of what I'm looking for. (tl;dr - it's the asm monad thing)

Edit: Whoa, I've just finished LYAH. Easy.

submitted by octatoan
[link] [16 comments]
Categories: Incoming News

[PATCH] generalize filterM, mapAndUnzipM, zipWithM, zipWithM_, replicateM, replicateM_

glasgow-user - Tue, 03/17/2015 - 12:29am
--- libraries/base/Control/Monad.hs | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/libraries/base/Control/Monad.hs b/libraries/base/Control/Monad.hs index 6fa4a07..02eabd1 100644 --- a/libraries/base/Control/Monad.hs +++ b/libraries/base/Control/Monad.hs < at >< at > -75,9 +75,9 < at >< at > module Control.Monad , (<$!>) ) where -import Data.Foldable ( Foldable, sequence_, msum, mapM_, foldlM, forM_ ) -import Data.Functor ( void ) -import Data.Traversable ( forM, mapM, sequence ) +import Data.Functor ( void, (<$>) ) +import Data.Foldable ( Foldable, sequence_, sequenceA_, msum, mapM_, foldlM, forM_ ) +import Data.Traversable ( forM, mapM, traverse, sequence, sequenceA ) import GHC.Base hiding ( mapM, sequence ) import GHC.List ( zipWith, unzip, replicate ) < at >< at > -94,13 +94,8 < at >< at > guard False = empty -- | This generalizes the list-based 'filter' function. {-# INLINE filterM #-} -filterM :: (Monad m) => (a -> m Bool) -> [a] -> m [a] -filter
Categories: Offsite Discussion

Johan Tibell: Google Summer of Code 2015 Project Ideas

Planet Haskell - Mon, 03/16/2015 - 11:45pm

Every year I try to list some Google Summer of Code projects that I think are worthwhile. Here's this year's list. The focus is, as usual, on infrastructure projects. I think they are the most likely to succeed and give the community the highest long-term value.

Generalize cabal to work with collections of packages instead of having a single package focus

Today most cabal commands assume that there's a "current" package that's the focus of most operations. As code bases grow users will end up with multiple-package projects and thus a need to build/test subsets of those packages together. We should generalize most commands (e.g. build, test, bench, and repl) to take a list of targets. You can already today specify local targets (i.e. only run these N test suites in my .cabal file). We'd extend the syntax to allow for

cabal test [[PACKAGE DIR]:[SECTION]]...


cabal test my-pkg1-dir:test1 my-pkg1-dir:test2 my-pkg2-dir

Implementation wise this means that the working dir (i.e. dist/ today) needs to be able to live outside the some "current" package's dir. It would live in the project "root" (e.g. some director that contains all the packages that are checked out in source form.)

We should also make it more convenient to create these collections of packages. Today you can get half way there by creating a sandbox and manually add-source all your packages. That doesn't scale well to 100-1000s of packages. We should have more clever defaults (e.g. scan subdirs for .cabal files and consider them part of the package set.)

Cabal PVP compliance checker

A Cabal sub-command that given two package versions tells you which version number component that needs to be bumped (according to the PVP) and why. See for example the Elm solution to this problem.

Have GHC track the different library "ways" it has installed

Today GHC doesn't know if it has installed e.g. both the vanilla and profiling versions of a library. This leads to annoying error messages and an unpleasant experience when users want to profile something. If GHC tracked which versions of a library it had installed cabal could easily and automatically installed the missing profiling versions.

There's some more info on the GHC Trac: 1, 2.

Strict Haskell language pragma

This is a project for a student with some background in compilers, perhaps even with some experience working on GHC.

As an experiment in language design I'd like to add two language pragmas to GHC, Strict and StrictData, the latter being a subset of the former. These pragmas would give better control over the strictness of code, on a per-module basis. The design is quite well fleshed out on the wiki. There's also the beginings of an implementation of StrictData available.

Categories: Offsite Blogs

zipWithA, zipWithA_, mapAndUnzipA, filterA, replicateA, replicateA_

libraries list - Mon, 03/16/2015 - 8:07pm
Analogs of monadic functions, which likely ought to be in base as part of AMP. I send no patch yet, for I not know which way to do the Data.Traversable <-> Control.Applicative cyclic import.
Categories: Offsite Discussion

Whole program analysis as a GHC plugin

haskell-cafe - Mon, 03/16/2015 - 6:34pm
Hello cafe, I'm currently implementing a whole-program analysis for Haskell programs using the GHC api. I have a GHC plugin written and I'm successfully slurping in programs and processing them with my analysis tools. I'm getting stuck when my tool encounters an identifier that lives in another module. I'd like to unfold the identifier and retrieve its source code, allowing me to do whole-program analysis. Assuming I have the source code of the whole program, and that I get to (re)compile everything with my plugin enabled, I'm wondering: 1) Does the GHC api already support a nice way of doing this? 2) I see that there is support for unfolding identifiers if they've been specially marked in .hi files. Is there a way to mark everything to support unfolding, and would this give me the information I'm looking for? 3) Does anybody have experience with implementing a whole-program analysis for GHC as a plugin, and if so, how did you go about it? Many Thanks, David
Categories: Offsite Discussion

Haskell development role at Standard Chartered inLondon

haskell-cafe - Mon, 03/16/2015 - 5:29pm
The Strats team at Standard Chartered has an open position for a typed functional programming developer to join the team in London. This is a “front office” finance role – meaning you will work on the trading floor, directly with traders, building software to automate their work and improve their efficiency. The role is highly development focused, and you will use Haskell for almost all tasks: data analysis, market data publishing, database access, web services, desktop GUIs, large parallel tasks, quantitative models, solvers, everything. This is a fast paced role – code you write today will be deployed within hours to hundreds of users and has to work. More details are in the full posting here: _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

New Functional Programming Job Opportunities

haskell-cafe - Mon, 03/16/2015 - 5:00pm
Here are some functional programming job opportunities that were posted recently: Software Engineer at Xledger Lead front end developer at Anchor Systems Cheers, Sean Murphy
Categories: Offsite Discussion