From 3092ace710af6d63ea57394eba91d4edc5b7cb91 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 9 Jul 2007 19:54:08 +0000 Subject: [PATCH] Add -XUnliftedFFITypes flag --- compiler/main/DynFlags.hs | 3 +++ compiler/typecheck/TcType.lhs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index c12568c..c9d3e1a 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -168,6 +168,7 @@ data DynFlag | Opt_ExtendedDefaultRules -- Use GHC's extended rules for defaulting | Opt_GlasgowExts | Opt_FFI + | Opt_UnliftedFFITypes | Opt_PArr -- Syntactic support for parallel arrays | Opt_Arrows -- Arrow-notation syntax | Opt_TH @@ -1131,6 +1132,7 @@ xFlags = [ ( "FI", Opt_FFI ), -- support `-ffi'... ( "FFI", Opt_FFI ), -- ...and also `-fffi' ( "ForeignFunctionInterface", Opt_FFI ), + ( "UnliftedFFITypes", Opt_UnliftedFFITypes ), ( "PartiallyAppliedClosedTypeSynonyms", Opt_PartiallyAppliedClosedTypeSynonyms ), ( "Rank2Types", Opt_Rank2Types ), @@ -1183,6 +1185,7 @@ impliedFlags = [ glasgowExtsFlags = [ Opt_GlasgowExts , Opt_PrintExplicitForalls , Opt_FFI + , Opt_UnliftedFFITypes , Opt_GADTs , Opt_ImplicitParams , Opt_ScopedTypeVariables diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index a619c53..7595a75 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -1253,7 +1253,7 @@ legalFFITyCon tc = isUnLiftedTyCon tc || boxedMarshalableTyCon tc || tc == unitTyCon marshalableTyCon dflags tc - = (dopt Opt_GlasgowExts dflags && isUnLiftedTyCon tc) + = (dopt Opt_UnliftedFFITypes dflags && isUnLiftedTyCon tc) || boxedMarshalableTyCon tc boxedMarshalableTyCon tc -- 1.7.10.4