HEADS UP: New primops on the way

Jan Stolarek jan.stolarek at p.lodz.pl
Mon Sep 16 14:14:17 UTC 2013

----- Oryginalna wiadomość -----
Od: "Jan Stolarek" <jan.stolarek at p.lodz.pl>
Do: "Joachim Breitner" <mail at joachim-breitner.de>
Wysłane: poniedziałek, 16 wrzesień 2013 15:14:01
Temat: Re: HEADS UP: New primops on the way

New Alex and Happy will have conditional checks to see whether they are generating code for GHC <=7.6 or for GHC > 7.6. The only two intended situations when things will go wrong are:

1) You have these new versions of Alex and Happy and you are trying to compile 7.7 HEAD that does not contain new primops. Alex/Happy will generate calls to new primops, but since your HEAD doesn't have them the build will fail during stage2.

2) You have HEAD containing new primops, but you have old versions of Alex and Happy. This might happen if you upgrade Alex anmd Happy, pull changes but try to build without cleaning. Again, stage2 will fail because Alex/Happy will generate calls to old primops.

./configure will check whether an up-to-date versions of Alex and Happy are installed on the system.

Note also that both Alex and Happy already have tons of such conditionals so there is nothing new going on in here:

#if __GLASGOW_HASKELL__ >= 603
#include "ghcconfig.h"
#elif defined(__GLASGOW_HASKELL__)
#include "config.h"
#if __GLASGOW_HASKELL__ >= 503
import Data.Array
import Data.Char (ord)
import Data.Array.Base (unsafeAt)
import Array
import Char (ord)
#if __GLASGOW_HASKELL__ >= 503
import GHC.Exts
import GlaExts


----- Oryginalna wiadomość -----
Od: "Joachim Breitner" <mail at joachim-breitner.de>
Do: ghc-devs at haskell.org
Wysłane: poniedziałek, 16 wrzesień 2013 15:04:44
Temat: Re: HEADS UP: New primops on the way


Am Montag, den 16.09.2013, 15:48 +0200 schrieb Jan Stolarek:
> 1) Upgrade to latest versions of Alex and Happy (cabal update && cabal
> install alex happy). These versions are not yet available. When they

why? Will they not be backwards-compatible? Does this mean that I cannot
have a system (without sandboxing) that can build both ghc-7.6 and

I’m worried about the implications for distribution package maintainers,
where ghc, happy and alex are independent packages.


Joachim Breitner
  e-Mail: mail at joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189
  Jabber-ID: nomeata at joachim-breitner.de

ghc-devs mailing list
ghc-devs at haskell.org

More information about the ghc-devs mailing list