diff options
| author | simonpj <unknown> | 2004-12-22 16:59:22 +0000 |
|---|---|---|
| committer | simonpj <unknown> | 2004-12-22 16:59:22 +0000 |
| commit | 20e39e0e07e4a8e9395894b2785d6675e4e3e3b3 (patch) | |
| tree | dd82345461086491f435581008bfcd6641382ead /ghc/compiler/main/DriverFlags.hs | |
| parent | d7c402a3cedbe49345a34f2e58a3f3050638dcb4 (diff) | |
| download | haskell-20e39e0e07e4a8e9395894b2785d6675e4e3e3b3.tar.gz | |
[project @ 2004-12-22 16:58:34 by simonpj]
----------------------------------------
Add more scoped type variables
----------------------------------------
Now the top-level forall'd variables of a type signature scope
over the right hand side of that function.
f :: a -> a
f x = ....
The type variable 'a' is in scope in the RHS, and in f's patterns.
It's implied by -fglasgow-exts, but can also be switched off independently
using -fscoped-type-variables (and the -fno variant)
Diffstat (limited to 'ghc/compiler/main/DriverFlags.hs')
| -rw-r--r-- | ghc/compiler/main/DriverFlags.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ghc/compiler/main/DriverFlags.hs b/ghc/compiler/main/DriverFlags.hs index 0f53bd4100..2787040d9b 100644 --- a/ghc/compiler/main/DriverFlags.hs +++ b/ghc/compiler/main/DriverFlags.hs @@ -467,6 +467,7 @@ fFlags = [ ( "parr", Opt_PArr ), ( "th", Opt_TH ), ( "implicit-prelude", Opt_ImplicitPrelude ), + ( "scoped-type-variables", Opt_ScopedTypeVariables ), ( "monomorphism-restriction", Opt_MonomorphismRestriction ), ( "implicit-params", Opt_ImplicitParams ), ( "allow-overlapping-instances", Opt_AllowOverlappingInstances ), @@ -485,7 +486,7 @@ fFlags = [ ( "unbox-strict-fields", Opt_UnboxStrictFields ) ] -glasgowExtsFlags = [ Opt_GlasgowExts, Opt_FFI, Opt_TH, Opt_ImplicitParams ] +glasgowExtsFlags = [ Opt_GlasgowExts, Opt_FFI, Opt_TH, Opt_ImplicitParams, Opt_ScopedTypeVariables ] isFFlag f = f `elem` (map fst fFlags) getFFlag f = fromJust (lookup f fFlags) |
