News aggregator

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

haskell-cafe - Mon, 01/19/2015 - 2:45am
This code produces an infinite output... why? it's a bug in ghc? UTCTime (fromGregorian 2015 1 1) (timeOfDayToTime $ TimeOfDay 0 0 0)
Categories: Offsite Discussion

Tooling for equational reasoning in Haskell

haskell-cafe - Mon, 01/19/2015 - 1:46am
Hi I quite enjoy doing equational reasoning to prove that my functions satisfy some laws, I like to type out each substitution step until I get back what I started with. The only trouble is that it's rather manual and possibly error prone. Is there any tooling anywhere out there that can take in a Haskell expression and reduce it by one step? I only know of stepeval: But it's just a prototype and works on a teeny weeny subset of Haskell. As much as I like doing tooling, my bandwidth for this area is already full. It seems quite hard to implement such a tool with existing tooling. Real compilers and interpreters tend to be distinctly far away from a simple substitution model or retaining the original source code and being able to print valid source back out. If such a tool existed, though, it'd be super handy and you could probably include it as another check for your build process like your type checking, yo
Categories: Offsite Discussion

Haskell and Math, Math and Haskell...

Haskell on Reddit - Sun, 01/18/2015 - 11:08pm

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]
Categories: Incoming News

Hackage is flooded with old package versions reuploads

libraries list - Sun, 01/18/2015 - 7:56pm
Hi, guys, It looks old (and even ancient) versions of many packages gets uploaded to hackage over and over again in ever increasing amounts. The username of uploader for vast majority of these uploads is HerbertValerioRiedel. While this is harmless I wonder what idea stands behind this? Cheers, Kyra
Categories: Offsite Discussion

Haskell Programming Challenges

Haskell on Reddit - Sun, 01/18/2015 - 7:38pm

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.

  1. 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.

  2. 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.


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

submitted by eawesome3
[link] [5 comments]
Categories: Incoming News

Similarities between Universal Properties and Parametricity?

Haskell on Reddit - Sun, 01/18/2015 - 3:06pm

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]
Categories: Incoming News

StateT and ContT

haskell-cafe - Sun, 01/18/2015 - 12:56pm
In the transformers library, there are two implementations for callCC for use with StateT (both lazy and strict) [1,2], the second of which is documented to not satisfy the laws of a monad transformer. [1]: [2]: However, in mtl the MonadCont class [3] uses the second definition for the StateT instance. Is there a good reason for this, or just to match the behaviour of pre-transformers mtl [4] ? [3]: [4]: (I did raise an issue for this on mtl's Github issue tracker, but it hasn't had any responses for two months.)
Categories: Offsite Discussion

Canoo RIA Blog - Sun, 01/18/2015 - 4:28am
Categories: Offsite Blogs

enable-executable-profiling failing with cabal 1.22

haskell-cafe - Sun, 01/18/2015 - 3:17am
Using cabal 1.22 for some reason does not like —enable-executable-profiling. I am working on a rebuilt machine that had 1.18 from the distribution, with 1.22 installed afterwards. I found a little info on people having this problem, but I failed to fix the problem. Note than the library profiling option is accepted. Only the executable fails. Is there any know way to start with platform 2014 with GHC 7.8.3 and install cabal 1.22 and can use this option?
Categories: Offsite Discussion

A replayable free monad transformer - input wanted

Haskell on Reddit - Sat, 01/17/2015 - 9:48pm

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 x

as 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.


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

  2. Is this useful in other contexts?

  3. Is this a sensible implementation?

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

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

Canoo RIA Blog - Sat, 01/17/2015 - 9:33pm
Categories: Offsite Blogs

Type synonyms considered harmful?

haskell-cafe - Sat, 01/17/2015 - 9:06pm
Hi, I've recently had a discussion about type synonyms and when to use them in haskell. On the one hand, they make reading type signatures easier and tell you what is meant, not just what is inside. On the other hand they also sort of hide what is inside, although you will probably need to know exactly that when using them. This might make reading code for new collaborators more difficult if they have to memorize all type synonyms first. So there are basically a few questions: * What do you think is a good policy for when and how to use them? Or would you say just not use them at all and put equivalent information in parameter documentation? * What are the upsides, downsides, pitfalls and also alternatives? (for completeness, also since is a bit sparse) * Can we do something to improve the downsides? Or is there already something? (e.g. editor/IDE that can tell me the underlying type, error messages etc.) -- Regards, Julian Ospald
Categories: Offsite Discussion

CFW: The 5th International Conference on Current and Future Trends of ICT in Healthcare (ICTH)

General haskell list - Sat, 01/17/2015 - 7:18pm
*** Apologies if you receive multiple copies of this message *** ----------------- Call for Workshops Proposals ------------------------ The 5th International Conference on Current and Future Trends of Information and Communication Technologies in Healthcare (ICTH) 27-30 September, 2015 Berlin, Germany ------------------------------------------------------------------------------- Important Dates =============== - Workshop Proposal Due: February 25, 2015 - Acceptance Notification: March 1, 2015 The ICTH-2015 organizing committee invites proposals for workshops. The main objective of the workshops is to provide a forum for researchers and professionals to discuss a specific topic from the field of ICTH-2015 and its related areas. All papers accepted for workshops will be included in the ICTH-2015 proceedings, which will be published by Elsevier. The authors must follow Elsevier guidelines as given
Categories: Incoming News

CFP" The 5th International Conference on Current and Future Trends of ICT in Healthcare

General haskell list - Sat, 01/17/2015 - 7:17pm
The 5th International Conference on Current and Future Trends of Information and Communication Technologies in Healthcare September 27-30, 2015 Berlin, Germany Important Dates ------------------ - Workshop Proposals: February 15, 2015 - Paper Submission Due: May 6, 2015 - Acceptance Notification: June 26, 2015 - Final Manuscript Due: July 26, 2015 The 5th International Conference on Current and Future Trends of Information and Communication Technologies in Healthcare (ICTH) is a premier venue for bringing together multi-disciplinary researchers, professionals and practitioners from academia and healthcare who are engaged in different facets of ICT and healthcare. The conference encourages innovative research contributions providing the recent significant developments and promising future trends of ICT based applications, systems, tools, environments and infrastructures in the fields of health/medical care, and related domains, such as public health and pharmaceuticals. Papers o
Categories: Incoming News