News aggregator

GHC API arguments via cabal/stack?

haskell-cafe - Fri, 03/11/2016 - 11:27am
Hi all, I'm working on a little program that uses GHC as a library to do some static analysis on a project I'm working on. It runs things as far as the typechecker (so there's no Template Haskell remaining) and then does the analysis on the resulting AST. Here is how I'm calling GHC at the moment: runAnalyser :: FilePath -> [String] -> [String] -> IO [(Module, [Fact], [Assertion])] runAnalyser srcDir args modules = do defaultErrorHandler defaultFatalMessager defaultFlushOut $ do runGhc (Just libdir) $ do dflags <- getSessionDynFlags (dflags', leftover, warnings) <- parseDynamicFlagsCmdLine dflags (map noLoc $ args ++ modules) setSessionDynFlags dflags' setTargets =<< forM modules (\exampleModule -> guessTarget (exampleModuleFile srcDir exampleModule) Nothing) load LoadAllTargets execWriterT $ forM_ modules $ \exampleModule -> do modSum <- lift $ getModSummary $ mkModuleName exampleModule
Categories: Offsite Discussion

CfP WPTE 2016 (affiliated with FSCD 2016)

General haskell list - Fri, 03/11/2016 - 10:50am
[We apologize if you have received multiple copies of this message] [Please disseminate] ======================================================================================== CALL FOR PAPERS Third International Workshop on Rewriting Techniques for Program Transformations and Evaluation WPTE 2016 affiliated with FSCD 2016 23 June, 2016, Porto, Portugal ======================================================================================== Aims and Scope ============== The aim of WPTE is to bring together the researchers working on program transformations, evaluation, and operationally-based programming language semantics, using rewriting methods, in order to share the techniques and recent developments and to exchange ideas to encourage further activation of research in this area. The previous WPTE were held in V
Categories: Incoming News

Zoom instance for Coroutine

haskell-cafe - Fri, 03/11/2016 - 9:35am
Hello, I am using monad-coroutine <> package and have something like Coroutine (Await Int) (State MyState) Int (simplified version, for example purpose). MyState is deeply nested and I do a lot of modifications in it. Previously (with different data types) I was able to use zoom from lens <>in order to simplify the typing/view of code which operates on some subtree of the state, e.g.: zoom (company.assets) $ do something.a = someComputation anotherthing.b = False this.that = "someString" The problem I am having is that I cannot come up with instance Zoom for the Coroutine and was wondering if anyone is able to help me with that? Best regards, Konstantin _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

C is Manly, Python is for “n00bs”: How False Stereotypes Turn Into Technical “Truths”

Lambda the Ultimate - Thu, 03/10/2016 - 9:50pm

Jean Yang & Ari Rabkin C is Manly, Python is for “n00bs”: How False Stereotypes Turn Into Technical “Truths”, Model-View-Culture, January 2015.

This is a bit of a change of pace from the usual technically-focused content on LtU, but it seemed like something that might be of interest to LtUers nonetheless. Yang and Rabkin discuss the cultural baggage that comes along with a variety of languages, and the impact it has on how those languages are perceived and used.

"These preconceived biases arise because programming languages are as much social constructs as they are technical ones. A programming language, like a spoken language, is defined not just by syntax and semantics, but also by the people who use it and what they have written. Research shows that the community and libraries, rather than the technical features, are most important in determining the languages people choose. Scientists, for instance, use Python for the good libraries for scientific computing."

There are probably some interesting clues to how and why some languages are adopted while others fall into obscurity (a question that has come up here before). Also, the article includes references to a study conducted by Rabkin and LtU's own Leo Meyerovich.

Categories: Offsite Discussion

Functional Jobs: Software Engineer (Scala/Kinesis/Play/React) at AdAgility (Full-time)

Planet Haskell - Thu, 03/10/2016 - 11:09am

Who we are

AdAgilityTM cross-promotes thousands of offers everyday, driving incremental revenue and margin to clients while delighting our customers. The AdAgility Platform supports both first and third-party offer delivery, to help monetization experts, ecommerce managers, and partnership teams power cross-sell offers with minimal technical effort. Applying our technology to your site allows for the secure and efficient delivery of relevant offers, with 24/7 access to full-funnel analytics and powerful real-time offer administration.

As a key member of our engineering team, you will be at the forefront of building out the decisioning and analytics capabilities that deliver fantastic results for our clients.


Our main street office is a 5 minute walk from the Waltham commuter rail station. There is plenty of (free) parking onsite and it is walking distance to a bevy of restaurants.

This position requires presence in the office on a weekly basis.

The Stack

Our goal is to maximize the amount of time we spend building and releasing great software. The technology choices we have made so far reflect this view.

  • We use Scala throughout our systems for type safety, immutability-by-default and ease of programming
  • Our front-end is being built using Scala.js, React.js and Backbone.js
  • All of our deployments are automated with Ansible
  • We run on AWS services such as EC2, Kinesis, RDS, S3, ELB and Route 53
  • Libraries we are using include Scalaz, Spray, Akka, Play and Kamon
  • We leverage light-weight, saas monitoring tools to know exactly what’s going on 24/7: StackDriver, Cronitor, Logentries, CircleCI, …

What you really need

  • Proficiency with two jvm languages (Scala, Clojure, Java, …) or similar, relevant experience
  • Ability to work independently but wisely - if you are stuck on something, don’t wait a week to bounce ideas off a colleague
  • Enthusiasm for functional programming (Haskell, Erlang, Lisp, ML, Scala, etc) - please note any open source experience or online coursework completed
  • Knowledge of the various forms of automated testing - this is not the wild west
  • Significant experience building client-facing web applications
  • A burning desire to build software that produces real value for your team

The cherry on top (nice to haves)

  • Experience with Ansible or similar deployment automation tools
  • Production experience on Play Framework 2.0
  • You’ve dabbled with React.js, Angular or similar technologies
  • A knack for front-end design
  • A good understanding of micro-services and when it makes sense to use them

What we value

  • Honesty
  • Dependability
  • A positive attitude
  • Having fun
  • Checking your ego at the door

Company-wide benefits

At AdAgility, we strive to create a fun, low stress environment that is conducive for success. Some of our top benefits include:

  • Customize your work station. Standing desk - no problem!
  • Flexible hours
  • A weekly, company-wide work-from-home day
  • Regular team outings (recent ones include white-water rafting, F1 racing, bowling and a Bruins game)
  • Feeling tired in the afternoon? Take a cat nap on our sectional.

Get information on how to apply for this position.

Categories: Offsite Blogs

Alternative Proxy

libraries list - Thu, 03/10/2016 - 12:49am
This is the only possible it should exist instance Alternative Proxy where empty = Proxy _ <|> _ Proxy _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Materials on Compiling Functional Languages.

haskell-cafe - Wed, 03/09/2016 - 11:15pm
Hi Cafe, I'm looking for materials on compiling functional languages. The materials that I was able to gather from the web were kind of all over the place, so I'm hoping someone could help me out with something more in order for a novice. Starting from something specific and simple so I could have something small and concrete to implement, play and ponder about. And then going forward with more advanced materials about different optimization strategies for eager and lazy languages or what could be achieved when limiting yourself only to a total language, etc. Cheers, Max. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Upcoming deadlines SPLASH'16 in Amsterdam: OOPSLA &Onward!

General haskell list - Wed, 03/09/2016 - 10:10pm
/************************************************************************************/ ACM Conference on Systems, Programming, Languages, and Applications: Software for Humanity (SPLASH'16) Amsterdam, The Netherlands Sun 30th October - Fri 4th November , 2016 Sponsored by ACM SIGPLAN /************************************************************************************/ # Important dates OOPSLA Papers: * Submissions due: March 23, 2016 * Author Response: May 19 - May 21, 2016 * Author Notification: June 1, 2016 * Camera Ready: August 26, 2016 Onward! Papers & Essays: * Submissions due: April 1, 2016 * First notification: May 20, 2016 * Revised papers: July 15, 2016 * Final notification: July 31, 2016 * Camera ready: August 26, 2016 # SPLASH 2016 The ACM SIGPLAN conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH) embraces all aspects of software construction, to make it the premier conference at the intersection of programm
Categories: Incoming News

Type equality with "forall"

haskell-cafe - Wed, 03/09/2016 - 7:21pm
So I've written a library I'm pretty excited about, and there's just one type issue keeping it from all working! I've got a graph that represents functions and function composition, and I've written a class (pretty directly from Oleg's "TypeEq" work [0]) that tells whether two types are equal. The problem is it doesn't always say they're equal. Here's a simplified version that has the same issue: [pragmas [1]] data Fs a c where F :: (a -> c) -> Fs a c Compose :: forall a b c. Fs b c -> Fs a b -> Fs a c
Categories: Offsite Discussion

[RV 2016] Second Call for Papers -- 2 months to thedeadline

General haskell list - Wed, 03/09/2016 - 11:44am
[Our apologies for duplicates] RV 2016 16th International Conference on Runtime Verification September 23-30, Madrid, Spain <> =Scope Runtime verification is concerned with monitoring and analysis of software and hardware system executions. Runtime verification techniques are crucial for system correctness, reliability, and robustness; they are significantly more powerful and versatile than conventional testing, and more practical than exhaustive formal verification. Runtime verification can be used prior to deployment, for testing, verification, and debugging purposes, and after deployment for ensuring reliability, safety, and security and for providing fault containment and recovery as well as online system repair. Topics of interest to the conference include: - specification languages - specification mining - program instrumentation - monitor construction techniques - logging, recording, and replay - runtime enforcement, fault detection, localization, cont
Categories: Incoming News

ICFP 2016 Call for Sponsorships

General haskell list - Wed, 03/09/2016 - 10:08am
ICFP 2016 The 21st ACM SIGPLAN International Conference on Functional Programming Call for Sponsorships Web version of this call for sponsorships: ## Why Sponsor ICFP 2016? ICFP is the premier conference on functional programming languages, covering all aspects of theory, implementation, and application. Every year, we bring over 400 world-leading researchers, practitioners, and students together to discuss the latest findings, collaborate on new ideas, and meet new people. By sponsoring ICFP, your organization can demonstrate its commitment to supporting high quality research and to developing the next generation of functional programming experts. Most of our sponsorship funds are used to help students from around the world afford to attend the conference and get the most out of their experience. We believe that this commitment will
Categories: Incoming News

ICFP 2016 Call for Sponsorships

haskell-cafe - Wed, 03/09/2016 - 10:08am
ICFP 2016 The 21st ACM SIGPLAN International Conference on Functional Programming Call for Sponsorships Web version of this call for sponsorships: ## Why Sponsor ICFP 2016? ICFP is the premier conference on functional programming languages, covering all aspects of theory, implementation, and application. Every year, we bring over 400 world-leading researchers, practitioners, and students together to discuss the latest findings, collaborate on new ideas, and meet new people. By sponsoring ICFP, your organization can demonstrate its commitment to supporting high quality research and to developing the next generation of functional programming experts. Most of our sponsorship funds are used to help students from around the world afford to attend the conference and get the most out of their experience. We believe that this commitment will
Categories: Offsite Discussion

extensible effects + classy lenses

haskell-cafe - Wed, 03/09/2016 - 1:59am
Hi all, I'm trying to combine an extensible effects style state with classy lenses. That is, instead of pinning the type of my state down, I'd like to only require the pieces I need. For example, {-# language FlexibleContexts #-} import Control.Monad.Freer import Control.Monad.Freer.State class HasInt s where getInt :: s -> Int foo :: (Member (State s) effs, HasInt s) => Eff effs Int foo = get However, this fails to typecheck: Overlapping instances for Member (State s0) effs Matching givens (or their superclasses): (Member (State s) effs) bound by the type signature for foo :: (Member (State s) effs, HasInt s) => Eff effs Int at example.hs:9:8-56 Matching instances: instance Data.Open.Union.Member' t r (Data.Open.Union.FindElem t r) => Member t r -- Defined in ‘Data.Open.Union’ (The choice depends on the instantiation of ‘effs, s0’) In the ambiguity check for the type signature for
Categories: Offsite Discussion

Functional Jobs: Software Engineer at Purple (Full-time)

Planet Haskell - Wed, 03/09/2016 - 12:38am

Purple is a well-funded startup of about 15 people, backed by an Uber co-founder, and revolutionizing the way people get gas.

We are looking for an experienced Software Engineer who can thrive in a startup environment to help us continue to build and test our backend web service and mobile app platform. You would work closely with our small engineering team in a relatively flat organizational structure. You should be confident taking ownership of your specific piece of the product while being comfortable reaching across the full stack. We want people who are aware of latest trends and know how to adopt the most appropriate technology. We're looking for someone who is a strong advocate for the best engineering practices.

Most of our codebase is written in Clojure and ClojureScript. While prior Clojure experience is not a requirement, serious candidates must have an interest and willingness to learn Clojure as well as any technologies we are using that they may not currently be familiar with.

Minimum qualifications:

  • BS degree in Computer Science, similar technical field of study or equivalent practical experience.
  • Strong experience in one or more general purpose programming languages
  • Strong experience in at least one scripting language (e.g., JavaScript)
  • Interest and ability to learn new programming languages as needed
  • Working knowledge of Git
  • Ability to communicate with non-technical team members to meet product needs/goals

A big plus, but not required:

  • Experience using React and React Native
  • Clojure and ClojureScript experience, or:
  • Experience in at least one functional programming language (Scala, OCaml, Lisp, Haskell, etc.)
  • Familiarity with the JVM and related tooling

Purple is a great team! We are small, savvy, and fun. We have an office based in Westwood. We offer a competitive salary, flexible work schedule, health insurance supplement, and unlimited vacation. Come join our growing team!

Get information on how to apply for this position.

Categories: Offsite Blogs

Implement traverseMaybe in Data.Map, Data.IntMap, etc

libraries list - Tue, 03/08/2016 - 10:43am
As far as I know, the most general form of a function that allows traversing and filtering is: type Filter s t a b = foall f. Applicative f => (a -> f (Maybe b)) -> s -> f t In my witherable[0] package, I defined `Witherable` as a subclass of `Traversable` to provide such operation for various containers. class T.Traversable t => Witherable t where wither :: Applicative f => (a -> f (Maybe b)) -> t a -> f (t b) ... However, the `wither` for `Map` is currently inefficient because it is defined in terms of `traverse` and `mapMaybe`, so it traverses the container twice. Efficient implementation.would have to use the hidden constructors. I would like to propose adding `traverseMaybe` and `traverseMaybeWithKey` for `Data.Map`, `Data.IntMap`, and their strict variants (I'm suggesting more conservative name because wither might sound too unusual or poetic for a standard library. I like 'wither' though). A possible implementation would be like this: traverseMaybeWithKey :: Applicative f => (k -> a ->
Categories: Offsite Discussion

Well-Typed.Com: Haskell development jobs with Well-Typed

Planet Haskell - Tue, 03/08/2016 - 10:24am

tl;dr If you’d like a job with us, send your application as soon as possible.

We are looking for several (probably two) Haskell experts to join our team at Well-Typed. This is a great opportunity for someone who is passionate about Haskell and who is keen to improve and promote Haskell in a professional context.

About Well-Typed

We are a team of top notch Haskell experts. Founded in 2008, we were the first company dedicated to promoting the mainstream commercial use of Haskell. To achieve this aim, we help companies that are using or moving to Haskell by providing a range of services including consulting, development, training, and support and improvement of the Haskell development tools. We work with a wide range of clients, from tiny startups to well-known multinationals. We have established a track record of technical excellence and satisfied customers.

Our company has a strong engineering culture. All our managers and decision makers are themselves Haskell developers. Most of us have an academic background and we are not afraid to apply proper computer science to customers’ problems, particularly the fruits of FP and PL research.

We are a self-funded company so we are not beholden to external investors and can concentrate on the interests of our clients, our staff and the Haskell community.

About the jobs

One of the roles is for a specific project with one of our clients, and requires work on-site in London. The other role is more general and not tied to a single specific project or task, and allows remote work.

Please indicate in your application whether on-site work in London is an option for you.

In general, work for Well-Typed could cover any of the projects and activities that we are involved in as a company. The work may involve:

  • working on GHC, libraries and tools;

  • Haskell application development;

  • working directly with clients to solve their problems;

  • teaching Haskell and developing training materials.

We try wherever possible to arrange tasks within our team to suit peoples’ preferences and to rotate to provide variety and interest.

Well-Typed has a variety of clients. For some we do proprietary Haskell development and consulting. For others, much of the work involves open-source development and cooperating with the rest of the Haskell community: the commercial, open-source and academic users.

Our ideal candidate has excellent knowledge of Haskell, whether from industry, academia or personal interest. Familiarity with other languages, low-level programming and good software engineering practices are also useful. Good organisation and ability to manage your own time and reliably meet deadlines is important. You should also have good communication skills. Being interested or having experience in teaching Haskell (or other technical topics) is a bonus. Experience of consulting or running a business is also a bonus. You are likely to have a bachelor’s degree or higher in computer science or a related field, although this isn’t a requirement.

Offer details

The offer is initially for one year full time, with the intention of a long term arrangement. For the remote role, living in England is not required. For the on-site role, you have to be allowed to work in England. We may be able to offer either employment or sub-contracting, depending on the jurisdiction in which you live.

If you are interested, please apply via Tell us why you are interested and why you would be a good fit for Well-Typed, and attach your CV. Please indicate whether the on-site work in London is an option for you. Please also indicate how soon you might be able to start.

We are more than happy to answer informal enquiries. Contact Duncan Coutts (, dcoutts on IRC), Adam Gundry (, agundry on IRC) or Andres Löh (, kosmikus on IRC) for further information.

We will consider applications as soon as we receive them, and will try to fill the positions as soon as possible. In any case, please try to get your application to us by March 27, 2016.

Categories: Offsite Blogs

Use cases of empty type classes

haskell-cafe - Tue, 03/08/2016 - 8:10am
Hi everyone, I have one question. What are current use cases of type classes with no methods? I saw early uses in type-level programming (e.g. HList [1]). In the OO world, interfaces with no methods are called marker interfaces -- their use cases range from things that could be done with datatype generic programming in Haskell (e.g. serialization) to metadata annotations (e.g. RandomAccess [2]). Regards, Tomas Tauber [1] [2]
Categories: Offsite Discussion

Add `take`/`drop`/`splitAt` to `Data.Map`/`Data.Set`

libraries list - Tue, 03/08/2016 - 2:14am
I would like to propose adding `take`/`drop`/`splitAt` to both `Data.Map` and `Data.Set` as originally requested in: <> The motivation behind this proposal is three-fold: * for convenience - these functions are commonly used to implement pagination or previews of maps/sets * for type accuracy - the public API impose an unnecessary `Ord` constraint * for efficiency - these can be implemented more efficiently using the internal API Currently the only way you can implement this functionality via the public API is to use `lookupIndex`/`elemAt` + `split`. For example, one way to implement `Data.Set.take` is: take :: Ord a => Int -> Set a -> Set a take n m | n < 0 = empty | size m <= n = m | otherwise = lt where (lt, _) = split k m k = elemAt n m {-# INLINE take #-} This implementation incurs an unnecessary `Ord` constraint due to a roundabout way of computing `take`: this ext
Categories: Offsite Discussion

implicit call stacks and calling function

haskell-cafe - Mon, 03/07/2016 - 9:35pm
I noticed this when I started using the new implicit call stacks feature. I didn't bring it up because I figure it probably had a good reason and was too late to change anyway, but the recent talk about HasCallStack reminded me and I'm curious. When you do GHC.Stack.getCallStack you get a [(String, SrcPos)]. The SrcPos is the position of the calling function, but the String is the callee function. So you can't get the name of the calling function. Instead, you get the name of the function with the call stack annotation. That's not so useful because in say a logging function, I'm interested in the caller's name. I don't need the name of the logging function, it's just something boring like "info" or "warn"! When I switched from a custom preprocessor that sort of implemented SRCLOC_ANNOTATE, it was definitely nice to lose the custom local hackery, but not so nice to lose the caller's name. For tests I used an unsafe mutable global via unsafePerformIO, otherwise failed tests can't report the name of the
Categories: Offsite Discussion

[ANN] brick-users discussion list

General haskell list - Mon, 03/07/2016 - 7:56pm
Hi, If you use the 'brick' library then you might like to know that there is now a library discussion list for it:
Categories: Incoming News