News aggregator

Haskell Platform 2014 build problems on OS X

haskell-cafe - Wed, 08/27/2014 - 9:39pm
Hello! I just want to point to your attention this issue of Homebrew: It seems that they’re forced to remove the formula for the Haskell Platform because, it seems, the build process has become extremely complicated and they can’t figure out how to automate it. Is there someone that know enough internals of the platform to help them or to give some advice? Thanks, Nicola
Categories: Offsite Discussion

ANN: cgi 3001.2.0.0

General haskell list - Wed, 08/27/2014 - 7:32pm
Hello, I've just uploaded a new version of cgi to hackage [1]. This release supports GHC 7.8.3, 7.6.3, and 7.4.2. I'm also looking for co-maintainers or backup maintainers of cgi, please email me directly if you're interested. This release was made possible with the assistance and guidance of Carter Schonwald and was based on a patch by Alexander Vershilov. Thanks. [1]
Categories: Incoming News

Conduit+GHC high memory use for simple Sink

haskell-cafe - Wed, 08/27/2014 - 7:19pm
Hello Cafe, First I'd like to thank Michael Snoyman and Gabriel Gonzalez for the work they've done on the conduit and pipes stream processing libraries, and all the accompanying tutorial content. I've been having fun converting a text processing app from C to Haskell. I'm seeing unexpectedly high memory usage in a stream-processing program that uses the conduit library. I've created a example that demonstrates the problem. The program accepts gzip files as arguments, and for each one, classifies each line as either Even or Odd depending on the length, then outputs some result depending on the Sink used. For each gzip file: action :: GzipFilePath -> IO () action (GzipFilePath filePath) = do result <- runResourceT $ CB.sourceFile filePath $$ Zlib.ungzip =$ CB.lines =$ token =$ sink2 putStrLn $ show result The problem is the following Sink, which counts how many even/odd Tokens are se
Categories: Offsite Discussion

[ANN] Wheb 0.3 release

haskell-cafe - Wed, 08/27/2014 - 2:26pm
Hello all, I have been working on a web framework that I use for my personal projects and I thought I would share my small progress. I started this project several months ago when I hit a big bump in difficulty going from a simple skeleton project to a more intricate project using alternative frameworks. Lately I've added three main features: WebSockets, Cache and Redis. WebSockets use the same WhebT interface as the standard HTTP handlers allowing you to share functions and middlware accross your application. Cache is a new plugin for simplistic Caching. It provides an interface to cache ByteStrings under Text keys. Like the other plugins, it is backend agnostic so you can write your own backend or use the prebuilt Redis cache (this requires you to configure your redis instance for caching). In addition to Redis acting as a Cache, you can also use it as a database and as a backend for the plugins Auth and Sessions. You can mix Redis with other plugins. For one of my projects I use the MongoDB plugin f
Categories: Offsite Discussion

Types depending on tuples.

haskell-cafe - Tue, 08/26/2014 - 8:46am
I'm doing some geometry in 2 and 3 dimensions. To do this, I've got Vector2d and Vector3d classes, which are basically just wrappers around 2 and 3-tuples of doubles: type Vector2d = (Double, Double) type Vector3d = (Double, Double, Double) I've also got a typeclass Vector so I can do polymorphic things on them: type Vector3d = (Double, Double, Double) (Ok, polymorphic thing). I now have a need to convert lists of Vector's to a list of lists of Doubles. I'd like that to be part of the Vector typeclass, but - well, declaring it is interesting. I can't just add a method "toLists :: a -> [Double]", because (according to ghc), there's no match between the expected type 'Double' and the actual type '[t1]'. Can I declare this typeclass? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Undesired email

haskell-cafe - Mon, 08/25/2014 - 6:12pm
Dear List, I have a problem with me new smartphone. Sorry for the inconvenient. Best, FelipeZ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Proposal: Simplify/Generalize Data.Dynamic

libraries list - Mon, 08/25/2014 - 4:15pm
I'd like to propose a cleanup to the API of Data.Dynamic. By way of (partial) motivation, a couple of years back Lennart posed a question on stackoverflow <> about how to use Dynamic to implement apD :: forall f. Typeable1 f => (forall a. a -> f a) -> Dynamic -> Dynamic At the time, I offered a solution that is no longer applicable in a world with polykinded Typeable. But, if we change the definition of Data.Dynamic to data Dynamic where Dynamic :: Typeable a => a -> Dynamic from its current magic implementation in terms of unsafeCoerce and a manually held typeRep, then fromDynamic becomes a trivial application of Data.Typeable.cast and dynApply becomes easier, This would enable us to implement Data.Dynamic with its full constructor exposed without losing safety. In lieu of supplying the constructor, we could offer a form of withDyn :: Dynamic -> (forall a. Typeab
Categories: Offsite Discussion

