diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2019-01-18 15:24:21 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2019-01-18 15:24:21 +0000 |
commit | 391f3ccea45fe6f72a1d041a306fed7ee3a96db9 (patch) | |
tree | 9d0f3ca15b481b675a3c3e19bea107d148c4aae5 /compiler/coreSyn/CoreMap.hs | |
parent | 07e58c7d5b2186954987578abc0889cfe0fd9625 (diff) | |
download | haskell-wip/T16185.tar.gz |
Improvements to the AnonArgFlag stuffwip/T16185
One step forward is using CPP for FunTy
See Note [Function types] in TyCoRep
Diffstat (limited to 'compiler/coreSyn/CoreMap.hs')
-rw-r--r-- | compiler/coreSyn/CoreMap.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/coreSyn/CoreMap.hs b/compiler/coreSyn/CoreMap.hs index 5ab4ae1d4d..10ca8f040c 100644 --- a/compiler/coreSyn/CoreMap.hs +++ b/compiler/coreSyn/CoreMap.hs @@ -3,6 +3,7 @@ (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} +{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} @@ -10,9 +11,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} -{-# OPTIONS_GHC -Wno-overlapping-patterns #-} - -- Yuk! Suppresses bogus warnings - module CoreMap( -- * Maps over Core expressions CoreMap, emptyCoreMap, extendCoreMap, lookupCoreMap, foldCoreMap, @@ -37,6 +35,8 @@ module CoreMap( (>.>), (|>), (|>>), ) where +#include "HsVersions.h" + import GhcPrelude import TrieMap @@ -569,7 +569,7 @@ lkT (D env ty) m = go ty m go (LitTy l) = tm_tylit >.> lkTyLit l go (ForAllTy (Bndr tv _) ty) = tm_forall >.> lkG (D (extendCME env tv) ty) >=> lkBndr env tv - go ty@(FunTy {}) = pprPanic "lkT FunTy" (ppr ty) + go ty@(FFunTy {}) = pprPanic "lkT FunTy" (ppr ty) go (CastTy t _) = go t go (CoercionTy {}) = tm_coerce @@ -588,7 +588,7 @@ xtT (D env (ForAllTy (Bndr tv _) ty)) f m = m { tm_forall = tm_forall m |> xtG (D (extendCME env tv) ty) |>> xtBndr env tv f } xtT (D _ ty@(TyConApp _ (_:_))) _ _ = pprPanic "xtT TyConApp" (ppr ty) -xtT (D _ ty@(FunTy {})) _ _ = pprPanic "xtT FunTy" (ppr ty) +xtT (D _ ty@(FFunTy {})) _ _ = pprPanic "xtT FunTy" (ppr ty) fdT :: (a -> b -> b) -> TypeMapX a -> b -> b fdT k m = foldTM k (tm_var m) |