News aggregator

problems understanding craft exercises

Haskell on Reddit - Mon, 10/05/2015 - 10:16am


I try to learn haskell by reading and doing the exercises of the craft 3 edition book.

But am I the only one who trouble understanding what it's expected from the exercises. Sometimes I reading and asking a whole afternoon for help so I can understand what the exercise exaclty is.

and is there a way to overcome this problem

submitted by rwobben
[link] [7 comments]
Categories: Incoming News

haskell-papers-ereader: (most) ICFP 2015 papers added

Haskell on Reddit - Mon, 10/05/2015 - 9:18am

Now, not even environmental friendliness is an excuse to not be on top of the most recent functional research developments!

Repository is over at

I've also added most papers in Oliver Charles' repository a few weeks ago.

NOTE: If you'd like a paper added, please report an issue :)

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

CFP: Special issue of JFP on dependently typed programming

General haskell list - Mon, 10/05/2015 - 8:54am
----------------------------------------------------------------------------- CALL FOR PAPERS JFP Special Issue on Dependently typed Programming Submission Deadline: January 11th, 2016 Expected Publication Date: Late 2016 ----------------------------------------------------------------------------- # Scope Over the last years there has been sustained interest in functional programming languages with dependent types. The foundations of dependently typed programming can be traced back to work by Martin-Löf from the 1970s. More recently, the increased popularity of systems such as Agda, Coq, Idris, and many others, reflects the growing momentum in this research area. The Journal of Functional Programming will devote a special issue to programming with dependent types. The purpose of this special issue is to present the state of the art in dependently typed programming l
Categories: Incoming News

[ANN] PETSc Haskell bindings

haskell-cafe - Mon, 10/05/2015 - 6:50am
Dear all, development of the Haskell bindings for the PETSc scientific computation library is now public; the repository can be found at The interface is still very much experimental and in a state of flow but a number of basic functions are working. I look forward to all feedback; Kind regards, Marco Zocca
Categories: Offsite Discussion

[ANN] PETSc Haskell bindings

Haskell on Reddit - Sun, 10/04/2015 - 11:52pm

Dear all,

development of the Haskell bindings for the PETSc scientific computation library is now public; the repository can be found at

The interface is still very much experimental and in a state of flow but a number of basic functions are working (specifically, Vec, Mat and linear solver facilities, i.e. KSP) and thanks to the modular architecture of the library more can be added fairly quickly. There are stubs in place for mesh management (IS, DM and DMDA) the nonlinear solvers sub-set (SNES), the time integrators (TS) and the nonlinear optimization (TAO) stuff.

I look forward to all feedback; Kind regards,


Edit: I've improved the project structure and added a developers' guide in doc/dev/, so that newcomers aren't scared away immediately ;)

submitted by ocramz
[link] [9 comments]
Categories: Incoming News

Is there a need to precompute sin and cos values anymore?

Haskell on Reddit - Sun, 10/04/2015 - 9:27pm

I have some code that precomputes the values of sin and cos for a table of data because I use these values numerous times.

Modern processors have instructions like Intel's FSINCOS nowadays. Does GHC make use of this? If so, is there much benefit to precomputing these values anymore?

submitted by stasiana
[link] [9 comments]
Categories: Incoming News

ANN: HaRe 0.8 - The Haskell Refactorer

haskell-cafe - Sun, 10/04/2015 - 9:18pm
I'm pleased to announce the release of HaRe 0.8, available on hackage [1] What's new? =========== Everything, and nothing. Everything in the sense that it has been completely reworked internally to make use of the new API Annotations [2] in GHC 7.10.2, via the ghc-exactprint [3] library. Nothing in the sense that the functionality in this version is/should be identical to that in Limitations =========== HaRe 0.8 will only work for projects using GHC 7.10.2 for compilation. Compiling HaRe with 7.10.2 and then using it against projects using an earlier compiler will not work, as HaRe needs to be able to invoke GHC to the type checker stage on the project using GHC 7.10.2. What is it? =========== HaRe makes changes to working code, so that it still works once the change is made. Refactorings it can do are * demote Take a declaration from the level where it is defined and move it down to the place where it is used. This only works if it is used in one place only. * dupdef Duplicate a d
Categories: Offsite Discussion

Making whitespace HASKELLFUNC

Haskell on Reddit - Sun, 10/04/2015 - 6:27pm

So I need a method that takes a string and makes spaces between words and symbols. So using this method : F "(free +(hi) dance)" gives "( free +( hi ) dance )"

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

Is there any ide or plugin for haskell that does typechecking?

Haskell on Reddit - Sun, 10/04/2015 - 4:47pm

