From db7063ebccae25554a8829945969e5e217ee0d29 Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 7 Dec 2012 14:01:42 +0000 Subject: [PATCH] Make -new-comp the default and bump the version number to 3.3.11-darcs * -new-comp (the new partial evaluator) is now chosen by default when you run cabal install (or cabal configure). To revert to using the old partial evaluator by default, use "cabal install -f-new-comp" (or "cabal configure -f-new-comp"). * Regardless of the configured default, you can choose which partial evaluator to use when you invoke gf by using the -new-comp or -old-comp command line option. * The cc command in the GF shell uses the chosen partial evaluator by default, but you can override this by using "cc -new" or "cc -old". The plan is that these flags will be romeved in a future version. --- gf.cabal | 4 ++-- src/compiler/GFI.hs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gf.cabal b/gf.cabal index 2044f9b50..2d3fad564 100644 --- a/gf.cabal +++ b/gf.cabal @@ -1,5 +1,5 @@ name: gf -version: 3.3.10-darcs +version: 3.3.11-darcs cabal-version: >= 1.8 build-type: Custom @@ -51,7 +51,7 @@ flag server flag new-comp Description: Make -new-comp the default - Default: False + Default: True library build-depends: base >= 4.2 && <5, diff --git a/src/compiler/GFI.hs b/src/compiler/GFI.hs index f2afa9b78..980264042 100644 --- a/src/compiler/GFI.hs +++ b/src/compiler/GFI.hs @@ -184,7 +184,8 @@ execute1 opts gfenv0 s0 = (style,q,s) = pOpts TermPrintDefault Qualified ws' (new,ws') = case ws of "-new":ws' -> (True,ws') - _ -> (False,ws) + "-old":ws' -> (False,ws') + _ -> (flag optNewComp opts,ws) case runP pExp (encodeUnicode utf8 s) of Left (_,msg) -> putStrLn msg