News aggregator

FP Complete: Status of School of Haskell 2.0

Planet Haskell - Wed, 01/06/2016 - 2:00am
Status of School of Haskell 2.0

Earlier this year, I wrote a blogpost about our plans for the next version of the School of Haskell. SoH is a community service and project to make it possible to use interactive snippets of Haskell on any website, in particular on Today, we are open sourcing the SoH 2.0 repositories! We've also retired FP Haskell Center, and SoH pages that were previously on now redirect to

Here's the current status of the different parts:

Here's the repo main SoH code, which includes the browser client and API service. Once the service side of things is ready, they will allow you to embed interactive Haskell snippets in any website!

The soh-client is written using GHCJS, and provides a code editing widget. It uses ghcjs-react to separate the view from the model / controller. It utilizes some of GHCJS's fancier features, such as fully supporting concurrency and STM.

The soh-runner runs within a container, and hooks up stack-ide to a websocket for communication with soh-client.

The soh-scheduler provides a REST API for requesting that a container running soh-runner gets spun up. We ran into some issues with deployment to ECS, likely due to our huge docker images. Our plan is to rework / rewrite the service code to instead target Kubernetes. Since the initial implementation of SoH 2.0, we've had a lot of positive experiences with kubernetes, and would prefer to use it.

The repo repo contains code based on code for the site. It is served from The contents of the site is not yet interactive, as the kubernetes based version of soh-scheduler still needs to be written and deployed.

Future Improvements

There are quite a few immediate things to work on in SoH, in particular, the switch to kubernetes, and integrating the new client with Once these things are resolved, there are also some interesting possibilities. Ever since the client code was initially written, a number of developments have occurred that it might leverage:

One such development is haskell-ide-engine, a project to centralize our efforts on providing Haskell tools (particularly those that use GHC), as a service to text editors and IDEs. We'd like to focus our efforts in this direction on haskell-ide-engine, rather than stack-ide. This means that in the future, SoH may be based on haskell-ide-engine, along with some selection of its plugins. I encourage people to dive into helping with HIE, to bring it to a point where it makes Haskell development excellent, and to make it fit for usage SoH 2.0.

Another interesting development is Ryan Trinkle's excellent reflex library for reactive UI. While using react was quite nice overall, I ended up hacking around some of the paradigm. I think things would work out cleaner with reflex / reflex-dom, and this way SoH development can benefit that project!

Categories: Offsite Blogs

Functional Jobs: Software Engineer at Capital Match (Full-time)

Planet Haskell - Wed, 01/06/2016 - 12:29am

Capital Match is the leading peer-to-peer lending platform in Singapore. Our in-house platform, mostly developed in Haskell, currently manages more than S$ 4 million in different type of facilities and is growing fast. We have closed our series A funding round about 6 months ago and are looking forward to a new round, most probably for middle of 2016. We are now embarking on the next stage of tech development to extend our set of features, strengthen our platform and develop new products. We are hiring an experienced backend software engineer to join the team.


We are looking for an experienced (5+ years) software engineer interested in all aspects of the creation, growth and operations of a secure web-based platform: front-to-back features development, distributed deployment and automation in the cloud, build and test automation etc. Like all team members you will be in charge of development of new features from early design and prototyping to maintenance in production, and of exploring innovative solutions to answer current and future business needs.


Our platform is primarily developed in Haskell with an Om/ClojureScript frontend. This job's focus being primarily on backend we are expecting our candidate to have experience working with a functional programming language, e.g. Scala/OCaml/F#/Clojure/Lisp/Erlang. Of course, demonstrable experience in Haskell would definitely be a plus.

Deployment and production is managed with Docker containers using standard cloud infrastructure so familiarity with Linux systems, command-line environment and cloud-based deployment is mandatory.

Experience in web-based software development is essential and minimum exposure to and understanding of XP practices (TDD, CI, Emergent Design, Refactoring, Peer review and programming, Continuous improvement) is expected. These are standard practices within the team. We therefore favour candidates who value simplicity and respect, accept and give feedback and who are generally team player.

Our team is distributed so ability to work comfortably in a distributed setting is essential. We will favor candidates that are living in or willing to relocate to Singapore, but we are also open to candidates willing to work remotely provided they can demonstrate solid experience with such a setting.


We offer a combination of salary and equity depending on experience and skills:

Salary: USD 4,000-8,000 / month

Equity: 0.3-1% (subject to vesting)

