diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2014-09-23 08:44:45 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-09-23 08:44:46 -0500 |
commit | 330bb3ef856166d18d959b377f12a51c2629b223 (patch) | |
tree | 2beed4c0c3829747428f8b775a9e43eb84144544 /compiler/HsVersions.h | |
parent | 2a743bbddd4de41a77af9b83ec4720cd013292cf (diff) | |
download | haskell-330bb3ef856166d18d959b377f12a51c2629b223.tar.gz |
Delete all /* ! __GLASGOW_HASKELL__ */ code
Summary:
```
git grep -l '\(#ifdef \|#if defined\)(\?__GLASGOW_HASKELL__)\?'
```
Test Plan: validate
Reviewers: rwbarton, hvr, austin
Reviewed By: rwbarton, hvr, austin
Subscribers: rwbarton, simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D218
Diffstat (limited to 'compiler/HsVersions.h')
-rw-r--r-- | compiler/HsVersions.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/HsVersions.h b/compiler/HsVersions.h index bd28c69377..7ba82e1898 100644 --- a/compiler/HsVersions.h +++ b/compiler/HsVersions.h @@ -22,9 +22,6 @@ you will screw up the layout where they are used in case expressions! * settings for the target plat instead). */ #include "../includes/ghcautoconf.h" -/* Global variables may not work in other Haskell implementations, - * but we need them currently! so the conditional on GLASGOW won't do. */ -#if defined(__GLASGOW_HASKELL__) || !defined(__GLASGOW_HASKELL__) #define GLOBAL_VAR(name,value,ty) \ {-# NOINLINE name #-}; \ name :: IORef (ty); \ @@ -34,14 +31,13 @@ name = Util.global (value); {-# NOINLINE name #-}; \ name :: IORef (ty); \ name = Util.globalM (value); -#endif #define ASSERT(e) if debugIsOn && not (e) then (assertPanic __FILE__ __LINE__) else #define ASSERT2(e,msg) if debugIsOn && not (e) then (assertPprPanic __FILE__ __LINE__ (msg)) else #define WARN( e, msg ) (warnPprTrace (e) __FILE__ __LINE__ (msg)) $ -- Examples: Assuming flagSet :: String -> m Bool --- +-- -- do { c <- getChar; MASSERT( isUpper c ); ... } -- do { c <- getChar; MASSERT2( isUpper c, text "Bad" ); ... } -- do { str <- getStr; ASSERTM( flagSet str ); .. } |