From 0f30a5a540c491a6f463d4dc4c39a0bb8cda84c0 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 26 May 2004 08:33:27 +0000 Subject: [PATCH] strict BinTree --- src/GF/Data/Operations.hs | 2 +- src/GF/UseGrammar/Custom.hs | 15 +++++++++------ src/Today.hs | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/GF/Data/Operations.hs b/src/GF/Data/Operations.hs index dd8e37380..a23309575 100644 --- a/src/GF/Data/Operations.hs +++ b/src/GF/Data/Operations.hs @@ -179,7 +179,7 @@ updatePerhapsHard old p1 p2 = case (p1,p2) of -- binary search trees -data BinTree a = NT | BT a (BinTree a) (BinTree a) deriving (Show,Read) +data BinTree a = NT | BT a !(BinTree a) !(BinTree a) deriving (Show,Read) isInBinTree :: (Ord a) => a -> BinTree a -> Bool isInBinTree x tree = case tree of diff --git a/src/GF/UseGrammar/Custom.hs b/src/GF/UseGrammar/Custom.hs index 7770386ec..d7cf99fa0 100644 --- a/src/GF/UseGrammar/Custom.hs +++ b/src/GF/UseGrammar/Custom.hs @@ -40,7 +40,8 @@ import ChartParser -- or some other CF Parser -- grammar conversions -- peb 19/4-04 -- see also customGrammarPrinter -import ConvertGrammar +import qualified ConvertGrammar as CG +import TestConversions (prRaw) import MoreCustom -- either small/ or big/. The one in Small is empty. @@ -169,13 +170,15 @@ customGrammarPrinter = -} -- add your own grammar printers here -- grammar conversions, (peb) +{- ,(strCI "gfc_show", show . grammar2canon . stateGrammarST) ,(strCI "gfc_raw", prRaw . stateGrammarST) - ,(strCI "tnf", prCanon . convertCanonToTNF . stateGrammarST) - ,(strCI "mcfg", prMCFG . convertCanonToMCFG . stateGrammarST) - ,(strCI "mcfg_cf", prCF . convertCanonToCF . stateGrammarST) - ,(strCI "mcfg_canon", prCanon . convertCanonToMCFG . stateGrammarST) - ,(strCI "mcfg_raw", prRaw . convertCanonToMCFG . stateGrammarST) + ,(strCI "tnf", prCanon . CG.convertCanonToTNF . stateGrammarST) + ,(strCI "mcfg", CG.prMCFG . CG.convertCanonToMCFG . stateGrammarST) + ,(strCI "mcfg_cf", prCF . CG.convertCanonToCFG . stateGrammarST) + ,(strCI "mcfg_canon", prCanon . CG.convertCanonToMCFG . stateGrammarST) + ,(strCI "mcfg_raw", prRaw . CG.convertCanonToMCFG . stateGrammarST) +-} --- also include printing via grammar2syntax! ] ++ moreCustomGrammarPrinter diff --git a/src/Today.hs b/src/Today.hs index 980148f83..c8d548625 100644 --- a/src/Today.hs +++ b/src/Today.hs @@ -1 +1 @@ -module Today where today = "Fri May 21 18:10:31 CEST 2004" +module Today where today = "Wed May 26 10:26:30 CEST 2004"