News aggregator

[ANN] Haskell FFI Tutorial

haskell-cafe - Sat, 11/08/2014 - 5:54pm
Hi Everyone, I've recently started working on Haskell FFI Tutorial [1]. The repository already  contains code that explains how to:   * (expressively) represent C `struct` in Haskell code   * call C code from Haskell   * call Haskell code from C   * operate on nested `struct`s    * operate on `struct` arrays   * decode `unions`    * read and write C fixed-length strings and Pointer-type Strings   * how to import functions from, for example, stdlib I'm still working on more story-like writeups, but the first one (about how to call Haskell  from C) is already available [2]. If you have any feedback / comments / questions, know how to improve it or  would like to see more things covered, just ping me.  Thanks [1] https://github.com/ifesdjeen/haskell-ffi-tutorial [2] https://github.com/ifesdjeen/haskell-ffi-tutorial#calling-haskell-from-c --  Alex https://twitter.com/ifesdjeen http://clojurewerkz.org/_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >h
Categories: Offsite Discussion

`cabal repl` problems

haskell-cafe - Sat, 11/08/2014 - 5:39pm
Hi all, I have a Cabal project that has library, executable and several test parts. I'd like to be able to load one of the test parts into GHCi using `cabal repl`. However, I'm having some problems: (To be more specific, I have these parts in my Cabal file: - library - executable myapp - test-suite test - test-suite doctests) - `cabal repl test` tries to load test suite into GHCi but it doesn't ask me which test suite I want to load. For example, in my Cabal file I have `test-suite test` and `test-suite doctests`. `cabal test doctests` runs only doctests but I can't use similar command for repl, like `cabal repl doctests`. - `cabal repl test` tries to load the library, but using wrong set of dependencies. It uses `build-depends` field of `test-suite test` but it loads `library` sources. Note that `hs-source-dirs` field of `test-suite test` and `library` are different, and I have my library in `test-suite test` as a dependency. So the problem is that it tries to load `library` part using the source, inste
Categories: Offsite Discussion

GHC Weekly News - 2014/11/07

Haskell on Reddit - Sat, 11/08/2014 - 3:15pm
Categories: Incoming News

Question about foldl implemented as foldr: what's the type of the scan function?

Haskell on Reddit - Sat, 11/08/2014 - 11:26am

I have the following implementation of foldl using foldr:

myFoldl :: (a -> b -> a) -> a -> [b] -> a myFoldl f base xs = foldr scan id xs base where --scan :: b -> (a -> a) -> a -> a scan b g x = g (f x b)

What is the type of scan?

The above code will compile and works as expected, however, if I uncomment the type declaration for scan, then the code does not compile. I used a type hole and GHC told me that the commented out type decleration is the correct type for scan, so I guess a secondary question is why was GHC wrong when I was using the type hole?

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

hugs 98 - haskell 98 interpreter

del.icio.us/haskell - Sat, 11/08/2014 - 10:44am
Categories: Offsite Blogs

nhc98 - small haskell 98 compiler

del.icio.us/haskell - Sat, 11/08/2014 - 10:43am
Categories: Offsite Blogs

Where do the applicative laws come from?

Haskell on Reddit - Sat, 11/08/2014 - 10:36am

I'm now studying applicative funtors in haskell. As we all know, applicative functors have to obey a set of laws, namely:

[identity] pure id <*> v = v

[composition] pure (.) <*> u <*> v <*> w = u <*> (v <*> w)

[homomorphism] pure f <*> pure x = pure (f x)

[interchange] u <*> pure y = pure ($ y) <*> u

I'm wondering why these laws? Do they have their roots in category theory? What makes these laws so "good" or "special", namely, what can we gain from these laws?

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

dirkz/haskell-cis-194

del.icio.us/haskell - Sat, 11/08/2014 - 9:33am
Categories: Offsite Blogs

Typing Haskell in Haskell

del.icio.us/haskell - Sat, 11/08/2014 - 9:26am
Categories: Offsite Blogs

What happened to the Haskell Cast?

Haskell on Reddit - Sat, 11/08/2014 - 8:08am

I haven't seen an update in ages, is the podcast still being produced?

submitted by gaymenonaboat
[link] [13 comments]
Categories: Incoming News

A good book for beginners

Haskell on Reddit - Sat, 11/08/2014 - 2:06am

Hello,

I like to find a good book for a absolute beginner with some exercises so I can check if I really understand things. If I have the base knowlegde I like to join codewars.

submitted by charlie_lab
[link] [19 comments]
Categories: Incoming News

open-source project looking for novice help?

haskell-cafe - Fri, 11/07/2014 - 8:40pm
I'm teaching an introductory Haskell course this semester (http://cis.upenn.edu/~cis194/fall14/) and am about to assign students their final project. Is there anyone out there who would welcome getting some novice help on an open-source project? You certainly don't need to commit to accept their patch(es), but I know it would be a great experience for some of the students to contribute to the "real" world of Haskell, instead of just doing exercises. You can get an accurate summary of what we've covered by looking at the lecture titles at http://cis.upenn.edu/~cis194/fall14/lectures.html Students will be choosing projects starting next week, and will need to have them completed by Dec. 15 or so. A good project is about 20 hours of work. Thanks! Richard_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

ICFP 2015: Call for Papers

haskell-cafe - Fri, 11/07/2014 - 6:45pm
===================================================================== 20th ACM SIGPLAN International Conference on Functional Programming ICFP 2015 Vancouver, Canada, August 31 - September 2, 2015 http://www.icfpconference.org/icfp2015 ===================================================================== Important Dates ~~~~~~~~~~~~~~~ Submissions due: Friday, February 27 2015, 23:59 UTC-11 Author response: Tuesday, April 21, 2015 through Thursday, 23 April, 2015 Notification: Friday, May 1, 2015 Final copy due: Friday, June 12, 2015 Scope ~~~~~ ICFP 2015 seeks original papers on the art and science of functional programming. Submissions are invited on all topics from principles to practice, from foundations to features, and from abstraction to application. The scope includes all languages that encourage functional programming, including both purely applicative and imperative languages, as well as languages with objects, concurrency, or parallelism. To
Categories: Offsite Discussion

ICFP 2015: Call for Papers

General haskell list - Fri, 11/07/2014 - 6:45pm
===================================================================== 20th ACM SIGPLAN International Conference on Functional Programming ICFP 2015 Vancouver, Canada, August 31 - September 2, 2015 http://www.icfpconference.org/icfp2015 ===================================================================== Important Dates ~~~~~~~~~~~~~~~ Submissions due: Friday, February 27 2015, 23:59 UTC-11 Author response: Tuesday, April 21, 2015 through Thursday, 23 April, 2015 Notification: Friday, May 1, 2015 Final copy due: Friday, June 12, 2015 Scope ~~~~~ ICFP 2015 seeks original papers on the art and science of functional programming. Submissions are invited on all topics from principles to practice, from foundations to features, and from abstraction to application. The scope includes all languages that encourage functional programming, including both purely applicative and imperative languages, as well as languages with objects, concurrency, or parallelism. To
Categories: Incoming News