# News aggregator

### problems understanding craft exercises

Hello,

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]

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

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

Repository is over at https://github.com/beerendlauwers/haskell-papers-ereader.

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 :)

[link] [3 comments]

### CFP: Special issue of JFP on dependently typed programming

### [ANN] PETSc Haskell bindings

### Distributed computing using Transient: Estimation of π, streaming and distributed datasets map-reduce - School of Haskell

### HaRe 0.8 with GHC 7.10.2 support

### [ANN] PETSc Haskell bindings

Dear all,

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

https://github.com/ocramz/petsc-hs

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,

Marco

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]

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

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]

### ANN: HaRe 0.8 - The Haskell Refactorer

### Making whitespace HASKELLFUNC

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]

### The Red Flag of Functional Programming

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

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]

### updating stream-fusion for GHC-7.10

### Optimizing Closures in O(0) time

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.

### Haskell f::String -> [String] method

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]

### Totality Checker?

watching "Future Of Haskell: Dependent Types" (https://youtu.be/W6a36RoFeNw?t=223), we see type level addition:

(++) :: Vector a n -> Vector a m -> Vector a (n '+ m)where '+ is value level addition, promoted.

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.

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.

https://ghc.haskell.org/trac/ghc/wiki/DependentHaskell

submitted by spirosboosalis[link] [15 comments]

### Approach to generalising Functor,is it worth pursuing?

### Simple SQL Library (SQLite, MySQL, Postgre)?

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 themBasically, 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]