I'm learning C++ at college ATM and using Visual Studio. Needless to say, it's a breeze; I only ever have to worry about the code and the dependencies between files. Everything else just works.
So I've become quite interested, very recently, in Haskell. In FP in general. Started out with messing with F# a bit and it intrigued me. Read around, went ahead and installed the Haskell Platform, and now I'm supremely stuck.
I can load/run separate .hs files through GHCi/runhaskell but otherwise, nothing works. Tried setting up several plugins, the last being several IntelliJ ones, but I can't for the life of me figure out how project handling works. Some sources speak of GHC and Cabal different build environments, of manually written make files and stuff like that...
I've yet to find a tutorial speaking a language I can understand. Using cabal init fails on the 3rd step with "Error: cabal: git: no source" or something like that.
Thanks a lot.submitted by Enamex
[link] [44 comments]
An Applicative is a Functor with 2 functions, one to create an instance from a value (pure) and one to zip them (through <*>). However, I'm sure they are functors for which pure makes sense, but <*> doesn't. As now Applicative is a superclass of Monad, it would have make sense to also introduce a Pure class just defining pure?.submitted by maxigit
[link] [78 comments]
It now works smoothly on Windows (64-bit), Linux and Mac allowing you to create truly cross-platform native GUI applications in pure Haskell and deploy statically linked executables with no dependencies.
Most of the FLTK API is covered except for a few minor widgets which I plan to get to in the next release.
Motivation behind the package and installation instructions are found in the Haddocks. And to get you started it ships with a number of demos.
If you have any issues please report them on the Github page.
I'd also love any other feedback so feel free to comment here or email me at the address listed on the Hackage page.
Hope you enjoy!submitted by deech
[link] [9 comments]
Mind the following program:-- Conversion between int and church numerals intToChurch n f a = if n == 0 then a else f (intToChurch (n - 1) f a) churchToInt n = n (+ 1) 0 -- Church number division -- div = (\ v0 -> (\ v1 -> (\ v2 -> (\ v3 -> ((v1 (\ v4 -> (v4 v3))) ((v0 (((v1 (\ v4 -> (\ v5 -> (\ v6 -> (v4 (\ v7 -> ((v5 v7) v6))))))) (\ v4 -> v4)) (\ v4 -> (\ v5 -> (v5 (v2 v4)))))) (((v1 (\ v4 -> (\ v5 -> v4))) (\ v4 -> v4)) (\ v4 -> v4)))))))) -- Church number addition add = (\ v0 -> (\ v1 -> ((v1 (\ v2 -> (\ v3 -> (\ v4 -> (v3 ((v2 v3) v4)))))) v0))) main = do print (churchToInt (add (intToChurch 2) (intToChurch 3))) -- outputs 5 -- print (churchToInt (div (intToChurch 9) (intToChurch 3))) -- should output 3 ?
[link] [6 comments]
I want to learn Haskell, and also build something useful with it. I started following the getting-started stackoverflow post and after reading Learn You a Haskell while testing things in ghci, I quickly started losing focus. I realized I was looking for something to actually code using Haskell and just overall looking for a more hands-on way of learning Haskell.
For anyone else who are very hands-on and learn-by-example type, how did you start getting into and later become proficient in Haskell? I am not new to functional programming, but I really want to learn Haskell, in a way where I can code more and read a little less.submitted by wrahim
[link] [27 comments]
So, if the Glasgow Haskell Team won the lottery, (not a dinky $1.3 M prize, but really hit the jackpot with a payout of $5 Billion USD), how would that kind of windfall change the landscape for Haskell developers?submitted by herbadah
[link] [108 comments]
South of England Regional Programming Language Seminar programme finalised (30th April, Cambridge, attendance free)
The South of England Regional Programming Language Seminar (S-REPLS) is a regular and informal meeting for those based in the South of England with an interest in the semantics and implementation of programming languages.
Our first meeting is on April 30th at Wolfson College, Cambridge. Attendance is free, though we would appreciate prior notice by Wednesday 15th April (using the Doodle poll below) if you are going to attend.
We have now finalised our programme of talks. Our invited speaker is:
- Conor McBride with a talk entitled The dependent lollipop.
Our volunteered talks are:
- Jose Calderon with a talk entitled Improving implicit parallelism,
- Alastair Donaldson with a talk entitled Many-core compiler fuzzing,
- Laurence Tratt with a talk entitled Fine-grained language composition,
- Tony Hoare with a talk entitled Graphical models of concurrent program execution.
More information on S-REPLS, including full abstracts for talks and information on how to get to Wolfson College, is available from the S-REPLS website here.
If you would like to attend, please leave your name in our Doodle poll before Wednesday 15th April.submitted by dmulligan
[link] [2 comments]