Document for review: evaluation order and state tokens

glasgow-user - Mon, 08/25/2014 - 11:25am
As part of trac ticket 9390[1], Simon PJ recommended that we try to get a document written that clarifies some of the issues regarding evaluation order, and get it included in the GHC wiki. After a few iterations with review from Simon, I've got a first "publicly consumable" version available at: I'd appreciate any feedback on this document before I add it to the wiki. Michael [1] _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >
Categories: Offsite Discussion

[ANN] igrf-0.2

haskell-cafe - Mon, 08/25/2014 - 12:35am
igrf is a library that provides an implementation of the International Geomagnetic Reference Field, which is just what it sounds like. I've tested it against NOAA's online calculator, but use it at your own risk. Note that the input is in geocentric and not geodetic coordinates. There is haddock documentation, I'm working on figuring out why it isn't on hackage and how to fix it. -Doug McClean _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Proposal: (breaking change to avoid fragile breakage) change the definition of foldr2, zip, and zipWith

libraries list - Sun, 08/24/2014 - 8:22pm
BACKGROUND TRAC: #9495 GHC's definition of foldr2 violates the spec of the Haskell Report, making some programs less defined than they should be, and does so in a way that is quite fragile, dependent on a number of different factors—that is, it is likely hard to debug. Details: The current "baseline" definition of foldr2 (before rewrite rules) does what the Report requires: foldr2 :: (a -> b -> c -> c) -> c -> [a] -> [b] -> c foldr2 k z = go where go [] _ys = z go _xs [] = z go (x:xs) (y:ys) = k x y (go xs ys) There are two rewrite rules, foldr2/left and foldr2/right, designed to allow foldr2 to fuse with build appearing in either the first or second list argument. foldr2/left is perfectly safe (as long as the build argument is legitimate). foldr2/right is not, as comments in the source partially explain. The problem shows up if you have something shaped like zip [1,7,42,5] (1:8:4:11:undefined) but where the second list (ending in undefined) is actually produced using build, and GHC c
Categories: Offsite Discussion

Munich Haskell Meeting

haskell-cafe - Sun, 08/24/2014 - 7:43pm
Dear all, next Tuesday, 26th of August, Munich's Haskell enthusiasts will meet again at Cafe Puck around 19h30. Everyone is wellcome. Please note that we will meet at Cafe Puck. To help us reserve enough tables, please go to and click the button. Heinrich
Categories: Offsite Discussion

time and old-locale

libraries list - Sun, 08/24/2014 - 6:18am
For time-1.5, I'm removing the dependency on old-locale, and including that code directly in Data.Time.Format. The package will also include its own deprecated System.Locale. I expect this to be a popular, decade-overdue move, but if you have some complaint, let me know before I release it. Repository is at
Categories: Offsite Discussion


glasgow-user - Sat, 08/23/2014 - 11:45pm
After 3 days of frustrating trials and errors, I managed to install the new hmatrix package on Slackware 13.1. I post this message in case anyone else hits the same problem, as the process requires some alteration of the standard build process of ATLAS, LAPACK, hmatrix and hmatrix-gsl. The following steps assume that LAPACK is built against an optimized ATLAS library. 1.) By default, ATLAS builds only static libraries. However, hmatrix needs shared objects, so ATLAS should be configured with the --share option and, after the build is complete, the commands "make shared" and/ore "make ptshared" need to be issued in BUILDDIR/lib 2.) LAPACK also buils by default only static libraries and, for the same reason as above, we need position independent conde in ALL the objects in liblapack. In order to do this we need to 2.1.) Add -fPIC to OPTS, NOOPT and LOADOPT in LAPACKROOT/ 2.2.) Change the BLASLIB macro in the same file to point to the optimized tatlas (os satlas) library 2.3.) Add t
Categories: Offsite Discussion

ANNOUNCE: goatee, goatee-gtk: Go game editor

General haskell list - Sat, 08/23/2014 - 9:35pm
After 359 days, I'm pleased to announce the first official release of Goatee, a game editor for the board game Go. (Don't worry, those two remaining liberties are eyes.) Here's the project summary: UI features include: - Game navigation, variations and variation modes, game tree restructuring. - Annotations: marks (r/w), arrows and lines (r/o), visibility (r/o). - Full support for game info. - Manual editing of SGF properties. - One-color and blind Go modes. Two Hackage packages are available: 'goatee' is the shared library, and 'goatee-gtk' is the UI. Lots more is planned; stay tuned! Cheers, Bryan
Categories: Incoming News

lightweight web interface for Haskell?

