News aggregator

Installing Package Candidates With Cabal ...

haskell-cafe - Sat, 02/07/2015 - 1:50am
Hi all, Is there a way to 'cabal install' a package candidate? The description at says it "let others install it before publishing it to the main index" which seems to indicate it can. Am I missing something? Thanks! -deech _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

recursion problem part 2

haskell-cafe - Fri, 02/06/2015 - 5:18pm
Hello, I partly solved the problem of cis194 of turning 123 into [1,2,3] But I ran into a problem I cannot solve . When I have this : toDigits :: Integer -> [Integer] toDigits n | n < 0 = [] | n == 0 = [] | otherwise = toDigits (n `div` 10) ++ [n `mod` 10] toDigits 123 gives [ 1,2,3] but toDigits 0 gives [] where I expect to be [0] So I change the code to this : toDigits :: Integer -> [Integer] toDigits n | n < 0 = [] | n == 0 = [0] | otherwise = toDigits (n `div` 10) ++ [n `mod` 10] Now toDigits 0 gives [ 0] but toDigits 123 gives now [ 0, 1 ,2, 3] where I expect to be [1,2,3] Can someone give me a tip how to solve this I have asked this on the beginners ML but the only answer I get was someone who was using some if -then statement and I think I can be solved without. Roelof
Categories: Offsite Discussion

error compiling 24 Days of Hackage: heist

haskell-cafe - Fri, 02/06/2015 - 2:47pm
Hello, I was trying to compile an example of heist (a template engine) usage from 24 Days of Hackage: heist, but ended up with an error message: src/Main.hs:60:7: `hcTemplateLocations' is not a record selector In the first argument of `initHeist', namely `mempty {hcTemplateLocations = [loadTemplates "templates"], hcInterpretedSplices = defaultInterpretedSplices}' In a stmt of a 'do' block: heist <- initHeist (mempty {hcTemplateLocations = [loadTemplates "templates"], hcInterpretedSplices = defaultInterpretedSplices}) In the second argument of `($)', namely `do { heist <- initHeist (mempty {hcTemplateLocations = [loadTemplates "templates"], hcInterpretedSplices = defaultInterpretedSplices}); Just (output, _) <- renderTemplate heist "billy"; liftIO . BS.putStrLn . toByteString $ out
Categories: Offsite Discussion

Are conditional changes in library interfacesproblematic?

haskell-cafe - Fri, 02/06/2015 - 2:36pm
transformers 0.4 deprecated ErrorT in favor of ExceptT. I've noticed that several packages use CPP to conditionally add ExceptT instances, like this: ``` #if MIN_VERSION_transformers(0,4,0) instance C m => C (ExceptT e m) where #endif ``` The problem I've found with this is that I will get a different interface depending on which transformers version is picked. There is a transformers-compat[1] library that provides ExceptT when using older versions of transformers, when combining these I end up with a compilation failure since the ExceptT instances are no longer included due to CPP. The alternatives I see are: 1. Use transformers-compat (and as of today mtl-compat[2]) 2. Drop support of older versions of dependencies 3. Advise against compat packages The first alternative seems preferable from a user's standpoint. For transformers and mtl I argue it's the most pragmatic option. I think the compat packages are a good thing, especially for core packages, since they let us maintain backwards compatibili
Categories: Offsite Discussion

Error Message when trying to use plotFunc from Gnuplot

Haskell on Reddit - Fri, 02/06/2015 - 2:04pm

Hello Reddit!

You've guys have helped me in the past, so I'm hoping you can help me again!

I'm plugging along learning Haskell in a computational physics course. We're starting to learn about Plotting.

the first introduction to the idea of plotting is to enter the following line of code into ghci:

:m Graphics.Gnuplot.Simple plotFunc [] [0,0.1..10] cos

I've successfully installed the Gnuplot family through cabal install gnuplot, but when I attempt to run the above code, I get the following error message:

<interactive>: pgnuplot: readProcessWithExitCode: does not exist (No such file or directory)

I know that gnuplot has installed mostly correctly, because I'm able to ask Haskell to determine the type of plotFunc ([a] -> (a -> a) -> IO ()), so plotFunc is recognized.

Any idea what might be causing this problem?

side note, I am running Haskell on Windows 8.1. Thats probably important to mention.


EDIT: I've since actually made some progress...

1) I've also installed easyplot to check if that plot function worked. no luck. another error of similar nature.

2) I've installed the windows version of the standalone Gnuplot. After adding the gnuplot directory to my PATH environment variable, I'm able to successfully run plotFunc, but the plot flashes up and instantly vanishes. Like some part of the script immediately closes the graph after it plots it because the script ends? The plotting function in EasyPlot (plot Windows cos) does the same thing, although the graph stays in the screen for a hair longer.

submitted by sqrlsattack
[link] [16 comments]
Categories: Incoming News

[ANN] LambdaCms: A modular CMS op top of Yesod