I've programmed in swift with the xcode editor, and I really like the immediate feedback you get when you have a type error. Is there anything like this for haskell?

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

updating stream-fusion for GHC-7.10

libraries list - Sun, 10/04/2015 - 3:03pm
Attached is a patch to the stream-fusion package that makes it compileable by GHC-7.10. Unfortunately the authors did not reply to my patch request. How can I get the patch into the package?_______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Optimizing Closures in O(0) time

Lambda the Ultimate - Sun, 10/04/2015 - 11:46am

Optimizing Closures in O(0) time, by Andrew W. Keep, Alex Hearn, R. Kent Dybvig:

The flat-closure model for the representation of first-class procedures is simple, safe-for-space, and efficient, allowing the values or locations of free variables to be accessed with a single memory indirect. It is a straightforward model for programmers to understand, allowing programmers to predict the worst-case behavior of their programs. This paper presents a set of optimizations that improve upon the flat-closure model along with an algorithm that implements them, and it shows that the optimizations together eliminate over 50% of run-time closure-creation and free-variable access overhead in practice, with insignificant compile-time overhead. The optimizations never add overhead and remain safe-for-space, thus preserving the benefits of the flat-closure model.

Looks like a nice and simple set of optimizations for probably the most widely deployed closure representation.

Categories: Offsite Discussion

Haskell f::String -> [String] method

Haskell on Reddit - Sun, 10/04/2015 - 11:28am

So I have this funksjon f::String -> [String], that returns a list of the gr-tokenz frå inputstring. So for example,

f"+ (1, 12);" gives ["+", "(", "1", "12", ")", ";"] f"trall (2);" gives ["trall", "(","2", ")", ";"] So I have tried much, but cant find make something working. I have tried going recursive true the list adding whitespaces and than use the "words" method on that. I didnt manage to write it in haskell code. Please, need some help here

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

Renderable types

Haskell on Reddit - Sun, 10/04/2015 - 10:12am
Categories: Incoming News

Totality Checker?

Haskell on Reddit - Sun, 10/04/2015 - 10:08am

watching "Future Of Haskell: Dependent Types" (, we see type level addition:

(++) :: Vector a n -> Vector a m -> Vector a (n '+ m)

where '+ is value level addition, promoted.

  1. what are the restrictions on which functions can be promoted, and is termination one of them?

    or maybe we accept non-terminating compilations, like when enabling -XUndecidableInstances.

  2. relatedly, are there any plans for any sort of totality checker in Haskell? for example, it would be nice to verify that the parser for some quasi-quoter that we run at build time does indeed terminate.

submitted by spirosboosalis
[link] [15 comments]
Categories: Incoming News

Approach to generalising Functor,is it worth pursuing?

haskell-cafe - Sun, 10/04/2015 - 8:15am
I've been thinking about generalising Functor, as I had something which was "Functor like" but didn't seem to fit into the existing definition. The example I'll present isn't the problem I was trying to solve, but it probably illustrates the solution better. The questions I have is: 1. Is this useful? 2. Has this been done? If the answers are Yes and No, I'll continue on into making this into a package. Anyway, here's what I've done: As we know, the type signature of fmap is the following: fmap :: Functor f => (a -> b) -> (f a -> f b) I've put brackets around the last two arguments to show that fmap can be also seen as a function which takes a function and returns a new function, in a different "space", for want of a better word. fmap should also follow this rule: fmap (f . g) == (fmap f . fmap g) So we can map an ordinary function into the "Maybe" space, but in a way that composing functions in the putting them in the space is the same as putting them in the space then composing them. I thought it
Categories: Offsite Discussion

Simple SQL Library (SQLite, MySQL, Postgre)?

Haskell on Reddit - Sun, 10/04/2015 - 7:24am

Is there any SQL library that seamlessly support SQLite and other common SQL engines like MySQL and Postgre while still keeping things relatively simple to use?

I just want to manually take care of my database schema, open connection (database, username, password and port), write simple SQL and receive results from the database.

Something would look like similar piece of pseudo code when used in production :

database :: DBSettings database = DBS {localhost, 200,username,password} data User = User {username::String,mail::Email} type Users = [User] main = do users <- query database "select username, mail from users" :: Users -- Now I have goddamn list of users and I can do what ever I want with them

Basically, I just want to use my SQL skills and not some DSL that works for some things and for some it doesn't, and later I'd like to easily switch from SQLite to MySQL or what ever without doing any refactoring.

I searched hoogle without any success, so I'm asking here in the ofchance that such magical library actually exists.

submitted by reygoch
[link] [14 comments]
Categories: Incoming News