European citizens who relocate to Singapore do not have to pay their home country taxes and the local tax rate in Singapore is around 2-5% (effective on the proposed salary range). Visa sponsorship will be provided.

Singapore is a great place to live, a vibrant city rich with diverse cultures, a very strong financial sector and a central position in Southeast Asia.

Get information on how to apply for this position.

Categories: Offsite Blogs

hscolour color set for white/light background?

haskell-cafe - Wed, 01/06/2016 - 12:19am
Does anyone have handy an hscolour ColourPrefs for use with a white/light background? The defaultColourPrefs <> look okay with a dark background but not light. Thanks, - Conal _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

How export/import a list of submodules; project organization

Haskell on Reddit - Tue, 01/05/2016 - 10:44pm

Hello /r/haskell, I am currently trying to structure my Advent of Code answers (even though this is not necessarily relevant to my question, it might help to illustrate). My individual solutions work fine, but I wanted to structure everything as a bit more as a whole project, I'm also just curious how to handle things like this in other scenarios.

I organized my haskell project through stack and the folder structure looks like this:

myproject/ src/ Code2015/DayXX.hs Main.hs cabal,yaml files etc.

Every individual file/module is named like module Code2015.Prob01 where.

Looking at my Main.hs, importing them with import Code2015.Prob01 import Code2015.Prob02 works fine. But being able to simply use import Code2015seems like a neat option.

This is the point where my knowledge on organizing haskell projects becomes really wonky, which leads to my questions: Whats the best way to handle this? Create an additional module Code2015 which imports and exports every submodule? If so, how is this done (and configured properly in the .cabal file)?

Note: I tried this already and it lead to some weird problems, I was able to import Code2015 in my Main.hs, and use the solutions of every Day by using in ghci, but I was not able to use it like this in my main :: IO (). It was also complaining about ambiguous names while creating the Code2015 module, since I got a solutions :: IO () in every module.

submitted by worst_mathematician
[link] [2 comments]
Categories: Incoming News

RBM and Backprop implementation

Haskell on Reddit - Tue, 01/05/2016 - 10:44pm

I've been trying to understand the contrastive divergence training of RBMs and back-propagation for NNs, so I implemented them in Haskell, and it works! Take a look at I would love some feedback. Cross-post from /r/machinelearning

submitted by aeyakovenko
[link] [10 comments]
Categories: Incoming News

ETAPS 2016 satellite workshops joint call for papers

General haskell list - Tue, 01/05/2016 - 10:09pm
Joint Call for Papers ETAPS 2016 Satellite Workshops Eindhoven, The Netherlands, 2-3 and 8 April 2016 ETAPS, the European Joint Conferences on Theory and Practice of Software, is the primary European forum for academic and industrial researchers working on topics relating to Software Science. The nineteenth edition, ETAPS 2016, will take place in Eindhoven, The Netherlands, 2-8 April 2016, and covers besides the main conferences ESOP, FASE, FOSSACS, POST and TACAS, a large number of satellite workshops and other events in the fields of Software Engineering, Formal Methods, Logics of Programs and the Theory of Computation. This is the joint call for papers for ETAPS 2016 for 21 satellite workshops with open calls. ETAPS satellite workshops will take place in the weekend of Saturday-Sunday, 2-3 April, before the ETAPS main conferences, and on Friday, 8 April, after them. For more information on
Categories: Incoming News

Convolutionnal Neural Network in Haskell?

Haskell on Reddit - Tue, 01/05/2016 - 8:35pm

Hi, I have been looking for a cabal package that handle CNN (Convolutionnal Neural Network) with no success. Is there such a package available?


submitted by Dref360
[link] [11 comments]
Categories: Incoming News

NFM 2016 - second call for papers

General haskell list - Tue, 01/05/2016 - 7:47pm
NFM 2016 – Second Call For Papers THE 8TH NASA FORMAL METHODS SYMPOSIUM June 07 - June 09 2016 McNamara Alumni Center University of Minnesota 200 Oak Street S.E., Minneapolis, MN 55455 THEME OF THE SYMPOSIUM The widespread use and increasing complexity of mission-critical and safety-critical systems at NASA and the aerospace industry requires advanced techniques that address their specification, design, verification, validation, and certification requirements. The NASA Formal Methods Symposium is a forum to foster collaboration between theoreticians and practitioners from NASA, academia, and the industry, with the goal of identifying challenges and providing solutions towards achieving assurance for such critical systems. New developments and emerging applications like autonomous on-board software for Unmanned Aerial Systems (UAS), UAS Traffic Management (UTM), advanced separation assurance algorithms for aircraft, and the need for system-wide fault detection, diagn
Categories: Incoming News

