HEADS UP: New primops on the way

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


(Sorry for double posting).

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"
#endif
#if __GLASGOW_HASKELL__ >= 503
import Data.Array
import Data.Char (ord)
import Data.Array.Base (unsafeAt)
#else
import Array
import Char (ord)
#endif
#if __GLASGOW_HASKELL__ >= 503
import GHC.Exts
#else
import GlaExts
#endif


Janek

----- 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

Hi,

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
> are DO NOT INSTALL THEM UNTIL CHANGES ARE PUSHED INTO HEAD.

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
ghc-7.8?

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

Greetings,
Joachim


-- 
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
http://www.haskell.org/mailman/listinfo/ghc-devs



More information about the ghc-devs mailing list