Haskell on Reddit - Fri, 02/06/2015 - 12:26pm

LambdaCms is a CMS that requires a programmer to set-up the website, and aims for an optimal experience for that programmer (contrary to some popular open source CMSes that aim for everyone-friendliness). Once a LambdaCms-site is deployed, the content is manageable from the "admin interface", possibly by a non-technical person, as you expect from a CMS.


  • Modular: LambdaCms "extensions" make use of Yesod's subsites
  • Extensions use Cabal to depend on eachother
  • Fast: we measured 2-10ms responses, w/o any caching in the application
  • Responsive admin interface (works well on tablets and phones)
  • Supports SQL dbs that Yesod supports (Postgres, MySQL, Sqlite)
  • Out-of-the-box support for authentication strategies that yesod-auth provides (BrowserID, Google, Email)
  • User management
  • User roles
  • Fully programmable route-based permissions
  • Admin activity log that extensions can plug into
  • Allows internationalization of the admin interface
  • UI strings of the admin interface allow overrides
  • Basic media management capabilities (from the lambdacms-media package)

LambdaCms allows you to quickly implement an admin interface, the public facing side of the site --the theme-- is fully up to the programmer to implement.


It is a graduation project of two students from the Rotterdam University of Applied Science performed under the supervision of Hoppinger. Feedback, bug reports, pull requests and general discussion are most welcome. We keep a list of TODOs which is open for suggestions.

submitted by cies010
[link] [37 comments]
Categories: Incoming News

PhD Studentships at St Andrews

General haskell list - Fri, 02/06/2015 - 12:17pm
[Please forward to suitable candidates. Thanks! Kevin.] The School of Computer Science at the University of St Andrews has several fully funded research scholarships available. These are available to UK residents (possibly also to EU nationals), and pay fees as well as maintenance. There is no formal deadline, but applications should be made as soon as possible. We have an active group of about ten academics, postdoctoral research fellows and postgraduate students working on a variety of topics in functional programming. We'd welcome applicants who are interested in any aspect of functional programming and related areas, including: Parallel Functional programming; Heterogeneous multicores (including CPU/GPU combinations); Refactoring; Program Generation; Domain Specific Languages; Static Analysis; Patterns of computation; Machine-Learning; Compilation; Real-time functional programming (e.g. in Hume); Semantics of Programming Languages; Functional cloud computing; Functional Programming and Security;
Categories: Incoming News

Haskell + HSA = Seamless Parallelism?

Haskell on Reddit - Fri, 02/06/2015 - 11:40am

AMD's HSA technology offers an intermediary language to run parallel jobs on the integrated GPU of Kaveri chips using the same memory address space and on die cache. Because of Haskell's functional nature it knows when it is safe to run code in parallel and when it is not, so couldn't Haskell be adopted to seamlessly use the iGPU for things like list comprehension etc by targeting this new IL?

submitted by bat_country
[link] [21 comments]
Categories: Incoming News - Fri, 02/06/2015 - 11:32am
Categories: Offsite Blogs - Fri, 02/06/2015 - 11:32am
Categories: Offsite Blogs


haskell-cafe - Fri, 02/06/2015 - 8:26am
with ghc 7.8.4 and hflags 0.4 the following program: {-# LANGUAGE TemplateHaskell #-} module Main where import HFlags defineFlag "f" True "A flag." --defineFlag "g" True "Another flag." main = do _ <- $initHFlags "flags demo" print Main.flags_f gives me a runtime error about the flag f not being found, unless I add the declaration of a second flag. It seems like the last flag definition is not seen. Any idea/suggestion? Thanks, Maurizio _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion - Fri, 02/06/2015 - 5:19am
Categories: Offsite Blogs

Philip Wadler: Status Report 2

Planet Haskell - Fri, 02/06/2015 - 5:11am

An update to my status. My doctors continue to monitor my heart infection, but it appears cleared up, along with the problems in my abdomen.

I met with my urologist on 4 Feb. My latest CAT scan (27 Jan) shows a small mass in my liver and that the tumour on my left kidney has not grown. The mass is unlikely to be a metastasis of the tumour, but the first order of business is to biopsy my liver; this should happen in the next two weeks, and it may take a further two weeks to get the results. Meanwhile, I am on the waiting list for keyhole surgery to remove my left kidney; this should happen in about six weeks. (Hospitals are fined £1000 if it takes more than four weeks, but the Western General currently has thirty people over that limit.) Recovery time is about four weeks. So, with luck, back to work in ten weeks, mid-April.

All four kidney surgeons at the Western General are in the top 10% in the country, so I am in good hands. If keyhole surgery converts to ordinary surgery the recovery time is three months; this happens in 4% of cases. My doctor says it is unlikely to happen to me because, compared to most of his patients, I am young, fit, and slim. Not words I usually hear applied to myself!

Previously: Status report, A paean to the Western General.
Categories: Offsite Blogs