MSFP 2016: Call for Papers

General haskell list - Tue, 01/05/2016 - 4:53pm
Sixth Workshop on MATHEMATICALLY STRUCTURED FUNCTIONAL PROGRAMMING 8 April 2016, in Eindhoven, The Netherlands A satellite workshop of ETAPS 2016 The sixth workshop on Mathematically Structured Functional Programming is devoted to the derivation of functionality from structure. It is a celebration of the direct impact of Theoretical Computer Science on programs as we write them today. Modern programming languages, and in particular functional languages, support the direct expression of mathematical structures, equipping programmers with tools of remarkable power and abstraction. Where would Haskell be without monads? Functional reactive programming without temporal logic? Call-by-push-value without adjunctions? The list goes on. This workshop is a forum for researchers who seek to reflect mathematical phenomena in data and control. The first MSFP workshop was held in Kuressaare, Estonia, in July 2006, affiliated with MPC 2006 and AMAST 2006. The second MSFP workshop was held
Categories: Incoming News

Prelude> 2 ^ 3 ^ 4 ^ 5 hangs stack ghci

Haskell on Reddit - Tue, 01/05/2016 - 4:53pm

I figured it out now, but my first instinct was to recreate the error by evaluating by hand. So, I typed

Prelude> 2 ^ 3


Prelude> 8 ^ 4


Prelude> 4096 ^ 5

1152921504606846976 (I hope I typed that correctly)

But, then, I realized, this was being associated in the other direction. So, I checked that out by hand.

prelude> 4 ^ 5 1024 Prelude> 3 ^ 1024 --do I dare even test this one? it will be a 300+ digit number.

3733918(etc) . . . .for 4 lines. I can't even guess how much it would take to calculate 2 ^ (300 digit number) but it would require more than the known universe turned into RAM memory to store the result.

So, at first I wondered what was wrong with Stack ghci, but now, just take this as a friendly public service announcement.

submitted by Xalem
[link] [36 comments]
Categories: Incoming News

Do Free Monads Actually Matter?

Haskell on Reddit - Tue, 01/05/2016 - 12:51pm

So I've read this: and a few years ago I also read this:

I "get" the mechanism for free monads, and catamorphisms, and algebras. Unfortunately, I'm still not convinced by the utility. When should I actually whip out a free monad? When is it that I really do need the flexibility of interpreters, and how is that more or less appropriate than the traditional approach of typeclasses, or multiparameter typeclasses? I see a lot of "how", and "what", but I think the articles I've linked to don't give a lot of "why"! What's the motivation, and what are the tradeoffs?

submitted by saposcat
[link] [46 comments]
Categories: Incoming News

Douglas M. Auclair (geophf): December 2015 1HaskellADay 1-Liners

Planet Haskell - Tue, 01/05/2016 - 6:47am
  • December 30th, 2015: You have a string of 'digits' in base whatever to convert to an Int
    debase :: [Int] -> Int -> Int
    debase [12,21,3] 26 ~> 8661
    Define debase
    • Gautier DI FOLCO @gautier_difolco
      import Data.Bifunctor
      debase = curry (sum . uncurry (zipWith (*)) . bimap reverse (flip iterate 1 . (*)))
    • bazzargh @bazzargh
      debase a b = sum $ zipWith (*) (reverse a) (map (b^) [0..])
    • obadz @obadzz
      or debase l b = foldl (\ p n -> p * b + n) 0 l
    • bazzargh @bazzargh
      that's better than mine. how about:
      flip (foldl1 . ((+) .) . (*))
  • December 12th, 2015: #math You have this sequence: [1,1,1,1,1,1,2,1,1,1,3,3] What is this pattern? Is there one? Write #haskell to generate this list.
  • December 3rd, 2015: Lens-y again Points-free-itize the following correctName :: Row -> Row correctName r = set lastName (init (view lastName r)) r
  • December 3rd, 2015: Let's get a little lens-y with this one: accumer :: Getter a t a -> t -> [a] -> [a] accumer f s acc = ans where ans = view f s:acc
    • Define the curried-accumer function that curries away the acc-argument.
    • What would the curried definition be if the function type were: accumer :: Getter a t a -> t -> Set a -> Set a
  • December 3rd, 2015: define minimax :: Ord eh => eh -> (eh, eh) -> (eh, eh) such that, e.g.: minimax 1 (2,3) ~> (1,3) minimax 10 (2,3) ~> (2,10)
    • Thomas Dietert @thomasdietert In that case, minimax n (x,y) = (minimum [n,x,y], maximum [n,x,y])
    • joomy @cattheory minimax = liftM2 (***) min max
  • December 1st, 2015: define (->>) :: (a -> m ()) -> (a -> m ()) -> a -> m () All monadic effects must be evaluated.
    • Jérôme @phollow (->>) f g a = f a >> g a 
      • then liftM2 (>>)
      • Nicoλas @BeRewt but the full applicative is: liftA2 (*>)
