From f2b057c0787f835675a6bab1af48f4e624f71254 Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 2 Dec 2015 16:41:18 +0000 Subject: GF shell, cc command: try to compute pre{...} tokens in token sequences MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is implemented as a simple post-processing step after partial evaluation to try compute pre{...} tokens in token sequences. Nothing is done to deal with intervening free variants. This was done in response to a query from René T on the gf-dev mailing list. --- src/compiler/GF/Compile/Compute/ConcreteNew.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler/GF/Compile/Compute') diff --git a/src/compiler/GF/Compile/Compute/ConcreteNew.hs b/src/compiler/GF/Compile/Compute/ConcreteNew.hs index 744074e9e..e368d9d77 100644 --- a/src/compiler/GF/Compile/Compute/ConcreteNew.hs +++ b/src/compiler/GF/Compile/Compute/ConcreteNew.hs @@ -303,8 +303,8 @@ strsFromValue t = case t of vars <- [[(str2strings v, map sstr c) | (v,c) <- zip vv c0] | vv <- combinations v0] ] - VFV ts -> mapM strsFromValue ts >>= return . concat - VStrs ts -> mapM strsFromValue ts >>= return . concat + VFV ts -> concat # mapM strsFromValue ts + VStrs ts -> concat # mapM strsFromValue ts _ -> fail ("cannot get Str from value " ++ show t) -- cgit v1.2.3