News aggregator

Haskell Weekly News: Issue 298

General haskell list - Thu, 07/03/2014 - 6:59am
Welcome to issue 298 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers from June 15 to 28, 2014 Quotes of the Week * Kinnison * imagines a radio station playing only things like 'Life tru a Lens', stuff by 'Dire States' or 'Monadonna' Top Reddit Stories * Today I published an introductory book on Haskell Data Analysis Domain:, Score: 99, Comments: 26 Original: [1] On Reddit: [2] * Backpack: An ML-like module system for Haskell Domain:, Score: 76, Comments: 44 Original: [3] On Reddit: [4] * Cgrep, a context-aware grep for source code. Domain:, Score: 67, Comments: 13 Original: [5] On Reddit: [6] * Teenage Haskell Domain:, Score: 63, Comments: 7 Original: [7]
Categories: Incoming News

GLUT under Windows using ghc 7.8.2?

haskell-cafe - Thu, 07/03/2014 - 12:31am
It appears that The Haskell Platform includes libglut32.a and other important libs, so it is self-contained, provided users can work with the version of ghc that is provided: currently 7.6.3 under Windows. In particular, 'cabal install glut' works fine with the default version of ghc. But if I try using ghc-7.8.2 I get: Configuring GLUT- cabal: Missing dependencies on a foreign library: * Missing C library: glut32 ... All of the following do not change the result: 1. Adding --extra-lib-dirs=c:\glut-3.7.6-bin to the command line. 2. Using freeglut instead of glut 3. Copying libglut.a from The Haskell Package mingw/lib directory to c:\ghc-3.8.2\mingw\lib (dangerous because I am mixing architectures here). How does cabal decide that the C library glut32 is missing? Where is it looking? Why doesn't it look in the places I specify? Thanks, Dominick
Categories: Offsite Discussion

How to deal with dependency bounds for an application

haskell-cafe - Wed, 07/02/2014 - 9:17pm
Hey, I have wrote a little tool and some people had issues installing it with cabal and had to use "--reorder-goals" to be able to install it [1]. Obviously it's because I have very few dependency bounds (actually near none aside base). I don't have to be convince that it's a bad idea, the motivation for adding bounds are pretty clear... but... I'm not sure how to define them? Should I know what is the lowest possible combination of my dependencies who would compile... because if I'm too strict it might be difficult for some user to install? or maybe I should target as lowest what is in current haskell-platform? I'm looking for some advice and feedback from maintainers. Thanks in advance! [1]:
Categories: Offsite Discussion

Making the Haskell 2010 report latex repo

haskell-cafe - Wed, 07/02/2014 - 9:14pm
The Haskell 2010 report is here: Also mirrored in git here: git< at > This version doesn't build because it uses old "Char" instead of "Data.Char"-style imports. So my version here: Fixes that: But that's as far as I get. Here is what happens when I run $ cd tools; make; cd .. $ cd report; make I get: As is typical in the LaTeX, a torrent of uninteresting information is spewed out. Finally, at the end, it says: Does anyone familiar with the language of LaTeX have any idea what's going on? Has anyone successfully been able to build it? If so, please state the exact steps to do so and I will be very grateful. Ciao!
Categories: Offsite Discussion

Problem with type in a function

haskell-cafe - Wed, 07/02/2014 - 8:52pm
Hi, I have the following function plotf :: Ploteable a => ([a] -> IO ()) -> (a -> a) -> [a] -> IO () plotf plot fn xs = plot $ map fn xs that compiles correctly, but when I use it with: plotf win sin [1..100::Double] -- where win :: [Double] -> IO () I'm geting the error: No instance for (Ploteable Double) arising from a use of ‘plotf’ In the expression: plotf win sin [1 .. 100 :: Double] In an equation for ‘it’: it = plotf win sin [1 .. 100 :: Double] What am I missing? Thanks! 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964
Categories: Offsite Discussion

How to store complex values with Persistent

Haskell on Reddit - Wed, 07/02/2014 - 5:50pm

I'm trying to store a record with a field of type [Text] using Yesod/Persistent. This (fairly old) blog post mentions in the section labelled "Complex Data Structures Support!" that Persistent now supports entities with such fields, but I can't figure out how to actually do that. I get errors when I try the obvious thing (i.e., just declaring an entity with a field of type [Text]). Does anyone know how to do this?

Edit: The plot thickens:

When I give my entity a field questions :: [Text] and start the development server, I get an SQL error:

Migrating: CREATE TEMP TABLE "user_backup"("id" INTEGER PRIMARY KEY,"ident" VARCHAR NOT NULL,"password" VARCHAR NULL,"questions" VARCHAR NOT NULL,CONSTRAINT "unique_user" UNIQUE ("ident")) Migrating: INSERT INTO "user_backup"("id","ident","password") SELECT "id","ident","password" FROM "user" devel.hs: user error (SQLite3 returned ErrorConstraint while attempting to perform step.)

Second edit:

I deleted my database and Yesod created a new one which works, but is this avoidable?

submitted by seriousreddit
[link] [3 comments]
Categories: Incoming News

PhD studentship on interval computation in Haskell

General haskell list - Wed, 07/02/2014 - 11:50am
------------------------------------------------- PhD studentship - Interval Computation in Haskell ------------------------------------------------- * Applicants should have a strong background in real analysis and functional programming. * The closing date for applications is 18th July 2014. * The project will be supervised by Michal Konečný, Aston University. * The student will receive a 3-year studentship of £15,500/year. * UK/EU student's fee is covered, non-EU student's fee is £10,914 in 2014/2015. * The student will act as a teaching assistant for a distance learning course approx. 7h/week. * For more information, use the following links: o Description of the potential project topics[1] o AERN - a Haskell interval computation library[2] o Supervisor's home page[3] o Department research home page[4] o Details of the studentship and links to application forms[5] (The above advert is also available at http:/
Categories: Incoming News

Closed type families, apartness, and occurs check

glasgow-user - Wed, 07/02/2014 - 9:19am
From the user manual, it sounds like a clause of a closed type family should be rejected once no subsitution of the type could make it unify with the clause. If so, it doesn't seem to do an occurs check: type family IsEq a b :: Bool where   IsEq a a = True   IsEq a b = False forall a . IsEq a a :: Bool = forall (a :: k). 'True forall a . IsEq a [a] :: Bool = forall a. IsEq a [a] I came across this while trying to using Generics to find the immediate children of a term - this sort of non-reduction happens while comparing a type like (Term var) with a constructor argument of type var. Brandon _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >
Categories: Offsite Discussion

New gtk2hs 0.12.4 release

gtk2hs - Wed, 11/21/2012 - 12:56pm

Thanks to John Lato and Duncan Coutts for the latest bugfix release! The latest packages should be buildable on GHC 7.6, and the cairo package should behave a bit nicer in ghci on Windows. Thanks to all!


Categories: Incoming News