Categories: Offsite Blogs

Question regarding performance

Haskell on Reddit - Tue, 01/05/2016 - 6:41am

I am writing a parser for email's headers with attoparsec. But while trying to optimize this code I stumble upon several questions that I cannot answer by myself.

So naturally I am looking for the help of the community.

  • Is function call cheap in haskell ? Because when displaying cost center with +RTS -p two near function's calls in the code seem pretty distant in time. (in a flamegraph you can detect that with huge gap between each step of the call stack). Inlining function seems to overcome most of this not solicited overhead.

  • Is it possible to see strictness in Haskell/GHC ? Often time I want to see at a certain point in the program (at runtime), what have been evaluated or not. Is there an equivalent of traceShow but for strictness ? This traceStrict will (without forcing any evaluation) recursively show the state of a variable (thunks, WHNF, NF, ...) Most of the time I am trying to guess around and add some $!, (or just adding it everywhere and see if it's making a difference). Or is it possible to use ghc to dump intermediate representation to see this at compile time ?

  • Why MonoTraversable is faster than Traversable ? I tend to use classyPrelude everywhere in my programs in replacement for prelude. By default classyPrelude uses functions from MonoTraversable instead of Traversable. For a reason that I cannot explain the Monoidic version seems faster. What is the benifit of adding the Monoid constraint instead of just using the Generic version ?

  • What's the difference between


func = do ... toto where toto = do ...


toto = do .... func = do ... toto

For me there is none, but when I changed the first version for the later one. Performance seemed to improve for unknown reasons.

Any explanation will be welcome :)

Compilation of answers
  • Is function call cheap in haskell ?

Look at tibbe answer

  • Is it possible to see strictness in Haskell/GHC ?


In GHCi you can use :sprint to print a variable without forcing its evaluation. I think if you stop the program in the GHCi debugger you should be able to then check if a value is a thunk or not

It's the perfect solution for me


Look at the intermediate output (-ddump-simpl) you can see if e.g. arguments are passed unboxed (e.g. Int#) or boxed (e.g. Int)

It's works but the dump is really tedious to read (at least with my current knowledge)


Understanding the RealWorld

For more information about the runtime behavior

  • What's the difference between


Top level functions are more likely to get inlined and memoized than where functions IIRC.

submitted by erebe
[link] [11 comments]
Categories: Incoming News

How do I read/debug build errors?

Haskell on Reddit - Tue, 01/05/2016 - 1:19am

Compared to Python/Java/C++, I find it really hard to read Haskell build errors. Does anyone have tips on how I could understand errors better?

submitted by Maplicant
[link] [8 comments]
Categories: Incoming News

Zero config, no server Haste.App

Haskell on Reddit - Mon, 01/04/2016 - 11:30pm
Categories: Incoming News

Compose Conference Call for Participation [NYC,Feb 4-5]

haskell-cafe - Mon, 01/04/2016 - 8:50pm
=============================================== Call for Participation Compose Conference 2016 February 4-5, 2016 New York, NY =============================================== The practice and craft of functional programming :: Conference Compose is a conference for typed functional programmers, focused specifically on Haskell, OCaml, F#, SML, and related technologies. Typed functional programming has been taken up widely, by industry and hobbyists alike. For many of us it has renewed our belief that code should be beautiful, and that programming can be as enjoyable as it is practical. Compose is about bringing together functional programmers of all levels of skill and experience — from technical leads to novices, and from long-time hackers to students just getting started. It will feature a keynote by Eugenia Cheng on her work popularizing mathematics, two days of great talks, and plans are underway for a weekend hackathon/unconference. * Invited Talks: Eugenia C
Categories: Offsite Discussion