X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FTidyPgm.lhs;h=2189f8530f4cd2cb51ab1033a4604b095f45e7a8;hb=1b98179e0faf8c1ddf79c12827b24d4b7979b83e;hp=131b6175b30511f86c99fed3ca02a6af4ccca70c;hpb=9fddc2160c524d4fefb9fc8a42704f812aef7bf3;p=ghc-hetmet.git diff --git a/compiler/main/TidyPgm.lhs b/compiler/main/TidyPgm.lhs index 131b617..2189f85 100644 --- a/compiler/main/TidyPgm.lhs +++ b/compiler/main/TidyPgm.lhs @@ -41,7 +41,7 @@ import Maybes import ErrUtils import UniqSupply import Outputable -import FastTypes hiding (fastOr) +import FastBool hiding ( fastOr ) import Data.List ( partition ) import Data.Maybe ( isJust ) @@ -403,13 +403,14 @@ mustExposeTyCon exports tc | isEnumerationTyCon tc -- For an enumeration, exposing the constructors = True -- won't lead to the need for further exposure -- (This includes data types with no constructors.) - | isOpenTyCon tc -- open type family + | isOpenTyCon tc -- Open type family = True + | otherwise -- Newtype, datatype = any exported_con (tyConDataCons tc) -- Expose rep if any datacon or field is exported - || (isNewTyCon tc && isFFITy (snd (newTyConRep tc))) + || (isNewTyCon tc && isFFITy (snd (newTyConRhs tc))) -- Expose the rep for newtypes if the rep is an FFI type. -- For a very annoying reason. 'Foreign import' is meant to -- be able to look through newtypes transparently, but it