haskell-cafe - Sat, 08/23/2014 - 7:36pm
Hi Cafe, Does anyone know of a website where I can write a few lines of Haskell and have them run? Ideally, there would be a place to write a module and then a place to load the module into GHCi. I seem to recall something that fit my needs at, but that site is no longer working. I'm asking because I'll be teaching an undergraduate course this fall in introductory Haskell. There are no prerequisites for the course, and my course roster suggests that I'll have several students with no programming background at all. (This is great, actually -- I love facilitating a new programmer's first steps!) It might be nice to get students off the ground quickly before bogging them down with installation details -- hence the website I'm looking for. Thanks! Richard
Categories: Offsite Discussion

Set (Set a) like container - but more efficient?

haskell-cafe - Sat, 08/23/2014 - 11:42am
Does a Set (Set a) like container exist already but which is represented as tree internally, eg A ` - B - C ` - D ` - X - Y which would represent ABC ABD and AXY ? If it does not what would be a nice name to create such container? Marc Weber
Categories: Offsite Discussion

How to add Haddock comment for standalone derivedinstances?

haskell-cafe - Sat, 08/23/2014 - 11:04am
Hi cafe, Is there any way to add the documentation comment for the instances defined with StandaloneDeriving? I'm currently defining data-type using GADTs and its Typeable instance. Normally, this can be done only StandaloneDeriving and DeriveDataTypeable extensions: I added `Typeable` instance for Ordinal recently, so I want to add some comments like "Since". But any of the following doesn't work or, even worse, haddock won't compile: * Just before `deriving instance` line using `-- | ` * Just after `deriving` keyword but before `instance` using `-- | ` * Just after the `Typeable Ordinal`, but no newline in-between, with `-- ^ ` * The next line of `deriving` clause with `-- ^ ` Is there any way to add documentation for instances with standalone deriving, or it's just not supported yet?
Categories: Offsite Discussion

Unable to build a mingw cross compiler.

haskell-cafe - Fri, 08/22/2014 - 11:38pm
Greetings, I'm trying to build GHC to cross compile to windows. GCC and friends are in /usr/bin/x86_64-w64-mingw32-*, libraries and headers are in /usr/x86_64-w64-mingw32/{include,lib}. I configured with: ./configure --target=x86_64-w64-mingw32 \ --with-gcc=/usr/bin/x86_64-w64-mingw32-gcc # Needed because # otherwise /usr/bin/gcc # would be used Building fails with the following error: utils/hsc2hs/dist/build/Main.o: In function `s2nI_info': (.text+0x5c5): undefined reference to `GetModuleFileNameW' collect2: error: ld returned 1 exit status (The GHC invocation line is included in the attached file) So it seems that GHC either uses the wrong linker or invokes it with the wrong search path. However, the configure script detects the right linker (/usr/bin/x86_64-w64-mingw32). Is this a bug, or a feature? System data: OS: Debian jessie Linux/GNU i386 Installed GHC (for bootstrapping): version 7.6.3 GHC I'm trying to build: version 7.8.3 Regards Sven "/usr/bin/ghc" -o utils/hsc2
Categories: Offsite Discussion

Maintaining test-suite dependencies with cabal

haskell-cafe - Fri, 08/22/2014 - 5:49pm
Dear reader, I have a single executable package in Cabal[1] and I have added a test for it using an example configuration from the ltc package[2]. With my test on my executable I can't depend on the main package, but I seem to have to repeat the dependencies of my executable, or split off functionality into a library. [3] Can I easily depend on the dependencies of another package or should I create a library and depend on that in my test and executable? All source is at: Greetings, Bram [1] [2] [3] A part of my cabal file added below executable after main-is: Main.hs build-depends: base >=4.7 && <4.8, options ==1.*, directory ==1.2.*, parallel-io ==0.3.*, filepath ==1.3.*, unix ==2.7.* hs-source-dirs: src g
Categories: Offsite Discussion

CFP - JSS, Elsevier - Special issue on adaptive and reconfigurable software systems and architectures

General haskell list - Fri, 08/22/2014 - 10:58am
Call for papers =============================== Journal of Systems and Software (JSS, Elsevier) Impact Factor: 1.245 (5-Year Impact Factor: 1.443) Special issue on Adaptive and reconfigurable software systems and architectures =============================== The focal concerns are Service-oriented and component-based software systems, applications and architectures addressing adaptation and reconfiguration issues. Different investigation topics are involved, such as: CBSE, SOA, Functional and Non Functional (NF) requirements (QoS, performance, resilience), monitoring, diagnosis, decision and execution of adaptation and reconfiguration. Different research axes are covered: concepts, methods, techniques, and tools to design, develop, deploy and manage adaptive and reconfigurable software systems. The development of composite services poses very interesting challenges concerning their functional and NF requirements. On the one hand, a composite software system depends on the NF requirements of its constitut
Categories: Incoming News