From 20aaa4a9899ce454d3c20594a2b7d2d3d38dbc88 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Fri, 14 Dec 2012 15:32:49 +0000 Subject: The first prototype for exhaustive generation in the C runtime. The trees are always listed in decreasing probability order. There is also an API for generation from Python --- src/compiler/GF/Compile/GrammarToPGF.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/compiler/GF/Compile') diff --git a/src/compiler/GF/Compile/GrammarToPGF.hs b/src/compiler/GF/Compile/GrammarToPGF.hs index f9b008bf8..6fc572fc9 100644 --- a/src/compiler/GF/Compile/GrammarToPGF.hs +++ b/src/compiler/GF/Compile/GrammarToPGF.hs @@ -25,7 +25,6 @@ import GF.Infra.Option import GF.Data.Operations import Data.List -import Data.Function import Data.Char (isDigit,isSpace) import qualified Data.Set as Set import qualified Data.Map as Map @@ -63,8 +62,7 @@ mkCanon2pgf opts gr am = do ((m,c),AbsCat (Just (L _ cont)),addr) <- adefs] catfuns cat = - (map (\x -> (0,snd x)) . sortBy (compare `on` fst)) - [(loc,i2i f) | ((m,f),AbsFun (Just (L loc ty)) _ _ (Just True),_) <- adefs, snd (GM.valCat ty) == cat] + [(0,i2i f) | ((m,f),AbsFun (Just (L _ ty)) _ _ (Just True),_) <- adefs, snd (GM.valCat ty) == cat] mkConcr cm = do let cflags = concatOptions [mflags mo | (i,mo) <- modules gr, isModCnc mo, -- cgit v1.2.3