Andrés Sicard-Ramírez | 31 Mar 14:02 2015

SHA256SUMS file for GHC 7.4.2


For GHC 7.10.1 or GHC 7.8.4 I could find the SHA256SUMS files in and, respectively.

The SHA256SUMS file for GHC 7.4.2 isn't in Where can I find this file?



Glasgow-haskell-users mailing list
Glasgow-haskell-users <at>
Dominic Steinitz | 30 Mar 19:37 2015

Parallel Profiling

Does anyone know of any tools for analysing parallel program performance?

I am trying to use threadscope but it keeps crashing with my 100M log file and ghc-events-analyze is not
going to help as I have many hundreds of threads all carrying out the same computation. I think I’d like a
library that would allow me to construct my own analyses rather than display them via GTK. There is
ghc-events but that seems to be just for parsing the logs and I couldn’t find anything that used it in the
way I would like to (apart from threadscope and ghc-events-analyze of course).


Dominic Steinitz
dominic <at>
J. Garrett Morris | 27 Mar 15:30 2015

Typed splices and type checking


I've run into another misunderstanding with Template Haskell and typed
splices.  For example, I was hoping to use typed splices to generate
earlier errors from Printf.  Here's the world's least handy printf:

> class Printf t
>     where printf :: String -> Q (TExp String) -> Q (TExp t)
> instance Printf String
>     where printf s t | '%' `notElem` s = [|| $$t ++ s ||]
>                      | otherwise       = fail ("Unexpected format %"
>                                                ++ [c])
>               where (_, _:c:_) = break ('%' ==) s
> instance Printf t => Printf (Char -> t)
>     where printf s t
>             | c /= 'c' = fail ("Unexpected format %" ++ [c] ++
>                                " for character")
>             | otherwise = [|| \c -> $$(printf s''
>                                          [|| $$t ++ s' ++ [c] ||])
>                            ||]
>               where (s', '%':c:s'') = break ('%' ==) s

Now, consider these two definitions:

> f :: Char -> String
> f = $$(printf "foo %c" [||""||])

> h :: Char -> String
(Continue reading)

Austin Seipp | 27 Mar 08:43 2015

ANNOUNCE: GHC version 7.10.1

    The (Interactive) Glasgow Haskell Compiler -- version 7.10.1

The GHC Team is pleased to announce a new major release of GHC. There
have been a number of significant changes since the last major
release, including:

  * Several new language features and changes have been implemented:
    - Applicative is now a superclass of Monad and in the Prelude.

    - Many prelude combinators have been generalized

    - Static pointers

  * GHC now has preliminary and experimental support for DWARF based debugging.

  * `integer-gmp` has been completely rewritten.

  * Type-checking plugins can now extend the type checker.

  * Support for partial type signatures

  * Many bugfixes and other performance improvements.

  * Preliminary support for 'backpack' features like signatures.

  * Typeable is now generated by default for all data types automatically.

We've also fixed a handful of issues reported since RC3:
(Continue reading)

J. Garrett Morris | 23 Mar 13:47 2015

Splices returning splices


I'm attempting to write a quasiquoter with relatively full antiquotation
support.  In doing so, I've arrived at I think an odd problem: the
expression grammar in Language.Haskell.TH.Syntax doesn't seem to include
splices.  This seems to mean that my antiquotations can't themselves
include splices, which is quite limiting.  Am I misinterpreting?  The
type system in "Template metaprogramming for Haskell" seems to imply no
such restriction on the occurrences of splices.

(As an additional complication: what I really need to do is return typed
splices; my "quasiquoter" relies on its expected type to determine its
behavior.  However, this seems like an uninteresting extension of the
above problem.)




The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
J. Garrett Morris | 17 Mar 03:54 2015

Qualified names in TH?

I'm trying to write some Template Haskell code that (among other
things) manipulates IntSets.  So, for example, I'd like a splice to
generate a call to Data.IntSet.fromList.  However, I'm not sure how
IntSet will be imported in the target module.  Is there a way to
resolve the fully qualified name (or similar) to a TH Name, without
having to know how it's imported in the splicing module?  (The obvious
approach---mkName "Data.IntSet.fromList"---seems not to work in GHC




The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
M Farkas-Dyck | 17 Mar 00:29 2015

[PATCH] generalize filterM, mapAndUnzipM, zipWithM, zipWithM_, replicateM, replicateM_

 libraries/base/Control/Monad.hs | 37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)

diff --git a/libraries/base/Control/Monad.hs b/libraries/base/Control/Monad.hs
index 6fa4a07..02eabd1 100644
--- a/libraries/base/Control/Monad.hs
+++ b/libraries/base/Control/Monad.hs
 <at>  <at>  -75,9 +75,9  <at>  <at>  module Control.Monad
     , (<$!>)
     ) where

-import Data.Foldable ( Foldable, sequence_, msum, mapM_, foldlM, forM_ )
-import Data.Functor ( void )
-import Data.Traversable ( forM, mapM, sequence )
+import Data.Functor ( void, (<$>) )
+import Data.Foldable ( Foldable, sequence_, sequenceA_, msum, mapM_, foldlM, forM_ )
+import Data.Traversable ( forM, mapM, traverse, sequence, sequenceA )

 import GHC.Base hiding ( mapM, sequence )
 import GHC.List ( zipWith, unzip, replicate )
 <at>  <at>  -94,13 +94,8  <at>  <at>  guard False     =  empty
 -- | This generalizes the list-based 'filter' function.

 {-# INLINE filterM #-}
-filterM          :: (Monad m) => (a -> m Bool) -> [a] -> m [a]
-filterM p        = foldr go (return [])
-  where
-    go x r = do
-      flg <- p x
(Continue reading)

Sean Seefried | 7 Mar 12:18 2015

-staticlib flag for building standalone static libraries producing very large libraries

Hi all,

Can anyone explain the following problem I'm having?

I'm currently writing a game in Haskell. When I produce a plain old executable (for local testing) it's about 23M. However, when I create a static lib using the -staticlib flag it is 54M.

Why the discrepancy? 

Glasgow-haskell-users mailing list
Glasgow-haskell-users <at>
Ben Franksen | 25 Feb 03:05 2015

Record Puns/Wildcards

I just noted that code like

my_config = default_config {..} where
  name = "my project"
  description = "some longer text"

gives me a syntax error, even if I have NamedFieldPuns and RecordWildCards 
extensions enabled. It seems that these extensions only work for record 
constructors and not for updating values.

Is there a special reason puns/wildcards are not allowed in record updates?


"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies and the other
way is to make it so complicated that there are no obvious deficiencies.
The first method is far more difficult."   ― C.A.R. Hoare

Glasgow-haskell-users mailing list
Glasgow-haskell-users <at>
adam vogt | 20 Feb 03:48 2015

type checker plugin success depends on whether an expression is manually inlined

Hello list,

The following file compiles with my plugin. It makes a data family
HList have role representational in a way that I believe is safe:

I expect the highlighted line to be acceptable. However, it seems that
the plugin never sees anything from line 19, when I uncomment it. Is
there something I can do to make that L19 work? Is this a known or
intentional limitation of type checker plugins?

Thomas Bereknyei | 18 Feb 16:34 2015


There is a library for TH: (broken at the moment)
There is a proposal at:

Now with AMP, is this worth revisiting? Why or why not?

Glasgow-haskell-users mailing list
Glasgow-haskell-users <at>