# News aggregator

### This code produces an infinite output... why? it's abug in ghc?

### Tooling for equational reasoning in Haskell

### Haskell and Math, Math and Haskell...

I've heard it said over and over that Haskell is very mathematical, math-oriented, etc. I've been reading through this subreddit and reading lots of "should I learn haskell?" posts with a lot of people giving qualified yeses on the condition that the learner is interested in and good at math.

Well, I might be somewhat novel then: I've done a bit of programming in python, and I'm teaching myself C, but I'm curious about FP. Also, I'm not really terribly good at math. The last serious math class I passed was intermediate college algebra (the class you take before trigonometry).

Flash forward a few years, and I have a much different relationship to learning math: I'm curious about it, and I want to *understand* it more than just get correct answers. But I've still got a ways to go :)

Here's the question (aka, tl;dr): If knowing math can help you understand Haskell, does learning Haskell help you to better understand math? Will learning Haskell have benefits outside of, well, programming in Haskell?

submitted by tunabee[link] [17 comments]

### Hackage is flooded with old package versions reuploads

### Haskell Programming Challenges

I created a subreddit called HardyCoding and am hoping I have the same success as I did founding The University of Reddit. I'm reaching out to the Haskell community as I see functional programming as one of the purest forms of programming and would love for their help. The reason for this post is to 1. Describe the point of the subreddit and 2. to explain why I'm reaching out to this subreddit specifically.

I have an idea to build a user submitted programming challenge subreddit. What makes this different from the rest of them? The difference is posts are able to place restrictions on the way that an answer can be accepted. I have a problem with traditional learning and education where you learn something where there is already an established answer. I want people to ask questions that have never been asked.

Haskell is one of my favorite languages and I believe this platform will benefit Haskell developers wanting to share their language with other people by Haskell users submitting coding challenges with restrictions on functional programming and specific languages (Ocaml, Haskell, F#).

I'll be posting to a few more subreddits tonight to get a nice mix of people. Suggestions of where to look for good users are appreciated.

Let me know what everyone thinks.

-Note

I'm just starting the sub and looking to grow slower than The University of Reddit did.

http://www.reddit.com/r/HardyCoding/

submitted by eawesome3[link] [5 comments]

### Similarities between Universal Properties and Parametricity?

Hi there,

It seems to me that there is a lot in common between UMPs in Category Theory and Parametricity/Free Theorems in FP. Pull me up where I run off the tracks: (I suspect my terminology and descriptive language will betray some confusion)

In Category Theory, Universal Mapping Properties are this really useful device that shines light on structures through:

* An arrow that is being "tested" (ie one that generates free structure)

* Universal quantification (forall) of another generated "target" and a second arrow to the "target", which proves that the first arrow isn't deriving input from anywhere else.

* Uniqueness (up to isomorphism) of the arrow from the original generated object to the "forall" object, which proves that the generated structures don't contain extraneous information.

Now, compare to the idea of parametricity and Free Theorems that we know and love in FP:

Parametricity is a really useful device that gives us more information (free theories) about an implementation/proof through universally quantified (forall) type variables, that proves that the types carry no more information than is required.

Or something like that. In both cases, universal quantification is preventing unnecessary specificity, which allows us to know a lot more about the whole structure.

Is that the extent of the similarity between the two concepts? Is the use of uniqueness in UMPs mirrored in some way? Are there some deeper parallels that I'm missing?

Thanks for your time, Ken

submitted by kenbot_[link] [3 comments]

### StateT and ContT

### Solving the expression problem with Object Algebras and Tagless Interpreters

### Canoo RIA Blog

### enable-executable-profiling failing with cabal 1.22

### A replayable free monad transformer - input wanted

I've implemented a replayable variant of FreeT. It is on github at conklech/replay. The representation looks like this:

data RF x f a b = Pure a | LiftR (x -> b) (f x) newtype ReplayT x f m a = ReplayT { runReplayT :: m (RF x f a (ReplayT x f m a)) }You can see that the main difference is that it's been coyonedaed, although the type x is fixed in the signature. (Unlike Coyoneda where it's an existential; I think this change prevents implementing Traversable.)

I say it's "replayable" because the fixed type x allows an interpreter to record each effect in f in a log. That log can then be replayed in lieu of repeating the effects.

I provide a function to embed an effect whose result will be recorded:

record :: (Monad m, Functor f) => f x -> ReplayT x f m xas well as replay:

replay :: (Functor f, Functor m, Monad m) => [x] -> ReplayT x f m a -> m (Either a (f [x]))The inner f [x] in the result type represents an effect in f that performs the next recorded effect and returns the new effect log.

This construction makes the most sense when f is something like Reader x and m is a monad that can be repeatedly performed and has some meaningful intermediate state, such as State. I wrote a simplistic example of a text-based game, along with a simple interpreter.

The original intention was to write things like the example game using a framework like blaze-react, which requires a *pure* state transformer, without using a continuation or Mealy machine or other such un-serializable construction. With this, only the log needs to be kept in the state. Furthermore, the log represents a "save file" of sorts.

The only prior work I found was an assignment in Chalmers's current TDA342 course, which demands something a bit less general, and Peter Thiemann's WASH/CGI from the turn of the century, which was able to run monadic scripts from a cgi handler by serializing the results of all IO effects in the session state.

Questions:

Naming? I haven't put this on hackage yet because I don't know whether replay or ReplayT are helpful or accurate names.

Is this useful in other contexts?

Is this a sensible implementation?

How can I better explain what this is, what it can do, and how to use it?

[link] [15 comments]