From 5c9917ff8d18ddaefd5a8bf4b223009747477fd8 Mon Sep 17 00:00:00 2001 From: bringert Date: Thu, 21 Apr 2005 15:21:02 +0000 Subject: [PATCH] Fixed module names and imports after giant file move. --- src/GF.hs | 34 ++--- src/GF/API.hs | 92 +++++++------- src/GF/API/BatchTranslate.hs | 12 +- src/GF/API/GrammarToHaskell.hs | 16 +-- src/GF/API/IOGrammar.hs | 32 ++--- src/GF/API/MyParser.hs | 16 +-- src/GF/CF/CF.hs | 22 ++-- src/GF/CF/CFIdent.hs | 26 ++-- src/GF/CF/CFtoGrammar.hs | 30 ++--- src/GF/CF/CFtoSRG.hs | 18 +-- src/GF/CF/CanonToCF.hs | 40 +++--- src/GF/CF/ChartParser.hs | 22 ++-- src/GF/CF/EBNF.hs | 28 ++--- src/GF/CF/PPrCF.hs | 20 +-- src/GF/CF/PrLBNF.hs | 32 ++--- src/GF/CF/Profile.hs | 30 ++--- src/GF/CFGM/AbsCFG.hs | 2 +- src/GF/CFGM/LexCFG.hs | 8 +- src/GF/CFGM/ParCFG.hs | 12 +- src/GF/CFGM/PrintCFG.hs | 6 +- src/GF/CFGM/PrintCFGrammar.hs | 28 ++--- src/GF/Canon/AbsGFC.hs | 4 +- src/GF/Canon/CMacros.hs | 28 ++--- src/GF/Canon/CanonToGrammar.hs | 28 ++--- src/GF/Canon/GFC.hs | 26 ++-- src/GF/Canon/GetGFC.hs | 22 ++-- src/GF/Canon/LexGFC.hs | 8 +- src/GF/Canon/Look.hs | 30 ++--- src/GF/Canon/MkGFC.hs | 22 ++-- src/GF/Canon/ParGFC.hs | 14 +-- src/GF/Canon/PrExp.hs | 14 +-- src/GF/Canon/PrintGFC.hs | 8 +- src/GF/Canon/Share.hs | 24 ++-- src/GF/Canon/SkelGFC.hs | 6 +- src/GF/Canon/TestGFC.hs | 16 +-- src/GF/Canon/Unlex.hs | 16 +-- src/GF/Compile/BackOpt.hs | 22 ++-- src/GF/Compile/CheckGrammar.hs | 42 +++---- src/GF/Compile/Compile.hs | 60 ++++----- src/GF/Compile/Extend.hs | 24 ++-- src/GF/Compile/GetGrammar.hs | 44 +++---- src/GF/Compile/GrammarToCanon.hs | 34 ++--- src/GF/Compile/MkResource.hs | 24 ++-- src/GF/Compile/MkUnion.hs | 26 ++-- src/GF/Compile/ModDeps.hs | 28 ++--- src/GF/Compile/NewRename.hs | 30 ++--- src/GF/Compile/Optimize.hs | 40 +++--- src/GF/Compile/PGrammar.hs | 28 ++--- src/GF/Compile/PrOld.hs | 32 ++--- src/GF/Compile/Rebuild.hs | 26 ++-- src/GF/Compile/RemoveLiT.hs | 22 ++-- src/GF/Compile/Rename.hs | 30 ++--- src/GF/Compile/ShellState.hs | 46 +++---- src/GF/Compile/Update.hs | 22 ++-- src/GF/Conversion/GFC.hs | 14 +-- src/GF/Conversion/GFCtoSimple.hs | 22 ++-- src/GF/Conversion/MCFGtoCFG.hs | 8 +- src/GF/Conversion/RemoveEpsilon.hs | 14 +-- src/GF/Conversion/RemoveErasing.hs | 14 +-- src/GF/Conversion/RemoveSingletons.hs | 8 +- src/GF/Conversion/SimpleToFinite.hs | 10 +- src/GF/Conversion/SimpleToMCFG/Coercions.hs | 8 +- src/GF/Conversion/SimpleToMCFG/Nondet.hs | 10 +- src/GF/Conversion/SimpleToMCFG/Strict.hs | 8 +- src/GF/Conversion/Types.hs | 14 +-- src/GF/Data/BacktrackM.hs | 8 +- src/GF/Data/ErrM.hs | 11 +- src/GF/Data/GeneralDeduction.hs | 10 +- src/GF/Data/Glue.hs | 14 +-- src/GF/Data/IncrementalDeduction.hs | 10 +- src/GF/Data/Map.hs | 10 +- src/GF/Data/Operations.hs | 14 +-- src/GF/Data/OrdMap2.hs | 10 +- src/GF/Data/OrdSet.hs | 10 +- src/GF/Data/Parsers.hs | 12 +- src/GF/Data/RedBlack.hs | 8 +- src/GF/Data/SharedString.hs | 2 +- src/GF/Data/SortedList.hs | 10 +- src/GF/Data/Str.hs | 12 +- src/GF/Data/Trie.hs | 10 +- src/GF/Data/Trie2.hs | 12 +- src/GF/Data/Zipper.hs | 10 +- src/GF/Formalism/SimpleGFC.hs | 12 +- src/GF/Formalism/Utilities.hs | 12 +- src/GF/Fudgets/CommandF.hs | 18 +-- src/GF/Fudgets/EventF.hs | 8 +- src/GF/Fudgets/FudgetOps.hs | 8 +- src/GF/Fudgets/UnicodeF.hs | 12 +- src/GF/GFModes.hs | 30 ++--- src/GF/Grammar/AbsCompute.hs | 22 ++-- src/GF/Grammar/Abstract.hs | 32 ++--- src/GF/Grammar/AppPredefined.hs | 18 +-- src/GF/Grammar/Compute.hs | 36 +++--- src/GF/Grammar/Grammar.hs | 18 +-- src/GF/Grammar/Lockfield.hs | 20 +-- src/GF/Grammar/LookAbs.hs | 22 ++-- src/GF/Grammar/Lookup.hs | 20 +-- src/GF/Grammar/MMacros.hs | 26 ++-- src/GF/Grammar/Macros.hs | 22 ++-- src/GF/Grammar/PatternMatch.hs | 22 ++-- src/GF/Grammar/PrGrammar.hs | 34 ++--- src/GF/Grammar/Refresh.hs | 20 +-- src/GF/Grammar/ReservedWords.hs | 10 +- src/GF/Grammar/TC.hs | 16 +-- src/GF/Grammar/TypeCheck.hs | 30 ++--- src/GF/Grammar/Unify.hs | 14 +-- src/GF/Grammar/Values.hs | 16 +-- src/GF/Infra/CheckM.hs | 16 +-- src/GF/Infra/Comments.hs | 8 +- src/GF/Infra/Ident.hs | 10 +- src/GF/Infra/Modules.hs | 16 +-- src/GF/Infra/Option.hs | 12 +- src/GF/Infra/Print.hs | 24 ++-- src/GF/Infra/ReadFiles.hs | 22 ++-- src/GF/Infra/UseIO.hs | 19 +-- src/GF/OldParsing/CFGrammar.hs | 10 +- src/GF/OldParsing/ConvertFiniteGFC.hs | 16 +-- src/GF/OldParsing/ConvertFiniteSimple.hs | 12 +- src/GF/OldParsing/ConvertGFCtoMCFG.hs | 12 +- .../OldParsing/ConvertGFCtoMCFG/Coercions.hs | 10 +- src/GF/OldParsing/ConvertGFCtoMCFG/Nondet.hs | 26 ++-- src/GF/OldParsing/ConvertGFCtoMCFG/Old.hs | 30 ++--- src/GF/OldParsing/ConvertGFCtoMCFG/Strict.hs | 26 ++-- src/GF/OldParsing/ConvertGFCtoSimple.hs | 22 ++-- src/GF/OldParsing/ConvertGrammar.hs | 14 +-- src/GF/OldParsing/ConvertMCFGtoCFG.hs | 8 +- .../ConvertSimpleToMCFG/Coercions.hs | 10 +- .../OldParsing/ConvertSimpleToMCFG/Nondet.hs | 18 +-- src/GF/OldParsing/ConvertSimpleToMCFG/Old.hs | 32 ++--- .../OldParsing/ConvertSimpleToMCFG/Strict.hs | 28 ++--- src/GF/OldParsing/GrammarTypes.hs | 10 +- src/GF/OldParsing/IncrementalChart.hs | 8 +- src/GF/OldParsing/MCFGrammar.hs | 8 +- src/GF/OldParsing/ParseCF.hs | 10 +- src/GF/OldParsing/ParseCFG.hs | 8 +- src/GF/OldParsing/ParseCFG/General.hs | 8 +- src/GF/OldParsing/ParseCFG/Incremental.hs | 12 +- src/GF/OldParsing/ParseGFC.hs | 26 ++-- src/GF/OldParsing/ParseMCFG.hs | 8 +- src/GF/OldParsing/ParseMCFG/Basic.hs | 10 +- src/GF/OldParsing/SimpleGFC.hs | 12 +- src/GF/OldParsing/Utilities.hs | 12 +- src/GF/Parsing/CF.hs | 16 +-- src/GF/Parsing/CFG.hs | 18 +-- src/GF/Parsing/CFG/General.hs | 14 +-- src/GF/Parsing/CFG/Incremental.hs | 16 +-- src/GF/Parsing/CFG/PInfo.hs | 8 +- src/GF/Parsing/GFC.hs | 26 ++-- src/GF/Parsing/MCFG.hs | 20 +-- src/GF/Parsing/MCFG/Active.hs | 10 +- src/GF/Parsing/MCFG/Incremental.hs | 10 +- src/GF/Parsing/MCFG/Naive.hs | 8 +- src/GF/Parsing/MCFG/PInfo.hs | 10 +- src/GF/Parsing/MCFG/Range.hs | 6 +- src/GF/Parsing/MCFG/ViaCFG.hs | 14 +-- src/GF/Printing/PrintParser.hs | 14 +-- src/GF/Printing/PrintSimplifiedTerm.hs | 14 +-- src/GF/Shell.hs | 74 +++++------ src/GF/Shell/CommandL.hs | 34 ++--- src/GF/Shell/Commands.hs | 78 ++++++------ src/GF/Shell/HelpFile.hs | 8 +- src/GF/Shell/JGF.hs | 28 ++--- src/GF/Shell/PShell.hs | 30 ++--- src/GF/Shell/ShellCommands.hs | 26 ++-- src/GF/Shell/SubShell.hs | 22 ++-- src/GF/Shell/TeachYourself.hs | 24 ++-- src/GF/Source/AbsGF.hs | 4 +- src/GF/Source/GrammarToSource.hs | 20 +-- src/GF/Source/LexGF.hs | 8 +- src/GF/Source/ParGF.hs | 14 +-- src/GF/Source/PrintGF.hs | 8 +- src/GF/Source/SkelGF.hs | 6 +- src/GF/Source/SourceToGrammar.hs | 38 +++--- src/GF/Source/TestGF.hs | 16 +-- src/GF/Speech/PrGSL.hs | 12 +- src/GF/Speech/PrJSGF.hs | 12 +- src/GF/Speech/SRG.hs | 14 +-- src/GF/Speech/TransformCFG.hs | 10 +- src/GF/Text/Arabic.hs | 8 +- src/GF/Text/Devanagari.hs | 8 +- src/GF/Text/Ethiopic.hs | 8 +- src/GF/Text/ExtendedArabic.hs | 10 +- src/GF/Text/ExtraDiacritics.hs | 8 +- src/GF/Text/Greek.hs | 8 +- src/GF/Text/Hebrew.hs | 8 +- src/GF/Text/Hiragana.hs | 8 +- src/GF/Text/LatinASupplement.hs | 8 +- src/GF/Text/OCSCyrillic.hs | 8 +- src/GF/Text/Russian.hs | 8 +- src/GF/Text/Tamil.hs | 8 +- src/GF/Text/Text.hs | 12 +- src/GF/Text/UTF8.hs | 8 +- src/GF/Text/Unicode.hs | 36 +++--- src/GF/Translate/GFT.hs | 28 ++--- src/GF/UseGrammar/Custom.hs | 118 +++++++++--------- src/GF/UseGrammar/Editing.hs | 24 ++-- src/GF/UseGrammar/Generate.hs | 26 ++-- src/GF/UseGrammar/GetTree.hs | 32 ++--- src/GF/UseGrammar/Information.hs | 34 ++--- src/GF/UseGrammar/Linear.hs | 42 +++---- src/GF/UseGrammar/Morphology.hs | 36 +++--- src/GF/UseGrammar/Paraphrases.hs | 20 +-- src/GF/UseGrammar/Parsing.hs | 54 ++++---- src/GF/UseGrammar/Randomized.hs | 18 +-- src/GF/UseGrammar/Session.hs | 20 +-- src/GF/UseGrammar/Tokenize.hs | 14 +-- src/GF/UseGrammar/Transfer.hs | 28 ++--- src/GF/Visualization/VisualizeGrammar.hs | 16 +-- src/Makefile | 14 +-- 209 files changed, 2038 insertions(+), 2036 deletions(-) diff --git a/src/GF.hs b/src/GF.hs index 178e32b08..52a312939 100644 --- a/src/GF.hs +++ b/src/GF.hs @@ -5,32 +5,32 @@ -- Stability : (stability) -- Portability : (portability) -- --- > CVS $Date: 2005/02/05 21:52:31 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.20 $ +-- > CVS $Date: 2005/04/21 16:21:02 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.21 $ -- -- The Main module of GF program. ----------------------------------------------------------------------------- module Main (main) where -import GFModes (gfInteract, gfBatch, batchCompile) -import Operations -import UseIO -import Option -import IOGrammar -import ShellState -import Shell -import SubShell -import ShellCommands -import PShell -import JGF -import UTF8 +import GF.GFModes (gfInteract, gfBatch, batchCompile) +import GF.Data.Operations +import GF.Infra.UseIO +import GF.Infra.Option +import GF.API.IOGrammar +import GF.Compile.ShellState +import GF.Shell +import GF.Shell.SubShell +import GF.Shell.ShellCommands +import GF.Shell.PShell +import GF.Shell.JGF +import GF.Text.UTF8 -import Today (today) +import GF.Today (today) import Arch import System (getArgs) -import Monad (foldM) +import Control.Monad (foldM) -- AR 19/4/2000 -- 11/11/2001 diff --git a/src/GF/API.hs b/src/GF/API.hs index 134c7b8d6..f339745a2 100644 --- a/src/GF/API.hs +++ b/src/GF/API.hs @@ -5,57 +5,57 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/12 15:20:29 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.31 $ +-- > CVS $Date: 2005/04/21 16:21:03 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.32 $ -- -- Application Programmer's Interface to GF; also used by Shell. AR 10/11/2001 ----------------------------------------------------------------------------- -module API where +module GF.API where -import qualified AbsGF as GF -import qualified AbsGFC as A -import qualified Rename as R -import GetTree -import GFC +import qualified GF.Source.AbsGF as GF +import qualified GF.Canon.AbsGFC as A +import qualified GF.Compile.Rename as R +import GF.UseGrammar.GetTree +import GF.Canon.GFC --- import qualified Values as V -import Values +import GF.Grammar.Values -----import GetGrammar -import Compile -import IOGrammar -import Linear -import Parsing -import Morphology -import PPrCF -import CFIdent -import PGrammar -import Randomized (mkRandomTree) +import GF.Compile.Compile +import GF.API.IOGrammar +import GF.UseGrammar.Linear +import GF.UseGrammar.Parsing +import GF.UseGrammar.Morphology +import GF.CF.PPrCF +import GF.CF.CFIdent +import GF.Compile.PGrammar +import GF.UseGrammar.Randomized (mkRandomTree) -import MMacros -import qualified Macros as M -import TypeCheck -import CMacros -import Transfer -import qualified Generate as Gen +import GF.Grammar.MMacros +import qualified GF.Grammar.Macros as M +import GF.Grammar.TypeCheck +import GF.Canon.CMacros +import GF.UseGrammar.Transfer +import qualified GF.UseGrammar.Generate as Gen -import Text (untokWithXML) -import Option -import Custom -import ShellState -import Linear -import GFC -import qualified Grammar as G -import Modules -import PrGrammar -import qualified Compute as Co -import qualified Ident as I -import qualified GrammarToCanon as GC -import qualified CanonToGrammar as CG -import qualified MkGFC as MC +import GF.Text.Text (untokWithXML) +import GF.Infra.Option +import GF.UseGrammar.Custom +import GF.Compile.ShellState +import GF.UseGrammar.Linear +import GF.Canon.GFC +import qualified GF.Grammar.Grammar as G +import GF.Infra.Modules +import GF.Grammar.PrGrammar +import qualified GF.Grammar.Compute as Co +import qualified GF.Infra.Ident as I +import qualified GF.Compile.GrammarToCanon as GC +import qualified GF.Canon.CanonToGrammar as CG +import qualified GF.Canon.MkGFC as MC -import Editing +import GF.UseGrammar.Editing ----import GrammarToXML @@ -63,13 +63,13 @@ import Editing import Arch (myStdGen) -import UTF8 -import Operations -import UseIO -import Zipper +import GF.Text.UTF8 +import GF.Data.Operations +import GF.Infra.UseIO +import GF.Data.Zipper -import List (nub) -import Monad (liftM) +import Data.List (nub) +import Control.Monad (liftM) import System (system) type GFGrammar = StateGrammar diff --git a/src/GF/API/BatchTranslate.hs b/src/GF/API/BatchTranslate.hs index 60a098d2b..c1b124526 100644 --- a/src/GF/API/BatchTranslate.hs +++ b/src/GF/API/BatchTranslate.hs @@ -5,16 +5,16 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:06 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:21:05 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- translate OCL, etc, files in batch mode ----------------------------------------------------------------------------- -module BatchTranslate (translate) where +module GF.API.BatchTranslate (translate) where -import API +import GF.API import GetMyTree (file2tree) translate :: FilePath -> FilePath -> IO () @@ -40,4 +40,4 @@ It seems we should add open ParadigmsX, ResourceExtX, PredicationX --} \ No newline at end of file +-} diff --git a/src/GF/API/GrammarToHaskell.hs b/src/GF/API/GrammarToHaskell.hs index 5be778662..602df64a1 100644 --- a/src/GF/API/GrammarToHaskell.hs +++ b/src/GF/API/GrammarToHaskell.hs @@ -5,22 +5,22 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:06 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:21:06 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- to write a GF abstract grammar into a Haskell module with translations from -- data objects into GF trees. Example: GSyntax for Agda. -- AR 11/11/1999 -- 7/12/2000 -- 18/5/2004 ----------------------------------------------------------------------------- -module GrammarToHaskell (grammar2haskell) where +module GF.API.GrammarToHaskell (grammar2haskell) where -import qualified GFC -import Macros +import qualified GF.Canon.GFC as GFC +import GF.Grammar.Macros -import Modules -import Operations +import GF.Infra.Modules +import GF.Data.Operations -- | the main function grammar2haskell :: GFC.CanonGrammar -> String diff --git a/src/GF/API/IOGrammar.hs b/src/GF/API/IOGrammar.hs index 8a521cc67..c3f9e603b 100644 --- a/src/GF/API/IOGrammar.hs +++ b/src/GF/API/IOGrammar.hs @@ -5,31 +5,31 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/14 17:40:10 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.16 $ +-- > CVS $Date: 2005/04/21 16:21:06 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.17 $ -- -- for reading grammars and terms from strings and files ----------------------------------------------------------------------------- -module IOGrammar (shellStateFromFiles, +module GF.API.IOGrammar (shellStateFromFiles, getShellStateFromFiles) where -import Abstract -import qualified GFC -import PGrammar -import TypeCheck -import Compile -import ShellState +import GF.Grammar.Abstract +import qualified GF.Canon.GFC as GFC +import GF.Compile.PGrammar +import GF.Grammar.TypeCheck +import GF.Compile.Compile +import GF.Compile.ShellState -import Modules -import ReadFiles (isOldFile) -import Option -import Operations -import UseIO +import GF.Infra.Modules +import GF.Infra.ReadFiles (isOldFile) +import GF.Infra.Option +import GF.Data.Operations +import GF.Infra.UseIO import Arch -import Monad (liftM) +import Control.Monad (liftM) -- | a heuristic way of renaming constants is used string2absTerm :: String -> String -> Term diff --git a/src/GF/API/MyParser.hs b/src/GF/API/MyParser.hs index 447f5eb5f..c926fe865 100644 --- a/src/GF/API/MyParser.hs +++ b/src/GF/API/MyParser.hs @@ -5,19 +5,19 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:06 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:21:07 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- template to define your own parser (obsolete?) ----------------------------------------------------------------------------- -module MyParser (myParser) where +module GF.API.MyParser (myParser) where -import ShellState -import CFIdent -import CF -import Operations +import GF.Compile.ShellState +import GF.CF.CFIdent +import GF.CF.CF +import GF.Data.Operations -- type CFParser = [CFTok] -> ([(CFTree,[CFTok])],String) diff --git a/src/GF/CF/CF.hs b/src/GF/CF/CF.hs index 5c126ef35..9233e905a 100644 --- a/src/GF/CF/CF.hs +++ b/src/GF/CF/CF.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:07 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:21:07 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- context-free grammars. AR 15\/12\/1999 -- 30\/3\/2000 -- 2\/6\/2001 -- 3\/12\/2001 ----------------------------------------------------------------------------- -module CF (-- * Types +module GF.CF.CF (-- * Types CF(..), CFRule, CFRuleGroup, CFItem(..), CFTree(..), CFPredef, CFParser, RegExp(..), CFWord, @@ -34,13 +34,13 @@ module CF (-- * Types isCircularCF, predefRules ) where -import Operations -import Str -import AbsGFC -import GFC -import CFIdent -import List (nub,nubBy) -import Char (isUpper, isLower, toUpper, toLower) +import GF.Data.Operations +import GF.Data.Str +import GF.Canon.AbsGFC +import GF.Canon.GFC +import GF.CF.CFIdent +import Data.List (nub,nubBy) +import Data.Char (isUpper, isLower, toUpper, toLower) -- CF grammar data types diff --git a/src/GF/CF/CFIdent.hs b/src/GF/CF/CFIdent.hs index 1d9fcd24a..30b9f857d 100644 --- a/src/GF/CF/CFIdent.hs +++ b/src/GF/CF/CFIdent.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:45 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.11 $ +-- > CVS $Date: 2005/04/21 16:21:08 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.12 $ -- -- symbols (categories, functions) for context-free grammars. ----------------------------------------------------------------------------- -module CFIdent (-- * Tokens and categories +module GF.CF.CFIdent (-- * Tokens and categories CFTok(..), CFCat(..), tS, tC, tL, tI, tV, tM, tInt, prCFTok, @@ -31,15 +31,15 @@ module CFIdent (-- * Tokens and categories compatToks, compatTok, compatCFFun, compatCF ) where -import Operations -import GFC -import Ident -import Values (cPredefAbs) -import AbsGFC -import Macros (ident2label) -import PrGrammar -import Str -import Char (toLower, toUpper) +import GF.Data.Operations +import GF.Canon.GFC +import GF.Infra.Ident +import GF.Grammar.Values (cPredefAbs) +import GF.Canon.AbsGFC +import GF.Grammar.Macros (ident2label) +import GF.Grammar.PrGrammar +import GF.Data.Str +import Data.Char (toLower, toUpper) -- | this type should be abstract data CFTok = diff --git a/src/GF/CF/CFtoGrammar.hs b/src/GF/CF/CFtoGrammar.hs index 4670a6b80..5e73aec31 100644 --- a/src/GF/CF/CFtoGrammar.hs +++ b/src/GF/CF/CFtoGrammar.hs @@ -5,29 +5,29 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/17 19:48:34 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:21:09 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- 26\/1\/2000 -- 18\/4 -- 24\/3\/2004 ----------------------------------------------------------------------------- -module CFtoGrammar (cf2grammar) where +module GF.CF.CFtoGrammar (cf2grammar) where -import Ident -import Grammar -import qualified AbsGF as A -import qualified GrammarToSource as S -import Macros +import GF.Infra.Ident +import GF.Grammar.Grammar +import qualified GF.Source.AbsGF as A +import qualified GF.Source.GrammarToSource as S +import GF.Grammar.Macros -import CF -import CFIdent -import PPrCF +import GF.CF.CF +import GF.CF.CFIdent +import GF.CF.PPrCF -import Operations +import GF.Data.Operations -import List (nub) -import Char (isSpace) +import Data.List (nub) +import Data.Char (isSpace) cf2grammar :: CF -> [A.TopDef] cf2grammar cf = concatMap S.trAnyDef (abs ++ conc) where diff --git a/src/GF/CF/CFtoSRG.hs b/src/GF/CF/CFtoSRG.hs index 9fe35b3ab..290452ed1 100644 --- a/src/GF/CF/CFtoSRG.hs +++ b/src/GF/CF/CFtoSRG.hs @@ -5,23 +5,23 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:07 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:21:10 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- This module prints a CF as a SRG (Speech Recognition Grammar). -- Created : 21 January, 2001. -- Modified : 16 April, 2004 by Aarne Ranta for GF 2. ----------------------------------------------------------------------------- -module CFtoSRG (prSRG) where +module GF.CF.CFtoSRG (prSRG) where -import Operations -import CF -import CFIdent +import GF.Data.Operations +import GF.CF.CF +import GF.CF.CFIdent ---import UseGrammar -import PPrCF -import List (intersperse,nub) +import GF.CF.PPrCF +import Data.List (intersperse,nub) header :: String header = unlines ["#ABNF 1.0 ISO-8859-1;\n", diff --git a/src/GF/CF/CanonToCF.hs b/src/GF/CF/CanonToCF.hs index 1c88e39b3..6c00da042 100644 --- a/src/GF/CF/CanonToCF.hs +++ b/src/GF/CF/CanonToCF.hs @@ -5,33 +5,33 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/29 11:17:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.12 $ +-- > CVS $Date: 2005/04/21 16:21:11 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.13 $ -- -- AR 27\/1\/2000 -- 3\/12\/2001 -- 8\/6\/2003 ----------------------------------------------------------------------------- -module CanonToCF (canon2cf) where +module GF.CF.CanonToCF (canon2cf) where import GF.System.Tracing -- peb 8/6-04 -import Operations -import Option -import Ident -import AbsGFC -import LookAbs (allBindCatsOf) -import GFC -import Values (isPredefCat,cPredefAbs) -import PrGrammar -import CMacros -import qualified Modules as M -import CF -import CFIdent -import Morphology -import Trie2 -import List (nub,partition) -import Monad +import GF.Data.Operations +import GF.Infra.Option +import GF.Infra.Ident +import GF.Canon.AbsGFC +import GF.Grammar.LookAbs (allBindCatsOf) +import GF.Canon.GFC +import GF.Grammar.Values (isPredefCat,cPredefAbs) +import GF.Grammar.PrGrammar +import GF.Canon.CMacros +import qualified GF.Infra.Modules as M +import GF.CF.CF +import GF.CF.CFIdent +import GF.UseGrammar.Morphology +import GF.Data.Trie2 +import Data.List (nub,partition) +import Control.Monad -- | The main function: for a given cnc module 'm', build the CF grammar with all the -- rules coming from modules that 'm' extends. The categories are qualified by diff --git a/src/GF/CF/ChartParser.hs b/src/GF/CF/ChartParser.hs index fb7f91ec0..740c4d787 100644 --- a/src/GF/CF/ChartParser.hs +++ b/src/GF/CF/ChartParser.hs @@ -5,29 +5,29 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/16 05:40:50 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.9 $ +-- > CVS $Date: 2005/04/21 16:21:12 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.10 $ -- -- Bottom-up Kilbury chart parser from "Pure Functional Parsing", chapter 5. -- OBSOLETE -- should use new MCFG parsers instead ----------------------------------------------------------------------------- -module ChartParser (chartParser) where +module GF.CF.ChartParser (chartParser) where -- import Tracing -- import PrintParser -- import PrintSimplifiedTerm -import Operations -import CF -import CFIdent -import PPrCF (prCFItem) +import GF.Data.Operations +import GF.CF.CF +import GF.CF.CFIdent +import GF.CF.PPrCF (prCFItem) -import OrdSet -import OrdMap2 +import GF.Data.OrdSet +import GF.Data.OrdMap2 -import List (groupBy) +import Data.List (groupBy) type Token = CFTok type Name = CFFun diff --git a/src/GF/CF/EBNF.hs b/src/GF/CF/EBNF.hs index 773a2117d..f091d19cb 100644 --- a/src/GF/CF/EBNF.hs +++ b/src/GF/CF/EBNF.hs @@ -5,26 +5,26 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:07 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:21:13 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module EBNF (pEBNFasGrammar) where +module GF.CF.EBNF (pEBNFasGrammar) where -import Operations -import Parsers -import Comments -import CF -import CFIdent -import Grammar -import PrGrammar -import CFtoGrammar -import qualified AbsGF as A +import GF.Data.Operations +import GF.Data.Parsers +import GF.Infra.Comments +import GF.CF.CF +import GF.CF.CFIdent +import GF.Grammar.Grammar +import GF.Grammar.PrGrammar +import GF.CF.CFtoGrammar +import qualified GF.Source.AbsGF as A -import List (nub, partition) +import Data.List (nub, partition) -- AR 18/4/2000 - 31/3/2004 diff --git a/src/GF/CF/PPrCF.hs b/src/GF/CF/PPrCF.hs index fcfeeb61b..32c077c45 100644 --- a/src/GF/CF/PPrCF.hs +++ b/src/GF/CF/PPrCF.hs @@ -5,24 +5,24 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/17 19:48:34 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.10 $ +-- > CVS $Date: 2005/04/21 16:21:13 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.11 $ -- -- printing and parsing CF grammars, rules, and trees AR 26/1/2000 -- 9/6/2003 -- -- use the Print class instead! ----------------------------------------------------------------------------- -module PPrCF (prCF, prCFTree, prCFRule, prCFFun, prCFCat, prCFItem, prRegExp, pCF) where +module GF.CF.PPrCF (prCF, prCFTree, prCFRule, prCFFun, prCFCat, prCFItem, prRegExp, pCF) where -import Operations -import CF -import CFIdent -import AbsGFC -import PrGrammar +import GF.Data.Operations +import GF.CF.CF +import GF.CF.CFIdent +import GF.Canon.AbsGFC +import GF.Grammar.PrGrammar -import Char +import Data.Char prCF :: CF -> String prCF = unlines . (map prCFRule) . rulesOfCF -- hiding the literal recogn function diff --git a/src/GF/CF/PrLBNF.hs b/src/GF/CF/PrLBNF.hs index 2079c4607..2b655a820 100644 --- a/src/GF/CF/PrLBNF.hs +++ b/src/GF/CF/PrLBNF.hs @@ -5,31 +5,31 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/12 13:01:48 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.9 $ +-- > CVS $Date: 2005/04/21 16:21:14 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.10 $ -- -- Printing CF grammars generated from GF as LBNF grammar for BNFC. -- AR 26/1/2000 -- 9/6/2003 (PPrCF) -- 8/11/2003 -- 27/9/2004. -- With primitive error messaging, by rules and rule tails commented out ----------------------------------------------------------------------------- -module PrLBNF (prLBNF,prBNF) where +module GF.CF.PrLBNF (prLBNF,prBNF) where -import CF -import CFIdent -import AbsGFC -import Ident -import PrGrammar -import ShellState -import GFC -import Look +import GF.CF.CF +import GF.CF.CFIdent +import GF.Canon.AbsGFC +import GF.Infra.Ident +import GF.Grammar.PrGrammar +import GF.Compile.ShellState +import GF.Canon.GFC +import GF.Canon.Look -import Operations -import Modules +import GF.Data.Operations +import GF.Infra.Modules -import Char -import List (nub) +import Data.Char +import Data.List (nub) prLBNF :: Bool -> StateGrammar -> String prLBNF new gr = unlines $ pragmas ++ (map (prCFRule cs) rules') diff --git a/src/GF/CF/Profile.hs b/src/GF/CF/Profile.hs index 12aa5c385..e573bec78 100644 --- a/src/GF/CF/Profile.hs +++ b/src/GF/CF/Profile.hs @@ -5,30 +5,30 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:08 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:21:14 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- restoring parse trees for discontinuous constituents, bindings, etc. AR 25/1/2001 -- revised 8/4/2002 for the new profile structure ----------------------------------------------------------------------------- -module Profile (postParse) where +module GF.CF.Profile (postParse) where -import AbsGFC -import GFC -import qualified Ident as I -import CMacros +import GF.Canon.AbsGFC +import GF.Canon.GFC +import qualified GF.Infra.Ident as I +import GF.Canon.CMacros ---import MMacros -import CF -import CFIdent -import PPrCF -- for error msg -import PrGrammar +import GF.CF.CF +import GF.CF.CFIdent +import GF.CF.PPrCF -- for error msg +import GF.Grammar.PrGrammar -import Operations +import GF.Data.Operations -import Monad -import List (nub) +import Control.Monad +import Data.List (nub) -- | the job is done in two passes: -- diff --git a/src/GF/CFGM/AbsCFG.hs b/src/GF/CFGM/AbsCFG.hs index c605ce212..be50d204b 100644 --- a/src/GF/CFGM/AbsCFG.hs +++ b/src/GF/CFGM/AbsCFG.hs @@ -1,4 +1,4 @@ -module AbsCFG where +module GF.CFGM.AbsCFG where -- Haskell module generated by the BNF converter diff --git a/src/GF/CFGM/LexCFG.hs b/src/GF/CFGM/LexCFG.hs index b06420998..881bf51b9 100644 --- a/src/GF/CFGM/LexCFG.hs +++ b/src/GF/CFGM/LexCFG.hs @@ -1,8 +1,8 @@ {-# OPTIONS -fglasgow-exts -cpp #-} {-# LINE 3 "LexCFG.x" #-} -module LexCFG where +module GF.CFGM.LexCFG where -import ErrM +import GF.Data.ErrM #if __GLASGOW_HASKELL__ >= 503 @@ -10,8 +10,8 @@ import Data.Array import Data.Char (ord) import Data.Array.Base (unsafeAt) #else -import Array -import Char (ord) +import Data.Array +import Data.Char (ord) #endif #if __GLASGOW_HASKELL__ >= 503 import GHC.Exts diff --git a/src/GF/CFGM/ParCFG.hs b/src/GF/CFGM/ParCFG.hs index e41aefb98..e95f28d46 100644 --- a/src/GF/CFGM/ParCFG.hs +++ b/src/GF/CFGM/ParCFG.hs @@ -1,9 +1,9 @@ {-# OPTIONS -fglasgow-exts -cpp #-} -module ParCFG where -import AbsCFG -import LexCFG -import ErrM -import Array +module GF.CFGM.ParCFG where +import GF.CFGM.AbsCFG +import GF.CFGM.LexCFG +import GF.Data.ErrM +import Data.Array #if __GLASGOW_HASKELL__ >= 503 import GHC.Exts #else @@ -476,7 +476,7 @@ happyError ts = myLexer = tokens {-# LINE 1 "GenericTemplate.hs" #-} --- $Id: ParCFG.hs,v 1.6 2005/03/21 14:27:06 bringert Exp $ +-- $Id: ParCFG.hs,v 1.7 2005/04/21 16:21:17 bringert Exp $ diff --git a/src/GF/CFGM/PrintCFG.hs b/src/GF/CFGM/PrintCFG.hs index 7310da562..e81be449f 100644 --- a/src/GF/CFGM/PrintCFG.hs +++ b/src/GF/CFGM/PrintCFG.hs @@ -1,9 +1,9 @@ -module PrintCFG where +module GF.CFGM.PrintCFG where -- pretty-printer generated by the BNF converter -import AbsCFG -import Char +import GF.CFGM.AbsCFG +import Data.Char -- the top-level printing method printTree :: Print a => a -> String diff --git a/src/GF/CFGM/PrintCFGrammar.hs b/src/GF/CFGM/PrintCFGrammar.hs index 005da1404..504c21e6c 100644 --- a/src/GF/CFGM/PrintCFGrammar.hs +++ b/src/GF/CFGM/PrintCFGrammar.hs @@ -5,33 +5,33 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/16 05:40:50 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.16 $ +-- > CVS $Date: 2005/04/21 16:21:19 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.17 $ -- -- Handles printing a CFGrammar in CFGM format. ----------------------------------------------------------------------------- -module PrintCFGrammar (prCanonAsCFGM) where +module GF.CFGM.PrintCFGrammar (prCanonAsCFGM) where -import AbsGFC -import qualified PrintCFG -import Ident -import GFC -import Modules +import GF.Canon.AbsGFC +import qualified GF.CFGM.PrintCFG as PrintCFG +import GF.Infra.Ident +import GF.Canon.GFC +import GF.Infra.Modules import qualified GF.Conversion.GFC as Cnv import GF.Infra.Print (prt) import GF.Formalism.CFG (CFRule(..)) import qualified GF.Conversion.Types as GT -import qualified AbsCFG +import qualified GF.CFGM.AbsCFG as AbsCFG import GF.Formalism.Utilities (Symbol(..)) -import ErrM -import qualified Option +import GF.Data.ErrM +import qualified GF.Infra.Option as Option -import List (intersperse) -import Maybe (listToMaybe, maybe) +import Data.List (intersperse) +import Data.Maybe (listToMaybe, maybe) -- | FIXME: should add an Options argument, -- to be able to decide which CFG conversion one wants to use diff --git a/src/GF/Canon/AbsGFC.hs b/src/GF/Canon/AbsGFC.hs index 058b4c97b..918338b18 100644 --- a/src/GF/Canon/AbsGFC.hs +++ b/src/GF/Canon/AbsGFC.hs @@ -1,7 +1,7 @@ -module AbsGFC where +module GF.Canon.AbsGFC where -import Ident --H +import GF.Infra.Ident --H -- Haskell module generated by the BNF converter, except --H diff --git a/src/GF/Canon/CMacros.hs b/src/GF/Canon/CMacros.hs index a097c4926..2c1e6f639 100644 --- a/src/GF/Canon/CMacros.hs +++ b/src/GF/Canon/CMacros.hs @@ -5,30 +5,30 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/08 15:31:22 $ +-- > CVS $Date: 2005/04/21 16:21:21 $ -- > CVS $Author: bringert $ --- > CVS $Revision: 1.23 $ +-- > CVS $Revision: 1.24 $ -- -- Macros for building and analysing terms in GFC concrete syntax. -- -- macros for concrete syntax in GFC that do not need lookup in a grammar ----------------------------------------------------------------------------- -module CMacros where +module GF.Canon.CMacros where -import Ident -import AbsGFC -import GFC -import qualified Ident as A ---- no need to qualif? 21/9 -import qualified Values as V -import qualified MMacros as M -import PrGrammar -import Str +import GF.Infra.Ident +import GF.Canon.AbsGFC +import GF.Canon.GFC +import qualified GF.Infra.Ident as A ---- no need to qualif? 21/9 +import qualified GF.Grammar.Values as V +import qualified GF.Grammar.MMacros as M +import GF.Grammar.PrGrammar +import GF.Data.Str -import Operations +import GF.Data.Operations -import Char -import Monad +import Data.Char +import Control.Monad -- | how to mark subtrees, dep. on node, position, whether focus type JustMarker = V.TrNode -> [Int] -> Bool -> (String, String) diff --git a/src/GF/Canon/CanonToGrammar.hs b/src/GF/Canon/CanonToGrammar.hs index 4ed1bd9be..b26aeca26 100644 --- a/src/GF/Canon/CanonToGrammar.hs +++ b/src/GF/Canon/CanonToGrammar.hs @@ -5,28 +5,28 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:06 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.12 $ +-- > CVS $Date: 2005/04/21 16:21:21 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.13 $ -- -- a decompiler. AR 12/6/2003 -- 19/4/2004 ----------------------------------------------------------------------------- -module CanonToGrammar (canon2sourceGrammar, canon2sourceModule, redFlag) where +module GF.Canon.CanonToGrammar (canon2sourceGrammar, canon2sourceModule, redFlag) where -import AbsGFC -import GFC -import MkGFC +import GF.Canon.AbsGFC +import GF.Canon.GFC +import GF.Canon.MkGFC ---import CMacros -import qualified Modules as M -import qualified Option as O -import qualified Grammar as G -import qualified Macros as F +import qualified GF.Infra.Modules as M +import qualified GF.Infra.Option as O +import qualified GF.Grammar.Grammar as G +import qualified GF.Grammar.Macros as F -import Ident -import Operations +import GF.Infra.Ident +import GF.Data.Operations -import Monad +import Control.Monad canon2sourceGrammar :: CanonGrammar -> Err G.SourceGrammar canon2sourceGrammar gr = do diff --git a/src/GF/Canon/GFC.hs b/src/GF/Canon/GFC.hs index 6e8648045..ae34dc249 100644 --- a/src/GF/Canon/GFC.hs +++ b/src/GF/Canon/GFC.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 20:09:19 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.11 $ +-- > CVS $Date: 2005/04/21 16:21:22 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.12 $ -- -- canonical GF. AR 10\/9\/2002 -- 9\/5\/2003 -- 21\/9 ----------------------------------------------------------------------------- -module GFC (Context, +module GF.Canon.GFC (Context, CanonGrammar, CanonModInfo, CanonModule, @@ -24,17 +24,17 @@ module GFC (Context, setFlag ) where -import AbsGFC -import PrintGFC -import qualified Abstract as A +import GF.Canon.AbsGFC +import GF.Canon.PrintGFC +import qualified GF.Grammar.Abstract as A -import Ident -import Option -import Zipper -import Operations -import qualified Modules as M +import GF.Infra.Ident +import GF.Infra.Option +import GF.Data.Zipper +import GF.Data.Operations +import qualified GF.Infra.Modules as M -import Char +import Data.Char import Control.Arrow (first) type Context = [(Ident,Exp)] diff --git a/src/GF/Canon/GetGFC.hs b/src/GF/Canon/GetGFC.hs index 4c2a29c98..de476211f 100644 --- a/src/GF/Canon/GetGFC.hs +++ b/src/GF/Canon/GetGFC.hs @@ -5,22 +5,22 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:06 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:21:23 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module GetGFC (getCanonModule, getCanonGrammar) where +module GF.Canon.GetGFC (getCanonModule, getCanonGrammar) where -import Operations -import ParGFC -import GFC -import MkGFC -import Modules -import GetGrammar (err2err) --- -import UseIO +import GF.Data.Operations +import GF.Canon.ParGFC +import GF.Canon.GFC +import GF.Canon.MkGFC +import GF.Infra.Modules +import GF.Compile.GetGrammar (err2err) --- +import GF.Infra.UseIO getCanonModule :: FilePath -> IOE CanonModule getCanonModule file = do diff --git a/src/GF/Canon/LexGFC.hs b/src/GF/Canon/LexGFC.hs index b181a18ec..3f6473f2e 100644 --- a/src/GF/Canon/LexGFC.hs +++ b/src/GF/Canon/LexGFC.hs @@ -1,16 +1,16 @@ {-# OPTIONS -cpp #-} {-# LINE 3 "LexGFC.x" #-} -module LexGFC where +module GF.Canon.LexGFC where -import ErrM +import GF.Data.ErrM #if __GLASGOW_HASKELL__ >= 503 import Data.Array import Data.Char (ord) import Data.Array.Base (unsafeAt) #else -import Array -import Char (ord) +import Data.Array +import Data.Char (ord) #endif alex_base :: Array Int Int alex_base = listArray (0,14) [1,57,66,0,9,29,11,32,154,362,0,277,485,211,51] diff --git a/src/GF/Canon/Look.hs b/src/GF/Canon/Look.hs index 442bcf0f3..410010b53 100644 --- a/src/GF/Canon/Look.hs +++ b/src/GF/Canon/Look.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:06 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.11 $ +-- > CVS $Date: 2005/04/21 16:21:25 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.12 $ -- -- lookup in GFC. AR 2003 ----------------------------------------------------------------------------- -module Look (lookupCncInfo, +module GF.Canon.Look (lookupCncInfo, lookupLin, lookupLincat, lookupPrintname, @@ -24,20 +24,20 @@ module Look (lookupCncInfo, ccompute ) where -import AbsGFC -import GFC -import PrGrammar -import CMacros +import GF.Canon.AbsGFC +import GF.Canon.GFC +import GF.Grammar.PrGrammar +import GF.Canon.CMacros ----import Values -import MMacros -import qualified Modules as M -import qualified CanonToGrammar as CG +import GF.Grammar.MMacros +import qualified GF.Infra.Modules as M +import qualified GF.Canon.CanonToGrammar as CG -import Operations -import Option +import GF.Data.Operations +import GF.Infra.Option -import Monad -import List +import Control.Monad +import Data.List -- linearization lookup diff --git a/src/GF/Canon/MkGFC.hs b/src/GF/Canon/MkGFC.hs index 93813d1a2..382eaf567 100644 --- a/src/GF/Canon/MkGFC.hs +++ b/src/GF/Canon/MkGFC.hs @@ -5,26 +5,26 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:07 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.11 $ +-- > CVS $Date: 2005/04/21 16:21:26 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.12 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module MkGFC (prCanonModInfo, prCanon, prCanonMGr, +module GF.Canon.MkGFC (prCanonModInfo, prCanon, prCanonMGr, canon2grammar, grammar2canon, info2mod, trExp, rtExp, rtQIdent) where -import GFC -import AbsGFC -import qualified Abstract as A -import PrGrammar +import GF.Canon.GFC +import GF.Canon.AbsGFC +import qualified GF.Grammar.Abstract as A +import GF.Grammar.PrGrammar -import Ident -import Operations -import qualified Modules as M +import GF.Infra.Ident +import GF.Data.Operations +import qualified GF.Infra.Modules as M prCanonModInfo :: CanonModule -> String prCanonModInfo = prt . info2mod diff --git a/src/GF/Canon/ParGFC.hs b/src/GF/Canon/ParGFC.hs index c0197435f..84e93a327 100644 --- a/src/GF/Canon/ParGFC.hs +++ b/src/GF/Canon/ParGFC.hs @@ -1,12 +1,12 @@ {-# OPTIONS -fglasgow-exts -cpp #-} -- parser produced by Happy Version 1.13 -module ParGFC where -import AbsGFC -import LexGFC -import ErrM -import Ident --H -import Array +module GF.Canon.ParGFC where +import GF.Canon.AbsGFC +import GF.Canon.LexGFC +import GF.Data.ErrM +import GF.Infra.Ident --H +import Data.Array #if __GLASGOW_HASKELL__ >= 503 import GHC.Exts #else @@ -1767,7 +1767,7 @@ happyError ts = myLexer = tokens {-# LINE 1 "GenericTemplate.hs" #-} --- $Id: ParGFC.hs,v 1.8 2005/02/04 14:17:06 bringert Exp $ +-- $Id: ParGFC.hs,v 1.9 2005/04/21 16:21:27 bringert Exp $ diff --git a/src/GF/Canon/PrExp.hs b/src/GF/Canon/PrExp.hs index 04a607cc1..6202a760e 100644 --- a/src/GF/Canon/PrExp.hs +++ b/src/GF/Canon/PrExp.hs @@ -5,19 +5,19 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:07 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:21:28 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- print trees without qualifications ----------------------------------------------------------------------------- -module PrExp (prExp) where +module GF.Canon.PrExp (prExp) where -import AbsGFC -import GFC +import GF.Canon.AbsGFC +import GF.Canon.GFC -import Operations +import GF.Data.Operations prExp :: Exp -> String prExp e = case e of diff --git a/src/GF/Canon/PrintGFC.hs b/src/GF/Canon/PrintGFC.hs index 87b4bea31..e2c5c44a4 100644 --- a/src/GF/Canon/PrintGFC.hs +++ b/src/GF/Canon/PrintGFC.hs @@ -1,11 +1,11 @@ -module PrintGFC where +module GF.Canon.PrintGFC where -- pretty-printer generated by the BNF converter, except handhacked spacing --H -import Ident --H -import AbsGFC -import Char +import GF.Infra.Ident --H +import GF.Canon.AbsGFC +import Data.Char -- the top-level printing method printTree :: Print a => a -> String diff --git a/src/GF/Canon/Share.hs b/src/GF/Canon/Share.hs index 26596a695..0cad8bdb1 100644 --- a/src/GF/Canon/Share.hs +++ b/src/GF/Canon/Share.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:07 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.10 $ +-- > CVS $Date: 2005/04/21 16:21:30 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.11 $ -- -- Optimizations on GFC code: sharing, parametrization, value sets. -- @@ -15,16 +15,16 @@ -- following advice of Josef Svenningsson ----------------------------------------------------------------------------- -module Share (shareModule, OptSpec, shareOpt, paramOpt, valOpt, allOpt) where +module GF.Canon.Share (shareModule, OptSpec, shareOpt, paramOpt, valOpt, allOpt) where -import AbsGFC -import Ident -import GFC -import qualified CMacros as C -import PrGrammar (prt) -import Operations -import List -import qualified Modules as M +import GF.Canon.AbsGFC +import GF.Infra.Ident +import GF.Canon.GFC +import qualified GF.Canon.CMacros as C +import GF.Grammar.PrGrammar (prt) +import GF.Data.Operations +import Data.List +import qualified GF.Infra.Modules as M type OptSpec = [Integer] --- diff --git a/src/GF/Canon/SkelGFC.hs b/src/GF/Canon/SkelGFC.hs index 9f5729418..fd3fc9086 100644 --- a/src/GF/Canon/SkelGFC.hs +++ b/src/GF/Canon/SkelGFC.hs @@ -1,10 +1,10 @@ -module SkelGFC where +module GF.Canon.SkelGFC where -- Haskell module generated by the BNF converter -import AbsGFC -import ErrM +import GF.Canon.AbsGFC +import GF.Data.ErrM type Result = Err String failure :: Show a => a -> Result diff --git a/src/GF/Canon/TestGFC.hs b/src/GF/Canon/TestGFC.hs index 9dc2f3e88..7af035f69 100644 --- a/src/GF/Canon/TestGFC.hs +++ b/src/GF/Canon/TestGFC.hs @@ -1,19 +1,19 @@ -- automatically generated by BNF Converter -module Main where +module GF.Canon.TestGFC where -import IO ( stdin, hGetContents ) +import System.IO ( stdin, hGetContents ) import System ( getArgs, getProgName ) -import LexGFC -import ParGFC -import SkelGFC -import PrintGFC -import AbsGFC +import GF.Canon.LexGFC +import GF.Canon.ParGFC +import GF.Canon.SkelGFC +import GF.Canon.PrintGFC +import GF.Canon.AbsGFC -import ErrM +import GF.Data.ErrM type ParseFun a = [Token] -> Err a diff --git a/src/GF/Canon/Unlex.hs b/src/GF/Canon/Unlex.hs index 2a9fe118f..dd93390e2 100644 --- a/src/GF/Canon/Unlex.hs +++ b/src/GF/Canon/Unlex.hs @@ -5,20 +5,20 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:07 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:21:32 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- elementary text postprocessing. AR 21/11/2001 ----------------------------------------------------------------------------- -module Unlex (formatAsText, unlex, performBinds) where +module GF.Canon.Unlex (formatAsText, unlex, performBinds) where -import Operations -import Str +import GF.Data.Operations +import GF.Data.Str -import Char -import List (isPrefixOf) +import Data.Char +import Data.List (isPrefixOf) formatAsText :: String -> String formatAsText = unwords . format . cap . words where diff --git a/src/GF/Compile/BackOpt.hs b/src/GF/Compile/BackOpt.hs index ed8d2b177..8356f2ba2 100644 --- a/src/GF/Compile/BackOpt.hs +++ b/src/GF/Compile/BackOpt.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:08 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:21:33 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- Optimizations on GF source code: sharing, parametrization, value sets. -- @@ -15,15 +15,15 @@ -- following advice of Josef Svenningsson ----------------------------------------------------------------------------- -module BackOpt (shareModule, OptSpec, shareOpt, paramOpt, valOpt, allOpt) where +module GF.Compile.BackOpt (shareModule, OptSpec, shareOpt, paramOpt, valOpt, allOpt) where -import Grammar -import Ident -import qualified Macros as C -import PrGrammar (prt) -import Operations -import List -import qualified Modules as M +import GF.Grammar.Grammar +import GF.Infra.Ident +import qualified GF.Grammar.Macros as C +import GF.Grammar.PrGrammar (prt) +import GF.Data.Operations +import Data.List +import qualified GF.Infra.Modules as M type OptSpec = [Integer] --- diff --git a/src/GF/Compile/CheckGrammar.hs b/src/GF/Compile/CheckGrammar.hs index 0831c9834..9a3b706f2 100644 --- a/src/GF/Compile/CheckGrammar.hs +++ b/src/GF/Compile/CheckGrammar.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/11 15:37:20 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.22 $ +-- > CVS $Date: 2005/04/21 16:21:34 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.23 $ -- -- AR 4\/12\/1999 -- 1\/4\/2000 -- 8\/9\/2001 -- 15\/5\/2002 -- 27\/11\/2002 -- 18\/6\/2003 -- @@ -20,29 +20,29 @@ -- - tables are type-annotated ----------------------------------------------------------------------------- -module CheckGrammar (showCheckModule, justCheckLTerm) where +module GF.Compile.CheckGrammar (showCheckModule, justCheckLTerm) where -import Grammar -import Ident -import Modules -import Refresh ---- +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Infra.Modules +import GF.Grammar.Refresh ---- -import TypeCheck -import Values (cPredefAbs) --- +import GF.Grammar.TypeCheck +import GF.Grammar.Values (cPredefAbs) --- -import PrGrammar -import Lookup -import LookAbs -import Macros -import ReservedWords ---- -import PatternMatch -import AppPredefined +import GF.Grammar.PrGrammar +import GF.Grammar.Lookup +import GF.Grammar.LookAbs +import GF.Grammar.Macros +import GF.Grammar.ReservedWords ---- +import GF.Grammar.PatternMatch +import GF.Grammar.AppPredefined -import Operations -import CheckM +import GF.Data.Operations +import GF.Infra.CheckM -import List -import Monad +import Data.List +import Control.Monad showCheckModule :: [SourceModule] -> SourceModule -> Err ([SourceModule],String) showCheckModule mos m = do diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs index 82f9d12a6..451ee3880 100644 --- a/src/GF/Compile/Compile.hs +++ b/src/GF/Compile/Compile.hs @@ -5,51 +5,51 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/08 18:08:58 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.35 $ +-- > CVS $Date: 2005/04/21 16:21:35 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.36 $ -- -- The top-level compilation chain from source file to gfc\/gfr. ----------------------------------------------------------------------------- -module Compile (compileModule, compileEnvShSt, compileOne, +module GF.Compile.Compile (compileModule, compileEnvShSt, compileOne, CompileEnv, TimedCompileEnv ) where -import Grammar -import Ident -import Option -import PrGrammar -import Update -import Lookup -import Modules -import ReadFiles -import ShellState -import MkResource +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Infra.Option +import GF.Grammar.PrGrammar +import GF.Compile.Update +import GF.Grammar.Lookup +import GF.Infra.Modules +import GF.Infra.ReadFiles +import GF.Compile.ShellState +import GF.Compile.MkResource ---- import MkUnion -- the main compiler passes -import GetGrammar -import Extend -import Rebuild -import Rename -import Refresh -import CheckGrammar -import Optimize -import GrammarToCanon -import Share +import GF.Compile.GetGrammar +import GF.Compile.Extend +import GF.Compile.Rebuild +import GF.Compile.Rename +import GF.Grammar.Refresh +import GF.Compile.CheckGrammar +import GF.Compile.Optimize +import GF.Compile.GrammarToCanon +import GF.Canon.Share -import qualified CanonToGrammar as CG +import qualified GF.Canon.CanonToGrammar as CG -import qualified GFC -import qualified MkGFC -import GetGFC +import qualified GF.Canon.GFC as GFC +import qualified GF.Canon.MkGFC as MkGFC +import GF.Canon.GetGFC -import Operations -import UseIO +import GF.Data.Operations +import GF.Infra.UseIO import Arch -import Monad +import Control.Monad -- | environment variable for grammar search path gfGrammarPathVar = "GF_LIB_PATH" diff --git a/src/GF/Compile/Extend.hs b/src/GF/Compile/Extend.hs index d7ec35684..a412ab5c3 100644 --- a/src/GF/Compile/Extend.hs +++ b/src/GF/Compile/Extend.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:08 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.15 $ +-- > CVS $Date: 2005/04/21 16:21:36 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.16 $ -- -- AR 14\/5\/2003 -- 11\/11 -- @@ -15,18 +15,18 @@ -- extends a module symbol table by indirections to the module it extends ----------------------------------------------------------------------------- -module Extend (extendModule, extendMod +module GF.Compile.Extend (extendModule, extendMod ) where -import Grammar -import Ident -import PrGrammar -import Modules -import Update -import Macros -import Operations +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Grammar.PrGrammar +import GF.Infra.Modules +import GF.Compile.Update +import GF.Grammar.Macros +import GF.Data.Operations -import Monad +import Control.Monad extendModule :: [SourceModule] -> SourceModule -> Err SourceModule extendModule ms (name,mod) = case mod of diff --git a/src/GF/Compile/GetGrammar.hs b/src/GF/Compile/GetGrammar.hs index 7537ec88e..4e5328bf3 100644 --- a/src/GF/Compile/GetGrammar.hs +++ b/src/GF/Compile/GetGrammar.hs @@ -5,42 +5,42 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:08 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.14 $ +-- > CVS $Date: 2005/04/21 16:21:37 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.15 $ -- -- this module builds the internal GF grammar that is sent to the type checker ----------------------------------------------------------------------------- -module GetGrammar (getSourceModule, getOldGrammar, getCFGrammar, getEBNFGrammar, +module GF.Compile.GetGrammar (getSourceModule, getOldGrammar, getCFGrammar, getEBNFGrammar, err2err ) where -import Operations -import qualified ErrM as E ---- +import GF.Data.Operations +import qualified GF.Data.ErrM as E ---- -import UseIO -import Grammar -import Modules -import PrGrammar -import qualified AbsGF as A -import SourceToGrammar +import GF.Infra.UseIO +import GF.Grammar.Grammar +import GF.Infra.Modules +import GF.Grammar.PrGrammar +import qualified GF.Source.AbsGF as A +import GF.Source.SourceToGrammar ---- import Macros ---- import Rename -import Option +import GF.Infra.Option --- import Custom -import ParGF -import qualified LexGF as L +import GF.Source.ParGF +import qualified GF.Source.LexGF as L -import PPrCF -import CFtoGrammar -import EBNF +import GF.CF.PPrCF +import GF.CF.CFtoGrammar +import GF.CF.EBNF -import ReadFiles ---- +import GF.Infra.ReadFiles ---- -import Char (toUpper) -import List (nub) -import Monad (foldM) +import Data.Char (toUpper) +import Data.List (nub) +import Control.Monad (foldM) getSourceModule :: FilePath -> IOE SourceModule getSourceModule file = do diff --git a/src/GF/Compile/GrammarToCanon.hs b/src/GF/Compile/GrammarToCanon.hs index ca3235a66..a87b1f7e1 100644 --- a/src/GF/Compile/GrammarToCanon.hs +++ b/src/GF/Compile/GrammarToCanon.hs @@ -5,32 +5,32 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:08 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.16 $ +-- > CVS $Date: 2005/04/21 16:21:38 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.17 $ -- -- Code generator from optimized GF source code to GFC. ----------------------------------------------------------------------------- -module GrammarToCanon (showGFC, +module GF.Compile.GrammarToCanon (showGFC, redModInfo, redQIdent ) where -import Operations -import Zipper -import Option -import Grammar -import Ident -import PrGrammar -import Modules -import Macros -import qualified AbsGFC as G -import qualified GFC as C -import MkGFC +import GF.Data.Operations +import GF.Data.Zipper +import GF.Infra.Option +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Grammar.PrGrammar +import GF.Infra.Modules +import GF.Grammar.Macros +import qualified GF.Canon.AbsGFC as G +import qualified GF.Canon.GFC as C +import GF.Canon.MkGFC ---- import Alias -import qualified PrintGFC as P +import qualified GF.Canon.PrintGFC as P -import Monad +import Control.Monad -- compilation of optimized grammars to canonical GF. AR 5/10/2001 -- 12/5/2003 diff --git a/src/GF/Compile/MkResource.hs b/src/GF/Compile/MkResource.hs index 9e8baf9ef..c33455e1a 100644 --- a/src/GF/Compile/MkResource.hs +++ b/src/GF/Compile/MkResource.hs @@ -5,25 +5,25 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:08 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.11 $ +-- > CVS $Date: 2005/04/21 16:21:38 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.12 $ -- -- Compile a gfc module into a "reuse" gfr resource, interface, or instance. ----------------------------------------------------------------------------- -module MkResource (makeReuse) where +module GF.Compile.MkResource (makeReuse) where -import Grammar -import Ident -import Modules -import Macros -import Lockfield -import PrGrammar +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Infra.Modules +import GF.Grammar.Macros +import GF.Grammar.Lockfield +import GF.Grammar.PrGrammar -import Operations +import GF.Data.Operations -import Monad +import Control.Monad -- | extracting resource r from abstract + concrete syntax. -- AR 21\/8\/2002 -- 22\/6\/2003 for GF with modules diff --git a/src/GF/Compile/MkUnion.hs b/src/GF/Compile/MkUnion.hs index 83a1db627..b4b1f40c8 100644 --- a/src/GF/Compile/MkUnion.hs +++ b/src/GF/Compile/MkUnion.hs @@ -5,27 +5,27 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:09 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:21:39 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- building union of modules. -- AR 1\/3\/2004 --- OBSOLETE 15\/9\/2004 with multiple inheritance ----------------------------------------------------------------------------- -module MkUnion (makeUnion) where +module GF.Compile.MkUnion (makeUnion) where -import Grammar -import Ident -import Modules -import Macros -import PrGrammar +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Infra.Modules +import GF.Grammar.Macros +import GF.Grammar.PrGrammar -import Operations -import Option +import GF.Data.Operations +import GF.Infra.Option -import List -import Monad +import Data.List +import Control.Monad makeUnion :: SourceGrammar -> Ident -> ModuleType Ident -> [(Ident,[Ident])] -> Err SourceModule diff --git a/src/GF/Compile/ModDeps.hs b/src/GF/Compile/ModDeps.hs index 6e38d9e3b..287667ab5 100644 --- a/src/GF/Compile/ModDeps.hs +++ b/src/GF/Compile/ModDeps.hs @@ -5,33 +5,33 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/08 18:08:58 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.12 $ +-- > CVS $Date: 2005/04/21 16:21:40 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.13 $ -- -- Check correctness of module dependencies. Incomplete. -- -- AR 13\/5\/2003 ----------------------------------------------------------------------------- -module ModDeps (mkSourceGrammar, +module GF.Compile.ModDeps (mkSourceGrammar, moduleDeps, openInterfaces, requiredCanModules ) where -import Grammar -import Ident -import Option -import PrGrammar -import Update -import Lookup -import Modules +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Infra.Option +import GF.Grammar.PrGrammar +import GF.Compile.Update +import GF.Grammar.Lookup +import GF.Infra.Modules -import Operations +import GF.Data.Operations -import Monad -import List +import Control.Monad +import Data.List -- | to check uniqueness of module names and import names, the -- appropriateness of import and extend types, diff --git a/src/GF/Compile/NewRename.hs b/src/GF/Compile/NewRename.hs index 255728029..cec8ed24f 100644 --- a/src/GF/Compile/NewRename.hs +++ b/src/GF/Compile/NewRename.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/29 11:17:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:21:41 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- AR 14\/5\/2003 -- @@ -22,20 +22,20 @@ -- Hence we can proceed by @fold@ing "from left to right". ----------------------------------------------------------------------------- -module Rename (renameSourceTerm, renameModule) where +module GF.Compile.NewRename (renameSourceTerm, renameModule) where -import Grammar -import Values -import Modules -import Ident -import Macros -import PrGrammar -import AppPredefined -import Lookup -import Extend -import Operations +import GF.Grammar.Grammar +import GF.Grammar.Values +import GF.Infra.Modules +import GF.Infra.Ident +import GF.Grammar.Macros +import GF.Grammar.PrGrammar +import GF.Grammar.AppPredefined +import GF.Grammar.Lookup +import GF.Compile.Extend +import GF.Data.Operations -import Monad +import Control.Monad -- | this gives top-level access to renaming term input in the cc command renameSourceTerm :: SourceGrammar -> Ident -> Term -> Err Term diff --git a/src/GF/Compile/Optimize.hs b/src/GF/Compile/Optimize.hs index b342a5b3f..0dcb442ae 100644 --- a/src/GF/Compile/Optimize.hs +++ b/src/GF/Compile/Optimize.hs @@ -5,33 +5,33 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:09 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.13 $ +-- > CVS $Date: 2005/04/21 16:21:42 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.14 $ -- -- Top-level partial evaluation for GF source modules. ----------------------------------------------------------------------------- -module Optimize (optimizeModule) where +module GF.Compile.Optimize (optimizeModule) where -import Grammar -import Ident -import Modules -import PrGrammar -import Macros -import Lookup -import Refresh -import Compute -import BackOpt -import CheckGrammar -import Update +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Infra.Modules +import GF.Grammar.PrGrammar +import GF.Grammar.Macros +import GF.Grammar.Lookup +import GF.Grammar.Refresh +import GF.Grammar.Compute +import GF.Compile.BackOpt +import GF.Compile.CheckGrammar +import GF.Compile.Update -import Operations -import CheckM -import Option +import GF.Data.Operations +import GF.Infra.CheckM +import GF.Infra.Option -import Monad -import List +import Control.Monad +import Data.List -- | partial evaluation of concrete syntax. AR 6\/2001 -- 16\/5\/2003 -- 5\/2\/2005. -- only do this for resource: concrete is optimized in gfc form diff --git a/src/GF/Compile/PGrammar.hs b/src/GF/Compile/PGrammar.hs index 4381f4b2e..50446075d 100644 --- a/src/GF/Compile/PGrammar.hs +++ b/src/GF/Compile/PGrammar.hs @@ -5,30 +5,30 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:09 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:21:43 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module PGrammar (pTerm, pTrm, pTrms, +module GF.Compile.PGrammar (pTerm, pTrm, pTrms, pMeta, pzIdent, string2ident ) where ---import LexGF -import ParGF -import SourceToGrammar -import Grammar -import Ident -import qualified AbsGFC as A -import qualified GFC as G -import GetGrammar -import Macros -import MMacros +import GF.Source.ParGF +import GF.Source.SourceToGrammar +import GF.Grammar.Grammar +import GF.Infra.Ident +import qualified GF.Canon.AbsGFC as A +import qualified GF.Canon.GFC as G +import GF.Compile.GetGrammar +import GF.Grammar.Macros +import GF.Grammar.MMacros -import Operations +import GF.Data.Operations pTerm :: String -> Err Term pTerm s = do diff --git a/src/GF/Compile/PrOld.hs b/src/GF/Compile/PrOld.hs index 8c0132fe7..7aa0db623 100644 --- a/src/GF/Compile/PrOld.hs +++ b/src/GF/Compile/PrOld.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:09 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:21:44 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- a hack to print gf2 into gf1 readable files -- Works only for canonical grammars, printed into GFC. Otherwise we would have @@ -15,21 +15,21 @@ -- --- printnames are not preserved, nor are lindefs ----------------------------------------------------------------------------- -module PrOld (printGrammarOld, stripTerm) where +module GF.Compile.PrOld (printGrammarOld, stripTerm) where -import PrGrammar -import CanonToGrammar -import qualified GFC -import Grammar -import Ident -import Macros -import Modules -import qualified PrintGF as P -import GrammarToSource +import GF.Grammar.PrGrammar +import GF.Canon.CanonToGrammar +import qualified GF.Canon.GFC as GFC +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Grammar.Macros +import GF.Infra.Modules +import qualified GF.Source.PrintGF as P +import GF.Source.GrammarToSource -import List -import Operations -import UseIO +import Data.List +import GF.Data.Operations +import GF.Infra.UseIO printGrammarOld :: GFC.CanonGrammar -> String printGrammarOld gr = err id id $ do diff --git a/src/GF/Compile/Rebuild.hs b/src/GF/Compile/Rebuild.hs index 7404ac0bf..46230df7f 100644 --- a/src/GF/Compile/Rebuild.hs +++ b/src/GF/Compile/Rebuild.hs @@ -5,25 +5,25 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/15 17:18:51 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.11 $ +-- > CVS $Date: 2005/04/21 16:21:44 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.12 $ -- -- Rebuild a source module from incomplete and its with-instance. ----------------------------------------------------------------------------- -module Rebuild (rebuildModule) where +module GF.Compile.Rebuild (rebuildModule) where -import Grammar -import ModDeps -import PrGrammar -import Lookup -import Extend -import Macros +import GF.Grammar.Grammar +import GF.Compile.ModDeps +import GF.Grammar.PrGrammar +import GF.Grammar.Lookup +import GF.Compile.Extend +import GF.Grammar.Macros -import Ident -import Modules -import Operations +import GF.Infra.Ident +import GF.Infra.Modules +import GF.Data.Operations -- | rebuilding instance + interface, and "with" modules, prior to renaming. -- AR 24/10/2003 diff --git a/src/GF/Compile/RemoveLiT.hs b/src/GF/Compile/RemoveLiT.hs index 55a9693c9..28aae9b84 100644 --- a/src/GF/Compile/RemoveLiT.hs +++ b/src/GF/Compile/RemoveLiT.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:09 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:21:45 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- remove obsolete (Lin C) expressions before doing anything else. AR 21/6/2003 -- @@ -16,17 +16,17 @@ -- The procedure is uncertain, if T contains another Lin. ----------------------------------------------------------------------------- -module RemoveLiT (removeLiT) where +module GF.Compile.RemoveLiT (removeLiT) where -import Grammar -import Ident -import Modules -import Macros -import Lookup +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Infra.Modules +import GF.Grammar.Macros +import GF.Grammar.Lookup -import Operations +import GF.Data.Operations -import Monad +import Control.Monad removeLiT :: SourceGrammar -> Err SourceGrammar removeLiT gr = liftM MGrammar $ mapM (remlModule gr) (modules gr) diff --git a/src/GF/Compile/Rename.hs b/src/GF/Compile/Rename.hs index a8c73cdbe..94680a165 100644 --- a/src/GF/Compile/Rename.hs +++ b/src/GF/Compile/Rename.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:09 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.17 $ +-- > CVS $Date: 2005/04/21 16:21:46 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.18 $ -- -- AR 14\/5\/2003 -- The top-level function 'renameGrammar' does several things: @@ -22,23 +22,23 @@ -- Hence we can proceed by @fold@ing "from left to right". ----------------------------------------------------------------------------- -module Rename (renameGrammar, +module GF.Compile.Rename (renameGrammar, renameSourceTerm, renameModule ) where -import Grammar -import Values -import Modules -import Ident -import Macros -import PrGrammar -import AppPredefined -import Lookup -import Extend -import Operations +import GF.Grammar.Grammar +import GF.Grammar.Values +import GF.Infra.Modules +import GF.Infra.Ident +import GF.Grammar.Macros +import GF.Grammar.PrGrammar +import GF.Grammar.AppPredefined +import GF.Grammar.Lookup +import GF.Compile.Extend +import GF.Data.Operations -import Monad +import Control.Monad renameGrammar :: SourceGrammar -> Err SourceGrammar renameGrammar g = liftM (MGrammar . reverse) $ foldM renameModule [] (modules g) diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs index ce2a8d378..b753d0d8a 100644 --- a/src/GF/Compile/ShellState.hs +++ b/src/GF/Compile/ShellState.hs @@ -5,40 +5,40 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/16 05:40:50 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.43 $ +-- > CVS $Date: 2005/04/21 16:21:47 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.44 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module ShellState where +module GF.Compile.ShellState where -import Operations -import GFC -import AbsGFC -import Macros -import MMacros +import GF.Data.Operations +import GF.Canon.GFC +import GF.Canon.AbsGFC +import GF.Grammar.Macros +import GF.Grammar.MMacros -import Look -import LookAbs -import ModDeps -import qualified Modules as M -import qualified Grammar as G -import qualified PrGrammar as P -import CF -import CFIdent -import CanonToCF -import Morphology -import Option -import Ident +import GF.Canon.Look +import GF.Grammar.LookAbs +import GF.Compile.ModDeps +import qualified GF.Infra.Modules as M +import qualified GF.Grammar.Grammar as G +import qualified GF.Grammar.PrGrammar as P +import GF.CF.CF +import GF.CF.CFIdent +import GF.CF.CanonToCF +import GF.UseGrammar.Morphology +import GF.Infra.Option +import GF.Infra.Ident import Arch (ModTime) import qualified GF.OldParsing.ConvertGrammar as CnvOld -- OBSOLETE import qualified GF.Conversion.GFC as Cnv -import qualified GF.NewParsing.GFC as Prs +import qualified GF.Parsing.GFC as Prs -import List (nub,nubBy) +import Data.List (nub,nubBy) -- AR 11/11/2001 -- 17/6/2003 (for modules) ---- unfinished diff --git a/src/GF/Compile/Update.hs b/src/GF/Compile/Update.hs index 14c62ef42..d031dbf5a 100644 --- a/src/GF/Compile/Update.hs +++ b/src/GF/Compile/Update.hs @@ -5,29 +5,29 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:09 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:21:48 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Update (updateRes, buildAnyTree, combineAnyInfos, unifyAnyInfo, +module GF.Compile.Update (updateRes, buildAnyTree, combineAnyInfos, unifyAnyInfo, -- * these auxiliaries should be somewhere else -- since they don't use the info types groupInfos, sortInfos, combineInfos, unifyInfos, tryInsert, unifAbsDefs, unifConstrs ) where -import Ident -import Grammar -import PrGrammar -import Modules +import GF.Infra.Ident +import GF.Grammar.Grammar +import GF.Grammar.PrGrammar +import GF.Infra.Modules -import Operations +import GF.Data.Operations -import List -import Monad +import Data.List +import Control.Monad -- | update a resource module by adding a new or changing an old definition updateRes :: SourceGrammar -> Ident -> Ident -> Info -> SourceGrammar diff --git a/src/GF/Conversion/GFC.hs b/src/GF/Conversion/GFC.hs index f2261ea3c..dbaded139 100644 --- a/src/GF/Conversion/GFC.hs +++ b/src/GF/Conversion/GFC.hs @@ -4,20 +4,20 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:32 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:21:49 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- All conversions from GFC ----------------------------------------------------------------------------- -module GF.Conversion.GFC +module GF.Conversion.GFC (module GF.Conversion.GFC, SGrammar, MGrammar, CGrammar) where -import Option -import GFC (CanonGrammar) -import Ident (Ident) +import GF.Infra.Option +import GF.Canon.GFC (CanonGrammar) +import GF.Infra.Ident (Ident) import GF.Conversion.Types (CGrammar, MGrammar, EGrammar, SGrammar) import qualified GF.Conversion.GFCtoSimple as G2S diff --git a/src/GF/Conversion/GFCtoSimple.hs b/src/GF/Conversion/GFCtoSimple.hs index 82cc143db..efdf51f2e 100644 --- a/src/GF/Conversion/GFCtoSimple.hs +++ b/src/GF/Conversion/GFCtoSimple.hs @@ -4,29 +4,29 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:32 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:21:50 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- Converting GFC to SimpleGFC -- -- the conversion might fail if the GFC grammar has dependent or higher-order types ----------------------------------------------------------------------------- -module GF.Conversion.GFCtoSimple +module GF.Conversion.GFCtoSimple (convertGrammar) where -import qualified AbsGFC as A -import qualified Ident as I +import qualified GF.Canon.AbsGFC as A +import qualified GF.Infra.Ident as I import GF.Formalism.GCFG import GF.Formalism.SimpleGFC import GF.Conversion.Types -import GFC (CanonGrammar) -import MkGFC (grammar2canon) -import qualified Look (lookupLin, allParamValues, lookupLincat) -import qualified CMacros (defLinType) -import Operations (err, errVal) +import GF.Canon.GFC (CanonGrammar) +import GF.Canon.MkGFC (grammar2canon) +import qualified GF.Canon.Look as Look (lookupLin, allParamValues, lookupLincat) +import qualified GF.Canon.CMacros as CMacros (defLinType) +import GF.Data.Operations (err, errVal) --import qualified Modules as M import GF.System.Tracing diff --git a/src/GF/Conversion/MCFGtoCFG.hs b/src/GF/Conversion/MCFGtoCFG.hs index add87c9d3..ad8521b3f 100644 --- a/src/GF/Conversion/MCFGtoCFG.hs +++ b/src/GF/Conversion/MCFGtoCFG.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:32 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:21:51 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- Converting MCFG grammars to (possibly overgenerating) CFG ----------------------------------------------------------------------------- @@ -18,7 +18,7 @@ module GF.Conversion.MCFGtoCFG import GF.System.Tracing import GF.Infra.Print -import Monad +import Control.Monad import GF.Formalism.Utilities import GF.Formalism.GCFG import GF.Formalism.MCFG diff --git a/src/GF/Conversion/RemoveEpsilon.hs b/src/GF/Conversion/RemoveEpsilon.hs index f6e30e16d..bdfdfb41e 100644 --- a/src/GF/Conversion/RemoveEpsilon.hs +++ b/src/GF/Conversion/RemoveEpsilon.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:57:29 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:21:52 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Removing epsilon linearizations from MCF grammars ----------------------------------------------------------------------------- @@ -18,16 +18,16 @@ module GF.Conversion.RemoveEpsilon where import GF.System.Tracing import GF.Infra.Print -import Monad -import List (mapAccumL) -import Maybe (mapMaybe) +import Control.Monad +import Data.List (mapAccumL) +import Data.Maybe (mapMaybe) import GF.Formalism.Utilities import GF.Formalism.GCFG import GF.Formalism.MCFG import GF.Conversion.Types import GF.Data.Assoc import GF.Data.SortedList -import GF.NewParsing.GeneralChart +import GF.Data.GeneralDeduction convertGrammar :: EGrammar -> EGrammar convertGrammar grammar = undefined diff --git a/src/GF/Conversion/RemoveErasing.hs b/src/GF/Conversion/RemoveErasing.hs index a7ff2c6df..34fccd937 100644 --- a/src/GF/Conversion/RemoveErasing.hs +++ b/src/GF/Conversion/RemoveErasing.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:57:29 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:21:53 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Removing erasingness from MCFG grammars (as in Ljunglöf 2004, sec 4.5.1) ----------------------------------------------------------------------------- @@ -18,16 +18,16 @@ module GF.Conversion.RemoveErasing import GF.System.Tracing import GF.Infra.Print -import Monad -import List (mapAccumL) -import Maybe (mapMaybe) +import Control.Monad +import Data.List (mapAccumL) +import Data.Maybe (mapMaybe) import GF.Formalism.Utilities import GF.Formalism.GCFG import GF.Formalism.MCFG import GF.Conversion.Types import GF.Data.Assoc import GF.Data.SortedList -import GF.NewParsing.GeneralChart +import GF.Data.GeneralDeduction convertGrammar :: EGrammar -> MGrammar convertGrammar grammar diff --git a/src/GF/Conversion/RemoveSingletons.hs b/src/GF/Conversion/RemoveSingletons.hs index 53f39dede..0bb5c9ff7 100644 --- a/src/GF/Conversion/RemoveSingletons.hs +++ b/src/GF/Conversion/RemoveSingletons.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:32 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.2 $ +-- > CVS $Date: 2005/04/21 16:21:54 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.3 $ -- -- Instantiating all types which only have one single element. -- @@ -26,7 +26,7 @@ import GF.Conversion.Types import GF.Data.SortedList import GF.Data.Assoc -import List (mapAccumL) +import Data.List (mapAccumL) convertGrammar :: SGrammar -> SGrammar convertGrammar grammar = if singles == emptyAssoc then grammar diff --git a/src/GF/Conversion/SimpleToFinite.hs b/src/GF/Conversion/SimpleToFinite.hs index 3480a2a23..7cefd7844 100644 --- a/src/GF/Conversion/SimpleToFinite.hs +++ b/src/GF/Conversion/SimpleToFinite.hs @@ -4,14 +4,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:32 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:21:54 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- Calculating the finiteness of each type in a grammar ----------------------------------------------------------------------------- -module GF.Conversion.SimpleToFinite +module GF.Conversion.SimpleToFinite (convertGrammar) where import GF.System.Tracing @@ -26,7 +26,7 @@ import GF.Data.Assoc import GF.Data.BacktrackM import GF.Data.Utilities (lookupList) -import Ident (Ident(..)) +import GF.Infra.Ident (Ident(..)) type CnvMonad a = BacktrackM () a diff --git a/src/GF/Conversion/SimpleToMCFG/Coercions.hs b/src/GF/Conversion/SimpleToMCFG/Coercions.hs index 98dfd3e7e..48b09cee2 100644 --- a/src/GF/Conversion/SimpleToMCFG/Coercions.hs +++ b/src/GF/Conversion/SimpleToMCFG/Coercions.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:32 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:21:57 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- Adding coercion functions to a MCFG if necessary. ----------------------------------------------------------------------------- @@ -23,7 +23,7 @@ import GF.Formalism.GCFG import GF.Formalism.MCFG import GF.Conversion.Types import GF.Data.SortedList -import List (groupBy) +import Data.List (groupBy) ---------------------------------------------------------------------- diff --git a/src/GF/Conversion/SimpleToMCFG/Nondet.hs b/src/GF/Conversion/SimpleToMCFG/Nondet.hs index 46e89c09a..39ac709cd 100644 --- a/src/GF/Conversion/SimpleToMCFG/Nondet.hs +++ b/src/GF/Conversion/SimpleToMCFG/Nondet.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:32 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:21:57 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- Converting SimpleGFC grammars to MCFG grammars, nondeterministically. -- Afterwards, the grammar has to be extended with coercion functions, @@ -18,13 +18,13 @@ ----------------------------------------------------------------------------- -module GF.Conversion.SimpleToMCFG.Nondet +module GF.Conversion.SimpleToMCFG.Nondet (convertGrammar) where import GF.System.Tracing import GF.Infra.Print -import Monad +import Control.Monad import GF.Formalism.Utilities import GF.Formalism.GCFG diff --git a/src/GF/Conversion/SimpleToMCFG/Strict.hs b/src/GF/Conversion/SimpleToMCFG/Strict.hs index 9e14c9dc5..c6b703f04 100644 --- a/src/GF/Conversion/SimpleToMCFG/Strict.hs +++ b/src/GF/Conversion/SimpleToMCFG/Strict.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:33 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:21:58 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- Converting SimpleGFC grammars to MCFG grammars, deterministic. -- @@ -22,7 +22,7 @@ module GF.Conversion.SimpleToMCFG.Strict import GF.System.Tracing import GF.Infra.Print -import Monad +import Control.Monad import GF.Formalism.Utilities import GF.Formalism.GCFG diff --git a/src/GF/Conversion/Types.hs b/src/GF/Conversion/Types.hs index 404d090ba..05a7e66b5 100644 --- a/src/GF/Conversion/Types.hs +++ b/src/GF/Conversion/Types.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:44 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:21:56 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- All possible instantiations of different grammar formats used in conversion from GFC ----------------------------------------------------------------------------- @@ -14,9 +14,9 @@ module GF.Conversion.Types where -import qualified Ident (Ident, wildIdent, isWildIdent) -import qualified AbsGFC (CIdent(..)) -import qualified Grammar (Term) +import qualified GF.Infra.Ident as Ident (Ident, wildIdent, isWildIdent) +import qualified GF.Canon.AbsGFC as AbsGFC (CIdent(..)) +import qualified GF.Grammar.Grammar as Grammar (Term) import GF.Formalism.GCFG import GF.Formalism.SimpleGFC @@ -26,7 +26,7 @@ import GF.Formalism.Utilities import GF.Infra.Print import GF.Data.Assoc -import Monad (foldM) +import Control.Monad (foldM) ---------------------------------------------------------------------- -- * basic (leaf) types diff --git a/src/GF/Data/BacktrackM.hs b/src/GF/Data/BacktrackM.hs index ba03884fd..58860d8f6 100644 --- a/src/GF/Data/BacktrackM.hs +++ b/src/GF/Data/BacktrackM.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:49 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:22:00 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- Backtracking state monad, with r\/o environment ----------------------------------------------------------------------------- @@ -29,7 +29,7 @@ module GF.Data.BacktrackM ( -- * the backtracking state monad finalStates ) where -import Monad +import Control.Monad ------------------------------------------------------------ -- type declarations diff --git a/src/GF/Data/ErrM.hs b/src/GF/Data/ErrM.hs index 60dd1826d..8d5ab5403 100644 --- a/src/GF/Data/ErrM.hs +++ b/src/GF/Data/ErrM.hs @@ -5,15 +5,16 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:22:00 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- hack for BNFC generated files. AR 21/9/2003 ----------------------------------------------------------------------------- -module ErrM (module Operations +module GF.Data.ErrM ( + module GF.Data.Operations ) where -import Operations +import GF.Data.Operations diff --git a/src/GF/Data/GeneralDeduction.hs b/src/GF/Data/GeneralDeduction.hs index a5d191260..ea139bb4d 100644 --- a/src/GF/Data/GeneralDeduction.hs +++ b/src/GF/Data/GeneralDeduction.hs @@ -4,14 +4,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:44 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.2 $ +-- > CVS $Date: 2005/04/21 16:22:01 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.3 $ -- -- Simple implementation of deductive chart parsing ----------------------------------------------------------------------------- -module GF.NewParsing.GeneralChart +module GF.Data.GeneralDeduction (-- * Type definition ParseChart, -- * Main functions @@ -28,7 +28,7 @@ module GF.NewParsing.GeneralChart -- import Trace import GF.Data.RedBlackSet -import Monad (foldM) +import Control.Monad (foldM) ---------------------------------------------------------------------- -- main functions diff --git a/src/GF/Data/Glue.hs b/src/GF/Data/Glue.hs index eaa7244f0..b3a766418 100644 --- a/src/GF/Data/Glue.hs +++ b/src/GF/Data/Glue.hs @@ -5,18 +5,18 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:22:02 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- AR 8-11-2003, using Markus Forsberg's implementation of Huet's @unglue@ ----------------------------------------------------------------------------- -module Glue (decomposeSimple) where +module GF.Data.Glue (decomposeSimple) where -import Trie2 -import Operations -import List +import GF.Data.Trie2 +import GF.Data.Operations +import Data.List decomposeSimple :: Trie Char a -> [Char] -> Err [[Char]] decomposeSimple t s = do diff --git a/src/GF/Data/IncrementalDeduction.hs b/src/GF/Data/IncrementalDeduction.hs index 072a1334f..1cf810c0e 100644 --- a/src/GF/Data/IncrementalDeduction.hs +++ b/src/GF/Data/IncrementalDeduction.hs @@ -4,15 +4,15 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:51 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:03 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Implementation of /incremental/ deductive parsing, -- i.e. parsing one word at the time. ----------------------------------------------------------------------------- -module GF.NewParsing.IncrementalChart +module GF.Data.IncrementalDeduction (-- * Type definitions IncrementalChart, -- * Functions @@ -21,7 +21,7 @@ module GF.NewParsing.IncrementalChart chartList ) where -import Array +import Data.Array import GF.Data.SortedList import GF.Data.Assoc diff --git a/src/GF/Data/Map.hs b/src/GF/Data/Map.hs index 1130db2ac..ea27826f6 100644 --- a/src/GF/Data/Map.hs +++ b/src/GF/Data/Map.hs @@ -5,14 +5,14 @@ -- Stability : Stable -- Portability : Haskell 98 -- --- > CVS $Date: 2005/02/18 19:21:15 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:04 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Map ( +module GF.Data.Map ( Map, empty, isEmpty, @@ -24,7 +24,7 @@ module Map ( flatten ) where -import RedBlack +import GF.Data.RedBlack type Map key el = Tree key el diff --git a/src/GF/Data/Operations.hs b/src/GF/Data/Operations.hs index 3f5600f93..e20dc8086 100644 --- a/src/GF/Data/Operations.hs +++ b/src/GF/Data/Operations.hs @@ -5,16 +5,16 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/29 11:17:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.18 $ +-- > CVS $Date: 2005/04/21 16:22:05 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.19 $ -- -- some auxiliary GF operations. AR 19\/6\/1998 -- 6\/2\/2001 -- -- Copyright (c) Aarne Ranta 1998-2000, under GNU General Public License (see GPL) ----------------------------------------------------------------------------- -module Operations (-- * misc functions +module GF.Data.Operations (-- * misc functions ifNull, onSnd, -- * the Error monad @@ -75,9 +75,9 @@ module Operations (-- * misc functions ) where -import Char (isSpace, toUpper, isSpace, isDigit) -import List (nub, sortBy, sort, deleteBy, nubBy) -import Monad (liftM2, MonadPlus, mzero, mplus) +import Data.Char (isSpace, toUpper, isSpace, isDigit) +import Data.List (nub, sortBy, sort, deleteBy, nubBy) +import Control.Monad (liftM2, MonadPlus, mzero, mplus) infixr 5 +++ infixr 5 ++- diff --git a/src/GF/Data/OrdMap2.hs b/src/GF/Data/OrdMap2.hs index 2fba5ac10..3590f0584 100644 --- a/src/GF/Data/OrdMap2.hs +++ b/src/GF/Data/OrdMap2.hs @@ -5,9 +5,9 @@ -- Stability : Obsolete -- Portability : Haskell 98 -- --- > CVS $Date: 2005/02/18 19:21:15 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:05 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- The class of finite maps, as described in -- \"Pure Functional Parsing\", section 2.2.2 @@ -17,9 +17,9 @@ -- /OBSOLETE/! this is only used in module "ChartParser" ----------------------------------------------------------------------------- -module OrdMap2 (OrdMap(..), Map) where +module GF.Data.OrdMap2 (OrdMap(..), Map) where -import List (intersperse) +import Data.List (intersperse) -------------------------------------------------- diff --git a/src/GF/Data/OrdSet.hs b/src/GF/Data/OrdSet.hs index 526d5a53d..34eb0705d 100644 --- a/src/GF/Data/OrdSet.hs +++ b/src/GF/Data/OrdSet.hs @@ -5,9 +5,9 @@ -- Stability : Obsolete -- Portability : Haskell 98 -- --- > CVS $Date: 2005/02/18 19:21:15 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:06 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- The class of ordered sets, as described in -- \"Pure Functional Parsing\", section 2.2.1, @@ -17,9 +17,9 @@ -- /OBSOLETE/! this is only used in module "ChartParser" ----------------------------------------------------------------------------- -module OrdSet (OrdSet(..), Set) where +module GF.Data.OrdSet (OrdSet(..), Set) where -import List (intersperse) +import Data.List (intersperse) -------------------------------------------------- diff --git a/src/GF/Data/Parsers.hs b/src/GF/Data/Parsers.hs index 6dbe9611a..7333510f8 100644 --- a/src/GF/Data/Parsers.hs +++ b/src/GF/Data/Parsers.hs @@ -5,16 +5,16 @@ -- Stability : Almost Obsolete -- Portability : Haskell 98 -- --- > CVS $Date: 2005/02/24 11:46:35 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:06 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- some parser combinators a la Wadler and Hutton. -- no longer used in many places in GF -- (only used in module "EBNF") ----------------------------------------------------------------------------- -module Parsers (-- * Main types and functions +module GF.Data.Parsers (-- * Main types and functions Parser, parseResults, parseResultErr, -- * Basic combinators (on any token type) (...), (.>.), (|||), (+||), literal, (***), @@ -31,8 +31,8 @@ module Parsers (-- * Main types and functions pQuotedString, pIntc ) where -import Operations -import Char +import GF.Data.Operations +import Data.Char infixr 2 |||, +|| diff --git a/src/GF/Data/RedBlack.hs b/src/GF/Data/RedBlack.hs index 309f6b601..fd70dba63 100644 --- a/src/GF/Data/RedBlack.hs +++ b/src/GF/Data/RedBlack.hs @@ -5,14 +5,14 @@ -- Stability : Stable -- Portability : Haskell 98 -- --- > CVS $Date: 2005/02/18 19:21:15 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:07 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- Modified version of Osanaki's implementation. ----------------------------------------------------------------------------- -module RedBlack ( +module GF.Data.RedBlack ( emptyTree, isEmpty, Tree, diff --git a/src/GF/Data/SharedString.hs b/src/GF/Data/SharedString.hs index b92475881..9d037b512 100644 --- a/src/GF/Data/SharedString.hs +++ b/src/GF/Data/SharedString.hs @@ -1,5 +1,5 @@ -module SharedString (shareString) where +module GF.Data.SharedString (shareString) where import Data.HashTable as H import System.IO.Unsafe (unsafePerformIO) diff --git a/src/GF/Data/SortedList.hs b/src/GF/Data/SortedList.hs index 8f96bdc59..d77ff68d4 100644 --- a/src/GF/Data/SortedList.hs +++ b/src/GF/Data/SortedList.hs @@ -4,9 +4,9 @@ -- Stability : stable -- Portability : portable -- --- > CVS $Date: 2005/04/11 13:52:49 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.2 $ +-- > CVS $Date: 2005/04/21 16:22:08 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.3 $ -- -- Sets as sorted lists -- @@ -17,7 +17,7 @@ -- * /O(n^2)/ fixed point iteration ----------------------------------------------------------------------------- -module GF.Data.SortedList +module GF.Data.SortedList ( -- * type declarations SList, SMap, -- * set operations @@ -30,7 +30,7 @@ module GF.Data.SortedList unionMap, mergeMap ) where -import List (groupBy) +import Data.List (groupBy) import GF.Data.Utilities (split, foldMerge) -- | The list must be sorted and contain no duplicates. diff --git a/src/GF/Data/Str.hs b/src/GF/Data/Str.hs index c0a545106..6f65764c7 100644 --- a/src/GF/Data/Str.hs +++ b/src/GF/Data/Str.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:35 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:22:09 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Str ( +module GF.Data.Str ( Str (..), Tok (..), --- constructors needed in PrGrammar str2strings, str2allStrings, str, sstr, sstrV, isZeroTok, prStr, plusStr, glueStr, @@ -20,8 +20,8 @@ module Str ( allItems ) where -import Operations -import List (isPrefixOf, isSuffixOf, intersperse) +import GF.Data.Operations +import Data.List (isPrefixOf, isSuffixOf, intersperse) -- | abstract token list type. AR 2001, revised and simplified 20\/4\/2003 newtype Str = Str [Tok] deriving (Read, Show, Eq, Ord) diff --git a/src/GF/Data/Trie.hs b/src/GF/Data/Trie.hs index 6c0e2933f..9fb5daa27 100644 --- a/src/GF/Data/Trie.hs +++ b/src/GF/Data/Trie.hs @@ -5,14 +5,14 @@ -- Stability : Obsolete -- Portability : Haskell 98 -- --- > CVS $Date: 2005/02/18 19:21:16 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:09 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Trie ( +module GF.Data.Trie ( tcompile, collapse, Trie, @@ -22,7 +22,7 @@ module Trie ( atW, atP, atWP ) where -import Map +import GF.Data.Map --- data Attr = W | P | WP deriving Eq type Attr = Int diff --git a/src/GF/Data/Trie2.hs b/src/GF/Data/Trie2.hs index bdd2b84b8..36fcc3221 100644 --- a/src/GF/Data/Trie2.hs +++ b/src/GF/Data/Trie2.hs @@ -5,14 +5,14 @@ -- Stability : Stable -- Portability : Haskell 98 -- --- > CVS $Date: 2005/02/18 19:21:16 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:22:10 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Trie2 ( +module GF.Data.Trie2 ( tcompile, collapse, Trie, @@ -22,8 +22,8 @@ module Trie2 ( emptyTrie ) where -import Map -import List +import GF.Data.Map +import Data.List newtype TrieT a b = TrieT ([(a,TrieT a b)],[b]) diff --git a/src/GF/Data/Zipper.hs b/src/GF/Data/Zipper.hs index 11643b765..66859f9ca 100644 --- a/src/GF/Data/Zipper.hs +++ b/src/GF/Data/Zipper.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:36 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:22:11 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- Gérard Huet's zipper (JFP 7 (1997)). AR 10\/8\/2001 ----------------------------------------------------------------------------- -module Zipper (-- * types +module GF.Data.Zipper (-- * types Tr(..), Path(..), Loc(..), @@ -53,7 +53,7 @@ module Zipper (-- * types arityTree ) where -import Operations +import GF.Data.Operations newtype Tr a = Tr (a,[Tr a]) deriving (Show,Eq) diff --git a/src/GF/Formalism/SimpleGFC.hs b/src/GF/Formalism/SimpleGFC.hs index 537f4f568..b8eed21f1 100644 --- a/src/GF/Formalism/SimpleGFC.hs +++ b/src/GF/Formalism/SimpleGFC.hs @@ -4,18 +4,18 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/16 05:40:49 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:22:13 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- Simplistic GFC format ----------------------------------------------------------------------------- module GF.Formalism.SimpleGFC where -import Monad (liftM) -import qualified AbsGFC -import qualified Ident +import Control.Monad (liftM) +import qualified GF.Canon.AbsGFC as AbsGFC +import qualified GF.Infra.Ident as Ident import GF.Formalism.GCFG import GF.Infra.Print diff --git a/src/GF/Formalism/Utilities.hs b/src/GF/Formalism/Utilities.hs index b2b104c55..fabb708d1 100644 --- a/src/GF/Formalism/Utilities.hs +++ b/src/GF/Formalism/Utilities.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:44 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:22:14 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- Basic type declarations and functions for grammar formalisms ----------------------------------------------------------------------------- @@ -14,9 +14,9 @@ module GF.Formalism.Utilities where -import Monad -import Array -import List (groupBy) +import Control.Monad +import Data.Array +import Data.List (groupBy) import GF.Data.SortedList import GF.Data.Assoc diff --git a/src/GF/Fudgets/CommandF.hs b/src/GF/Fudgets/CommandF.hs index 00621499a..15af12215 100644 --- a/src/GF/Fudgets/CommandF.hs +++ b/src/GF/Fudgets/CommandF.hs @@ -5,24 +5,24 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:36 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:15 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- a graphical shell for any kind of GF with Zipper editing. AR 20\/8\/2001 ----------------------------------------------------------------------------- -module CommandF where +module GF.Fudgets.CommandF where -import Operations +import GF.Data.Operations -import Session -import Commands +import GF.UseGrammar.Session +import GF.Shell.Commands import Fudgets -import FudgetOps +import GF.Fudgets.FudgetOps -import EventF +import GF.Fudgets.EventF -- a graphical shell for any kind of GF with Zipper editing. AR 20/8/2001 diff --git a/src/GF/Fudgets/EventF.hs b/src/GF/Fudgets/EventF.hs index f517ab22e..7ea058dfa 100644 --- a/src/GF/Fudgets/EventF.hs +++ b/src/GF/Fudgets/EventF.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:22:16 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module EventF where +module GF.Fudgets.EventF where import AllFudgets -- | The first string is the name of the key (e.g., "Down" for the down arrow key) diff --git a/src/GF/Fudgets/FudgetOps.hs b/src/GF/Fudgets/FudgetOps.hs index ac50d3e77..4aba5eec5 100644 --- a/src/GF/Fudgets/FudgetOps.hs +++ b/src/GF/Fudgets/FudgetOps.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:22:17 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- auxiliary Fudgets for GF syntax editor ----------------------------------------------------------------------------- -module FudgetOps where +module GF.Fudgets.FudgetOps where import Fudgets diff --git a/src/GF/Fudgets/UnicodeF.hs b/src/GF/Fudgets/UnicodeF.hs index 23ba29a2b..024205698 100644 --- a/src/GF/Fudgets/UnicodeF.hs +++ b/src/GF/Fudgets/UnicodeF.hs @@ -5,18 +5,18 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:16 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:22:17 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module UnicodeF (fudlogueWriteU) where +module GF.Fudgets.UnicodeF (fudlogueWriteU) where import Fudgets -import Operations -import Unicode +import GF.Data.Operations +import GF.Text.Unicode -- AR 12/4/2000, 18/9/2001 (added font parameter) diff --git a/src/GF/GFModes.hs b/src/GF/GFModes.hs index b0d1d797b..4a29144d5 100644 --- a/src/GF/GFModes.hs +++ b/src/GF/GFModes.hs @@ -4,26 +4,26 @@ -- Stability : (stability) -- Portability : (portability) -- --- > CVS $Date: 2005/04/16 05:40:48 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:21:04 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module GFModes (gfInteract, gfBatch, batchCompile) where +module GF.GFModes (gfInteract, gfBatch, batchCompile) where -import Operations -import UseIO -import Option -import ShellState -import ShellCommands -import Shell -import CommandL (execCommandHistory) -import SubShell -import PShell -import JGF -import Char (isSpace) +import GF.Data.Operations +import GF.Infra.UseIO +import GF.Infra.Option +import GF.Compile.ShellState +import GF.Shell.ShellCommands +import GF.Shell +import GF.Shell.CommandL (execCommandHistory) +import GF.Shell.SubShell +import GF.Shell.PShell +import GF.Shell.JGF +import Data.Char (isSpace) -- separated from GF Main 24/6/2003 diff --git a/src/GF/Grammar/AbsCompute.hs b/src/GF/Grammar/AbsCompute.hs index da90f645d..35be020fa 100644 --- a/src/GF/Grammar/AbsCompute.hs +++ b/src/GF/Grammar/AbsCompute.hs @@ -5,31 +5,31 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:12 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:22:18 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- computation in abstract syntax w.r.t. explicit definitions. -- -- old GF computation; to be updated ----------------------------------------------------------------------------- -module AbsCompute (LookDef, +module GF.Grammar.AbsCompute (LookDef, compute, computeAbsTerm, computeAbsTermIn, beta ) where -import Operations +import GF.Data.Operations -import Abstract -import PrGrammar -import LookAbs -import PatternMatch -import Compute +import GF.Grammar.Abstract +import GF.Grammar.PrGrammar +import GF.Grammar.LookAbs +import GF.Grammar.PatternMatch +import GF.Grammar.Compute -import Monad (liftM, liftM2) +import Control.Monad (liftM, liftM2) compute :: GFCGrammar -> Exp -> Err Exp compute = computeAbsTerm diff --git a/src/GF/Grammar/Abstract.hs b/src/GF/Grammar/Abstract.hs index dda7b3492..c03783a52 100644 --- a/src/GF/Grammar/Abstract.hs +++ b/src/GF/Grammar/Abstract.hs @@ -5,32 +5,32 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:12 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:22:18 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Abstract ( +module GF.Grammar.Abstract ( -module Grammar, -module Values, -module Macros, -module Ident, -module MMacros, -module PrGrammar, +module GF.Grammar.Grammar, +module GF.Grammar.Values, +module GF.Grammar.Macros, +module GF.Infra.Ident, +module GF.Grammar.MMacros, +module GF.Grammar.PrGrammar, Grammar ) where -import Grammar -import Values -import Macros -import Ident -import MMacros -import PrGrammar +import GF.Grammar.Grammar +import GF.Grammar.Values +import GF.Grammar.Macros +import GF.Infra.Ident +import GF.Grammar.MMacros +import GF.Grammar.PrGrammar type Grammar = SourceGrammar --- diff --git a/src/GF/Grammar/AppPredefined.hs b/src/GF/Grammar/AppPredefined.hs index ece6f730e..1ec023a63 100644 --- a/src/GF/Grammar/AppPredefined.hs +++ b/src/GF/Grammar/AppPredefined.hs @@ -5,21 +5,21 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/01 21:24:24 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.10 $ +-- > CVS $Date: 2005/04/21 16:22:19 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.11 $ -- -- Predefined function type signatures and definitions. ----------------------------------------------------------------------------- -module AppPredefined (isInPredefined, typPredefined, appPredefined +module GF.Grammar.AppPredefined (isInPredefined, typPredefined, appPredefined ) where -import Operations -import Grammar -import Ident -import Macros -import PrGrammar (prt,prt_,prtBad) +import GF.Data.Operations +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Grammar.Macros +import GF.Grammar.PrGrammar (prt,prt_,prtBad) ---- import PGrammar (pTrm) -- predefined function type signatures and definitions. AR 12/3/2003. diff --git a/src/GF/Grammar/Compute.hs b/src/GF/Grammar/Compute.hs index 5e384b141..01ce3637d 100644 --- a/src/GF/Grammar/Compute.hs +++ b/src/GF/Grammar/Compute.hs @@ -5,31 +5,31 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/01 21:24:24 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.14 $ +-- > CVS $Date: 2005/04/21 16:22:19 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.15 $ -- -- Computation of source terms. Used in compilation and in @cc@ command. ----------------------------------------------------------------------------- -module Compute (computeConcrete, computeTerm) where +module GF.Grammar.Compute (computeConcrete, computeTerm) where -import Operations -import Grammar -import Ident -import Str -import PrGrammar -import Modules -import Macros -import Lookup -import Refresh -import PatternMatch -import Lockfield (isLockLabel) ---- +import GF.Data.Operations +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Data.Str +import GF.Grammar.PrGrammar +import GF.Infra.Modules +import GF.Grammar.Macros +import GF.Grammar.Lookup +import GF.Grammar.Refresh +import GF.Grammar.PatternMatch +import GF.Grammar.Lockfield (isLockLabel) ---- -import AppPredefined +import GF.Grammar.AppPredefined -import List (nub,intersperse) -import Monad (liftM2, liftM) +import Data.List (nub,intersperse) +import Control.Monad (liftM2, liftM) -- | computation of concrete syntax terms into normal form -- used mainly for partial evaluation diff --git a/src/GF/Grammar/Grammar.hs b/src/GF/Grammar/Grammar.hs index f6ae9249f..ff5209204 100644 --- a/src/GF/Grammar/Grammar.hs +++ b/src/GF/Grammar/Grammar.hs @@ -5,16 +5,16 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:12 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:22:20 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- GF source abstract syntax used internally in compilation. -- -- AR 23\/1\/2000 -- 30\/5\/2001 -- 4\/5\/2003 ----------------------------------------------------------------------------- -module Grammar (SourceGrammar, +module GF.Grammar.Grammar (SourceGrammar, SourceModInfo, SourceModule, SourceAbs, @@ -50,12 +50,12 @@ module Grammar (SourceGrammar, varLabel ) where -import Str -import Ident -import Option --- -import Modules +import GF.Data.Str +import GF.Infra.Ident +import GF.Infra.Option --- +import GF.Infra.Modules -import Operations +import GF.Data.Operations -- | grammar as presented to the compiler type SourceGrammar = MGrammar Ident Option Info diff --git a/src/GF/Grammar/Lockfield.hs b/src/GF/Grammar/Lockfield.hs index 6ad6db206..e2482363b 100644 --- a/src/GF/Grammar/Lockfield.hs +++ b/src/GF/Grammar/Lockfield.hs @@ -5,23 +5,23 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:12 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:21 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- Creating and using lock fields in reused resource grammars. -- -- AR 8\/2\/2005 detached from 'compile/MkResource' ----------------------------------------------------------------------------- -module Lockfield (lockRecType, unlockRecord, lockLabel, isLockLabel) where +module GF.Grammar.Lockfield (lockRecType, unlockRecord, lockLabel, isLockLabel) where -import Grammar -import Ident -import Macros -import PrGrammar +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Grammar.Macros +import GF.Grammar.PrGrammar -import Operations +import GF.Data.Operations lockRecType :: Ident -> Type -> Err Type lockRecType c t@(RecType rs) = @@ -43,4 +43,4 @@ lockLabel c = LIdent $ "lock_" ++ prt c ---- isLockLabel :: Label -> Bool isLockLabel l = case l of LIdent c -> take 5 c == "lock_" - _ -> False \ No newline at end of file + _ -> False diff --git a/src/GF/Grammar/LookAbs.hs b/src/GF/Grammar/LookAbs.hs index cb6ec89ad..2904a8b4b 100644 --- a/src/GF/Grammar/LookAbs.hs +++ b/src/GF/Grammar/LookAbs.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:12 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.12 $ +-- > CVS $Date: 2005/04/21 16:22:22 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.13 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module LookAbs (GFCGrammar, +module GF.Grammar.LookAbs (GFCGrammar, lookupAbsDef, lookupFunType, lookupCatContext, @@ -31,15 +31,15 @@ module LookAbs (GFCGrammar, lookupCatContextSrc ) where -import Operations -import qualified GFC as C -import Abstract -import Ident +import GF.Data.Operations +import qualified GF.Canon.GFC as C +import GF.Grammar.Abstract +import GF.Infra.Ident -import Modules +import GF.Infra.Modules -import List (nub) -import Monad +import Data.List (nub) +import Control.Monad type GFCGrammar = C.CanonGrammar diff --git a/src/GF/Grammar/Lookup.hs b/src/GF/Grammar/Lookup.hs index 60b0ff73d..96a716e11 100644 --- a/src/GF/Grammar/Lookup.hs +++ b/src/GF/Grammar/Lookup.hs @@ -5,16 +5,16 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:12 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.12 $ +-- > CVS $Date: 2005/04/21 16:22:23 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.13 $ -- -- Lookup in source (concrete and resource) when compiling. -- -- lookup in resource and concrete in compiling; for abstract, use 'Look' ----------------------------------------------------------------------------- -module Lookup (lookupResDef, +module GF.Grammar.Lookup (lookupResDef, lookupResType, lookupParams, lookupParamValues, @@ -25,13 +25,13 @@ module Lookup (lookupResDef, opersForType ) where -import Operations -import Abstract -import Modules -import Lockfield +import GF.Data.Operations +import GF.Grammar.Abstract +import GF.Infra.Modules +import GF.Grammar.Lockfield -import List (nub) -import Monad +import Data.List (nub) +import Control.Monad lookupResDef :: SourceGrammar -> Ident -> Ident -> Err Term lookupResDef gr = look True where diff --git a/src/GF/Grammar/MMacros.hs b/src/GF/Grammar/MMacros.hs index b97c211d7..d4d1fa6e7 100644 --- a/src/GF/Grammar/MMacros.hs +++ b/src/GF/Grammar/MMacros.hs @@ -5,27 +5,27 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:34 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:22:24 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- some more abstractions on grammars, esp. for Edit ----------------------------------------------------------------------------- -module MMacros where +module GF.Grammar.MMacros where -import Operations -import Zipper +import GF.Data.Operations +import GF.Data.Zipper -import Grammar -import PrGrammar -import Ident -import Refresh -import Values +import GF.Grammar.Grammar +import GF.Grammar.PrGrammar +import GF.Infra.Ident +import GF.Grammar.Refresh +import GF.Grammar.Values ----import GrammarST -import Macros +import GF.Grammar.Macros -import Monad +import Control.Monad nodeTree :: Tree -> TrNode argsTree :: Tree -> [Tree] diff --git a/src/GF/Grammar/Macros.hs b/src/GF/Grammar/Macros.hs index 4cd39f6e6..234bd8394 100644 --- a/src/GF/Grammar/Macros.hs +++ b/src/GF/Grammar/Macros.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:34 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.18 $ +-- > CVS $Date: 2005/04/21 16:22:25 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.19 $ -- -- Macros for constructing and analysing source code terms. -- @@ -16,16 +16,16 @@ -- AR 7\/12\/1999 - 9\/5\/2000 -- 4\/6\/2001 ----------------------------------------------------------------------------- -module Macros where +module GF.Grammar.Macros where -import Operations -import Str -import Grammar -import Ident -import PrGrammar +import GF.Data.Operations +import GF.Data.Str +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Grammar.PrGrammar -import Monad (liftM) -import Char (isDigit) +import Control.Monad (liftM) +import Data.Char (isDigit) firstTypeForm :: Type -> Err (Context, Type) firstTypeForm t = case t of diff --git a/src/GF/Grammar/PatternMatch.hs b/src/GF/Grammar/PatternMatch.hs index 2fcf4440a..79969c2f3 100644 --- a/src/GF/Grammar/PatternMatch.hs +++ b/src/GF/Grammar/PatternMatch.hs @@ -5,26 +5,26 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:13 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:26 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- pattern matching for both concrete and abstract syntax. AR -- 16\/6\/2003 ----------------------------------------------------------------------------- -module PatternMatch (matchPattern, +module GF.Grammar.PatternMatch (matchPattern, testOvershadow, findMatch ) where -import Operations -import Grammar -import Ident -import Macros -import PrGrammar +import GF.Data.Operations +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Grammar.Macros +import GF.Grammar.PrGrammar -import List -import Monad +import Data.List +import Control.Monad matchPattern :: [(Patt,Term)] -> Term -> Err (Term, Substitution) diff --git a/src/GF/Grammar/PrGrammar.hs b/src/GF/Grammar/PrGrammar.hs index 47369804b..297790a76 100644 --- a/src/GF/Grammar/PrGrammar.hs +++ b/src/GF/Grammar/PrGrammar.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 20:09:19 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.12 $ +-- > CVS $Date: 2005/04/21 16:22:27 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.13 $ -- -- AR 7\/12\/1999 - 1\/4\/2000 - 10\/5\/2003 -- @@ -19,7 +19,7 @@ -- only the former is ever needed. ----------------------------------------------------------------------------- -module PrGrammar (Print(..), +module GF.Grammar.PrGrammar (Print(..), prtBad, prGrammar, prModule, prContext, prParam, @@ -32,22 +32,22 @@ module PrGrammar (Print(..), prExp, prPatt, prOperSignature ) where -import Operations -import Zipper -import Grammar -import Modules -import qualified PrintGF as P -import qualified PrintGFC as C -import qualified AbsGFC as A -import Values -import GrammarToSource +import GF.Data.Operations +import GF.Data.Zipper +import GF.Grammar.Grammar +import GF.Infra.Modules +import qualified GF.Source.PrintGF as P +import qualified GF.Canon.PrintGFC as C +import qualified GF.Canon.AbsGFC as A +import GF.Grammar.Values +import GF.Source.GrammarToSource --- import GFC (CanonGrammar) --- cycle of modules -import Option -import Ident -import Str +import GF.Infra.Option +import GF.Infra.Ident +import GF.Data.Str -import List (intersperse) +import Data.List (intersperse) class Print a where prt :: a -> String diff --git a/src/GF/Grammar/Refresh.hs b/src/GF/Grammar/Refresh.hs index d2736e433..a9bccbb1d 100644 --- a/src/GF/Grammar/Refresh.hs +++ b/src/GF/Grammar/Refresh.hs @@ -5,23 +5,23 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:13 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:22:27 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Refresh (refreshTerm, refreshTermN, +module GF.Grammar.Refresh (refreshTerm, refreshTermN, refreshModule ) where -import Operations -import Grammar -import Ident -import Modules -import Macros -import Monad +import GF.Data.Operations +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Infra.Modules +import GF.Grammar.Macros +import Control.Monad refreshTerm :: Term -> Err Term refreshTerm = refreshTermN 0 diff --git a/src/GF/Grammar/ReservedWords.hs b/src/GF/Grammar/ReservedWords.hs index 79ef2d1c7..b440141d6 100644 --- a/src/GF/Grammar/ReservedWords.hs +++ b/src/GF/Grammar/ReservedWords.hs @@ -5,18 +5,18 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:13 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:22:28 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- reserved words of GF. (c) Aarne Ranta 19\/3\/2002 under Gnu GPL. -- modified by Markus Forsberg 9\/4. -- modified by AR 12\/6\/2003 for GF2 and GFC ----------------------------------------------------------------------------- -module ReservedWords (isResWord, isResWordGFC) where +module GF.Grammar.ReservedWords (isResWord, isResWordGFC) where -import List +import Data.List isResWord :: String -> Bool diff --git a/src/GF/Grammar/TC.hs b/src/GF/Grammar/TC.hs index 2287b8afb..411b84e30 100644 --- a/src/GF/Grammar/TC.hs +++ b/src/GF/Grammar/TC.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/17 09:58:18 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.8 $ +-- > CVS $Date: 2005/04/21 16:22:29 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.9 $ -- -- Thierry Coquand's type checking algorithm that creates a trace ----------------------------------------------------------------------------- -module TC (AExp(..), +module GF.Grammar.TC (AExp(..), Theory, checkExp, inferExp, @@ -20,11 +20,11 @@ module TC (AExp(..), whnf ) where -import Operations -import Abstract -import AbsCompute +import GF.Data.Operations +import GF.Grammar.Abstract +import GF.Grammar.AbsCompute -import Monad +import Control.Monad data AExp = AVr Ident Val diff --git a/src/GF/Grammar/TypeCheck.hs b/src/GF/Grammar/TypeCheck.hs index 9f5f0ba18..66416f1d4 100644 --- a/src/GF/Grammar/TypeCheck.hs +++ b/src/GF/Grammar/TypeCheck.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:13 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.13 $ +-- > CVS $Date: 2005/04/21 16:22:30 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.14 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module TypeCheck (-- * top-level type checking functions; TC should not be called directly. +module GF.Grammar.TypeCheck (-- * top-level type checking functions; TC should not be called directly. annotate, annotateIn, justTypeCheck, checkIfValidExp, reduceConstraints, @@ -33,21 +33,21 @@ module TypeCheck (-- * top-level type checking functions; TC should not be calle tree2termlistCommand ) where -import Operations -import Zipper +import GF.Data.Operations +import GF.Data.Zipper -import Abstract -import AbsCompute -import Refresh -import LookAbs -import qualified Lookup --- +import GF.Grammar.Abstract +import GF.Grammar.AbsCompute +import GF.Grammar.Refresh +import GF.Grammar.LookAbs +import qualified GF.Grammar.Lookup as Lookup --- -import TC +import GF.Grammar.TC -import Unify --- +import GF.Grammar.Unify --- -import Monad (foldM, liftM, liftM2) -import List (nub) --- +import Control.Monad (foldM, liftM, liftM2) +import Data.List (nub) --- -- top-level type checking functions; TC should not be called directly. diff --git a/src/GF/Grammar/Unify.hs b/src/GF/Grammar/Unify.hs index 8ee248ee9..588c1b306 100644 --- a/src/GF/Grammar/Unify.hs +++ b/src/GF/Grammar/Unify.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:13 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:22:31 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- (c) Petri Mäenpää & Aarne Ranta, 1998--2001 -- @@ -15,13 +15,13 @@ -- the only use is in 'TypeCheck.splitConstraints' ----------------------------------------------------------------------------- -module Unify (unifyVal) where +module GF.Grammar.Unify (unifyVal) where -import Abstract +import GF.Grammar.Abstract -import Operations +import GF.Data.Operations -import List (partition) +import Data.List (partition) unifyVal :: Constraints -> Err (Constraints,MetaSubst) unifyVal cs0 = do diff --git a/src/GF/Grammar/Values.hs b/src/GF/Grammar/Values.hs index fdbce53de..e6247cfc8 100644 --- a/src/GF/Grammar/Values.hs +++ b/src/GF/Grammar/Values.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:13 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:22:32 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Values (-- * values used in TC type checking +module GF.Grammar.Values (-- * values used in TC type checking Exp, Val(..), Env, -- * annotated tree used in editing Tree, TrNode(..), Atom(..), Binds, Constraints, MetaSubst, @@ -23,11 +23,11 @@ module Values (-- * values used in TC type checking eType, tree2exp, loc2treeFocus ) where -import Operations -import Zipper +import GF.Data.Operations +import GF.Data.Zipper -import Grammar -import Ident +import GF.Grammar.Grammar +import GF.Infra.Ident -- values used in TC type checking diff --git a/src/GF/Infra/CheckM.hs b/src/GF/Infra/CheckM.hs index 52802d59b..251ed2b8b 100644 --- a/src/GF/Infra/CheckM.hs +++ b/src/GF/Infra/CheckM.hs @@ -5,24 +5,24 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:13 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:22:33 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module CheckM (Check, +module GF.Infra.CheckM (Check, checkError, checkCond, checkWarn, checkUpdate, checkInContext, checkUpdates, checkReset, checkResets, checkGetContext, checkLookup, checkStart, checkErr, checkVal, checkIn, prtFail ) where -import Operations -import Grammar -import Ident -import PrGrammar +import GF.Data.Operations +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Grammar.PrGrammar -- | the strings are non-fatal warnings type Check a = STM (Context,[String]) a diff --git a/src/GF/Infra/Comments.hs b/src/GF/Infra/Comments.hs index c90224a81..0126db468 100644 --- a/src/GF/Infra/Comments.hs +++ b/src/GF/Infra/Comments.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:13 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:22:34 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- comment removal ----------------------------------------------------------------------------- -module Comments ( remComments +module GF.Infra.Comments ( remComments ) where -- | comment removal : line tails prefixed by -- as well as chunks in @{- ... -}@ diff --git a/src/GF/Infra/Ident.hs b/src/GF/Infra/Ident.hs index 6b5c51bf3..5259af228 100644 --- a/src/GF/Infra/Ident.hs +++ b/src/GF/Infra/Ident.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/15 11:18:07 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:22:35 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Ident (-- * Identifiers +module GF.Infra.Ident (-- * Identifiers Ident(..), prIdent, identC, identV, identA, identAV, identW, argIdent, strVar, wildIdent, isWildIdent, @@ -22,7 +22,7 @@ module Ident (-- * Identifiers lookVar, refVar, refVarPlus ) where -import Operations +import GF.Data.Operations -- import Monad diff --git a/src/GF/Infra/Modules.hs b/src/GF/Infra/Modules.hs index ac903e8ec..e3c0388dd 100644 --- a/src/GF/Infra/Modules.hs +++ b/src/GF/Infra/Modules.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:35 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.20 $ +-- > CVS $Date: 2005/04/21 16:22:36 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.21 $ -- -- Datastructures and functions for modules, common to GF and GFC. -- @@ -18,7 +18,7 @@ -- Invariant: modules are stored in dependency order ----------------------------------------------------------------------------- -module Modules (MGrammar(..), ModInfo(..), Module(..), ModuleType(..), MReuseType(..), +module GF.Infra.Modules (MGrammar(..), ModInfo(..), Module(..), ModuleType(..), MReuseType(..), extendm, updateMGrammar, updateModule, replaceJudgements, addOpenQualif, flagsModule, allFlags, mapModules, MainGrammar(..), MainConcreteSpec(..), OpenSpec(..), OpenQualif(..), @@ -35,11 +35,11 @@ module Modules (MGrammar(..), ModInfo(..), Module(..), ModuleType(..), MReuseTyp allAbstracts, greatestAbstract, allResources, greatestResource, allConcretes ) where -import Ident -import Option -import Operations +import GF.Infra.Ident +import GF.Infra.Option +import GF.Data.Operations -import List +import Data.List -- AR 29/4/2003 diff --git a/src/GF/Infra/Option.hs b/src/GF/Infra/Option.hs index b7e7ce598..649534986 100644 --- a/src/GF/Infra/Option.hs +++ b/src/GF/Infra/Option.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:45 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.25 $ +-- > CVS $Date: 2005/04/21 16:22:37 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.26 $ -- -- Options and flags used in GF shell commands and files. -- @@ -18,10 +18,10 @@ -- - The constructor 'Opts' us udes in "API", "Shell" and "ShellCommands" ----------------------------------------------------------------------------- -module Option where +module GF.Infra.Option where -import List (partition) -import Char (isDigit) +import Data.List (partition) +import Data.Char (isDigit) -- * all kinds of options, to be kept abstract diff --git a/src/GF/Infra/Print.hs b/src/GF/Infra/Print.hs index 75fa52a17..cf5953030 100644 --- a/src/GF/Infra/Print.hs +++ b/src/GF/Infra/Print.hs @@ -4,14 +4,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/16 05:40:49 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.2 $ +-- > CVS $Date: 2005/04/21 16:22:38 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.3 $ -- -- Pretty-printing ----------------------------------------------------------------------------- -module GF.Infra.Print +module GF.Infra.Print (Print(..), prtBefore, prtAfter, prtSep, prtBeforeAfter, prtPairList, @@ -19,15 +19,15 @@ module GF.Infra.Print ) where -- haskell modules: -import List (intersperse) -import Char (toUpper) +import Data.List (intersperse) +import Data.Char (toUpper) -- gf modules: -import Operations (Err(..)) -import Ident (Ident(..)) -import AbsGFC -import CF -import CFIdent -import qualified PrintGFC as P +import GF.Data.Operations (Err(..)) +import GF.Infra.Ident (Ident(..)) +import GF.Canon.AbsGFC +import GF.CF.CF +import GF.CF.CFIdent +import qualified GF.Canon.PrintGFC as P ------------------------------------------------------------ diff --git a/src/GF/Infra/ReadFiles.hs b/src/GF/Infra/ReadFiles.hs index 414df59bb..19da55ca6 100644 --- a/src/GF/Infra/ReadFiles.hs +++ b/src/GF/Infra/ReadFiles.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/15 17:18:52 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.21 $ +-- > CVS $Date: 2005/04/21 16:22:39 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.22 $ -- -- Decide what files to read as function of dependencies and time stamps. -- @@ -18,7 +18,7 @@ -- and @file.gfc@ or @file.gfr@ otherwise. ----------------------------------------------------------------------------- -module ReadFiles (-- * Heading 1 +module GF.Infra.ReadFiles (-- * Heading 1 getAllFiles,fixNewlines,ModName,getOptionsFromFile, -- * Heading 2 gfcFile,gfFile,gfrFile,isGFC,resModName,isOldFile @@ -26,15 +26,15 @@ module ReadFiles (-- * Heading 1 import Arch (selectLater, modifiedFiles, ModTime, getModTime,laterModTime) -import Option -import Operations -import UseIO +import GF.Infra.Option +import GF.Data.Operations +import GF.Infra.UseIO import System -import Char -import Monad -import List -import Directory +import Data.Char +import Control.Monad +import Data.List +import System.Directory type ModName = String type ModEnv = [(ModName,ModTime)] diff --git a/src/GF/Infra/UseIO.hs b/src/GF/Infra/UseIO.hs index 9aabd0f3e..88ef6e3b6 100644 --- a/src/GF/Infra/UseIO.hs +++ b/src/GF/Infra/UseIO.hs @@ -5,22 +5,23 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/08 18:08:58 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.10 $ +-- > CVS $Date: 2005/04/21 16:22:40 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.11 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module UseIO where +module GF.Infra.UseIO where -import Operations +import GF.Data.Operations import Arch (prCPU) -import Option +import GF.Infra.Option -import IO -import System -import Monad +import System.IO +import System.IO.Error +import System.Environment +import Control.Monad putShow' :: Show a => (c -> a) -> c -> IO () putShow' f = putStrLn . show . length . show . f diff --git a/src/GF/OldParsing/CFGrammar.hs b/src/GF/OldParsing/CFGrammar.hs index 6c6269626..5a71fe0ab 100644 --- a/src/GF/OldParsing/CFGrammar.hs +++ b/src/GF/OldParsing/CFGrammar.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:52 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:41 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Definitions of context-free grammars, -- parser information and chart conversion @@ -30,11 +30,11 @@ module GF.OldParsing.CFGrammar import GF.System.Tracing -- haskell modules: -import Array +import Data.Array -- gf modules: import GF.Data.SortedList import GF.Data.Assoc -import qualified CF +import qualified GF.CF.CF as CF -- parser modules: import GF.OldParsing.Utilities import GF.Printing.PrintParser diff --git a/src/GF/OldParsing/ConvertFiniteGFC.hs b/src/GF/OldParsing/ConvertFiniteGFC.hs index 61486023e..25ed3fdb3 100644 --- a/src/GF/OldParsing/ConvertFiniteGFC.hs +++ b/src/GF/OldParsing/ConvertFiniteGFC.hs @@ -4,20 +4,20 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:52 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:42 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Calculating the finiteness of each type in a grammar ----------------------------------------------------------------------------- module GF.OldParsing.ConvertFiniteGFC where -import Operations -import GFC -import MkGFC -import AbsGFC -import Ident (Ident(..)) +import GF.Data.Operations +import GF.Canon.GFC +import GF.Canon.MkGFC +import GF.Canon.AbsGFC +import GF.Infra.Ident (Ident(..)) import GF.System.Tracing import GF.Printing.PrintParser import GF.Printing.PrintSimplifiedTerm diff --git a/src/GF/OldParsing/ConvertFiniteSimple.hs b/src/GF/OldParsing/ConvertFiniteSimple.hs index 7aac39cb2..a05092550 100644 --- a/src/GF/OldParsing/ConvertFiniteSimple.hs +++ b/src/GF/OldParsing/ConvertFiniteSimple.hs @@ -4,22 +4,22 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:52 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:43 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Calculating the finiteness of each type in a grammar ----------------------------------------------------------------------------- -module GF.OldParsing.ConvertFiniteSimple +module GF.OldParsing.ConvertFiniteSimple (convertGrammar) where import GF.System.Tracing import GF.Printing.PrintParser import GF.Printing.PrintSimplifiedTerm -import Operations -import Ident (Ident(..)) +import GF.Data.Operations +import GF.Infra.Ident (Ident(..)) import GF.OldParsing.SimpleGFC import GF.Data.SortedList import GF.Data.Assoc diff --git a/src/GF/OldParsing/ConvertGFCtoMCFG.hs b/src/GF/OldParsing/ConvertGFCtoMCFG.hs index 1a9bc1a75..c32812eb2 100644 --- a/src/GF/OldParsing/ConvertGFCtoMCFG.hs +++ b/src/GF/OldParsing/ConvertGFCtoMCFG.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:52 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:44 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- All different conversions from GFC to MCFG ----------------------------------------------------------------------------- @@ -16,10 +16,10 @@ module GF.OldParsing.ConvertGFCtoMCFG (convertGrammar) where -import GFC (CanonGrammar) +import GF.Canon.GFC (CanonGrammar) import GF.OldParsing.GrammarTypes -import Ident (Ident(..)) -import Option +import GF.Infra.Ident (Ident(..)) +import GF.Infra.Option import GF.System.Tracing import qualified GF.OldParsing.ConvertGFCtoMCFG.Old as Old diff --git a/src/GF/OldParsing/ConvertGFCtoMCFG/Coercions.hs b/src/GF/OldParsing/ConvertGFCtoMCFG/Coercions.hs index 650f8b646..3ed6a3f48 100644 --- a/src/GF/OldParsing/ConvertGFCtoMCFG/Coercions.hs +++ b/src/GF/OldParsing/ConvertGFCtoMCFG/Coercions.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:55 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:54 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Adding coercion functions to a MCFG if necessary. ----------------------------------------------------------------------------- @@ -21,12 +21,12 @@ import GF.Printing.PrintSimplifiedTerm -- import PrintGFC -- import qualified PrGrammar as PG -import qualified Ident +import qualified GF.Infra.Ident as Ident import GF.OldParsing.Utilities import GF.OldParsing.GrammarTypes import GF.OldParsing.MCFGrammar (Rule(..), Lin(..)) import GF.Data.SortedList -import List (groupBy) -- , transpose) +import Data.List (groupBy) -- , transpose) ---------------------------------------------------------------------- diff --git a/src/GF/OldParsing/ConvertGFCtoMCFG/Nondet.hs b/src/GF/OldParsing/ConvertGFCtoMCFG/Nondet.hs index d27e240bc..ef9265d91 100644 --- a/src/GF/OldParsing/ConvertGFCtoMCFG/Nondet.hs +++ b/src/GF/OldParsing/ConvertGFCtoMCFG/Nondet.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:55 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:55 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Converting GFC grammars to MCFG grammars, nondeterministically. -- @@ -26,21 +26,21 @@ import GF.Printing.PrintSimplifiedTerm -- import PrintGFC -- import qualified PrGrammar as PG -import Monad -import Ident (Ident(..)) -import AbsGFC -import GFC -import Look -import Operations -import qualified Modules as M -import CMacros (defLinType) -import MkGFC (grammar2canon) +import Control.Monad +import GF.Infra.Ident (Ident(..)) +import GF.Canon.AbsGFC +import GF.Canon.GFC +import GF.Canon.Look +import GF.Data.Operations +import qualified GF.Infra.Modules as M +import GF.Canon.CMacros (defLinType) +import GF.Canon.MkGFC (grammar2canon) import GF.OldParsing.Utilities import GF.OldParsing.GrammarTypes import GF.OldParsing.MCFGrammar (Grammar, Rule(..), Lin(..)) import GF.Data.SortedList -- import Maybe (listToMaybe) -import List (groupBy) -- , transpose) +import Data.List (groupBy) -- , transpose) import GF.Data.BacktrackM diff --git a/src/GF/OldParsing/ConvertGFCtoMCFG/Old.hs b/src/GF/OldParsing/ConvertGFCtoMCFG/Old.hs index d0869c8f5..b9fbf3b8c 100644 --- a/src/GF/OldParsing/ConvertGFCtoMCFG/Old.hs +++ b/src/GF/OldParsing/ConvertGFCtoMCFG/Old.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:55 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:56 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Converting GFC grammars to MCFG grammars. (Old variant) -- @@ -24,24 +24,24 @@ import GF.System.Tracing import GF.Printing.PrintParser import GF.Printing.PrintSimplifiedTerm --import PrintGFC -import qualified PrGrammar as PG +import qualified GF.Grammar.PrGrammar as PG -import Monad (liftM, liftM2, guard) +import Control.Monad (liftM, liftM2, guard) -- import Maybe (listToMaybe) -import Ident (Ident(..)) -import AbsGFC -import GFC -import Look -import Operations -import qualified Modules as M -import CMacros (defLinType) -import MkGFC (grammar2canon) +import GF.Infra.Ident (Ident(..)) +import GF.Canon.AbsGFC +import GF.Canon.GFC +import GF.Canon.Look +import GF.Data.Operations +import qualified GF.Infra.Modules as M +import GF.Canon.CMacros (defLinType) +import GF.Canon.MkGFC (grammar2canon) import GF.OldParsing.Utilities import GF.OldParsing.GrammarTypes import GF.OldParsing.MCFGrammar (Rule(..), Lin(..)) import GF.Data.SortedList (nubsort, groupPairs) -import Maybe (listToMaybe) -import List (groupBy, transpose) +import Data.Maybe (listToMaybe) +import Data.List (groupBy, transpose) ---------------------------------------------------------------------- -- old style types diff --git a/src/GF/OldParsing/ConvertGFCtoMCFG/Strict.hs b/src/GF/OldParsing/ConvertGFCtoMCFG/Strict.hs index 604fb460b..d1e5c5b20 100644 --- a/src/GF/OldParsing/ConvertGFCtoMCFG/Strict.hs +++ b/src/GF/OldParsing/ConvertGFCtoMCFG/Strict.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:56 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Converting GFC grammars to MCFG grammars, nondeterministically. -- @@ -27,21 +27,21 @@ import GF.Printing.PrintSimplifiedTerm -- import PrintGFC -- import qualified PrGrammar as PG -import Monad -import Ident (Ident(..)) -import AbsGFC -import GFC -import Look -import Operations -import qualified Modules as M -import CMacros (defLinType) -import MkGFC (grammar2canon) +import Control.Monad +import GF.Infra.Ident (Ident(..)) +import GF.Canon.AbsGFC +import GF.Canon.GFC +import GF.Canon.Look +import GF.Data.Operations +import qualified GF.Infra.Modules as M +import GF.Canon.CMacros (defLinType) +import GF.Canon.MkGFC (grammar2canon) import GF.OldParsing.Utilities import GF.OldParsing.GrammarTypes import GF.OldParsing.MCFGrammar (Grammar, Rule(..), Lin(..)) import GF.Data.SortedList -- import Maybe (listToMaybe) -import List (groupBy) -- , transpose) +import Data.List (groupBy) -- , transpose) import GF.Data.BacktrackM diff --git a/src/GF/OldParsing/ConvertGFCtoSimple.hs b/src/GF/OldParsing/ConvertGFCtoSimple.hs index a14fa90b6..343f1f056 100644 --- a/src/GF/OldParsing/ConvertGFCtoSimple.hs +++ b/src/GF/OldParsing/ConvertGFCtoSimple.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:52 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:45 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Converting GFC to SimpleGFC -- @@ -15,16 +15,16 @@ module GF.OldParsing.ConvertGFCtoSimple where -import qualified AbsGFC as A -import qualified Ident as I +import qualified GF.Canon.AbsGFC as A +import qualified GF.Infra.Ident as I import GF.OldParsing.SimpleGFC -import GFC -import MkGFC (grammar2canon) -import qualified Look (lookupLin, allParamValues, lookupLincat) -import qualified CMacros (defLinType) -import Operations (err, errVal) -import qualified Modules as M +import GF.Canon.GFC +import GF.Canon.MkGFC (grammar2canon) +import qualified GF.Canon.Look as Look (lookupLin, allParamValues, lookupLincat) +import qualified GF.Canon.CMacros as CMacros (defLinType) +import GF.Data.Operations (err, errVal) +import qualified GF.Infra.Modules as M import GF.System.Tracing import GF.Printing.PrintParser diff --git a/src/GF/OldParsing/ConvertGrammar.hs b/src/GF/OldParsing/ConvertGrammar.hs index 474834081..0dcd90770 100644 --- a/src/GF/OldParsing/ConvertGrammar.hs +++ b/src/GF/OldParsing/ConvertGrammar.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:52 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:45 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- All (?) grammar conversions which are used in GF ----------------------------------------------------------------------------- @@ -18,11 +18,11 @@ module GF.OldParsing.ConvertGrammar module GF.OldParsing.GrammarTypes ) where -import GFC (CanonGrammar) -import MkGFC (grammar2canon) +import GF.Canon.GFC (CanonGrammar) +import GF.Canon.MkGFC (grammar2canon) import GF.OldParsing.GrammarTypes -import Ident (Ident(..)) -import Option +import GF.Infra.Ident (Ident(..)) +import GF.Infra.Option import GF.System.Tracing -- import qualified GF.OldParsing.FiniteTypes.Calc as Fin diff --git a/src/GF/OldParsing/ConvertMCFGtoCFG.hs b/src/GF/OldParsing/ConvertMCFGtoCFG.hs index 06965994c..58d141166 100644 --- a/src/GF/OldParsing/ConvertMCFGtoCFG.hs +++ b/src/GF/OldParsing/ConvertMCFGtoCFG.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:53 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:46 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Converting MCFG grammars to (possibly overgenerating) CFG ----------------------------------------------------------------------------- @@ -19,7 +19,7 @@ module GF.OldParsing.ConvertMCFGtoCFG import GF.System.Tracing import GF.Printing.PrintParser -import Monad +import Control.Monad import GF.OldParsing.Utilities import qualified GF.OldParsing.MCFGrammar as MCFG import qualified GF.OldParsing.CFGrammar as CFG diff --git a/src/GF/OldParsing/ConvertSimpleToMCFG/Coercions.hs b/src/GF/OldParsing/ConvertSimpleToMCFG/Coercions.hs index 1c107356b..adc42115a 100644 --- a/src/GF/OldParsing/ConvertSimpleToMCFG/Coercions.hs +++ b/src/GF/OldParsing/ConvertSimpleToMCFG/Coercions.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/16 05:40:50 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.2 $ +-- > CVS $Date: 2005/04/21 16:22:57 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.3 $ -- -- Adding coercion functions to a MCFG if necessary. ----------------------------------------------------------------------------- @@ -20,12 +20,12 @@ import GF.Printing.PrintSimplifiedTerm -- import PrintGFC -- import qualified PrGrammar as PG -import qualified Ident +import qualified GF.Infra.Ident as Ident import GF.OldParsing.Utilities --import GF.OldParsing.GrammarTypes import GF.OldParsing.MCFGrammar (Rule(..), Lin(..)) import GF.Data.SortedList -import List (groupBy) -- , transpose) +import Data.List (groupBy) -- , transpose) ---------------------------------------------------------------------- diff --git a/src/GF/OldParsing/ConvertSimpleToMCFG/Nondet.hs b/src/GF/OldParsing/ConvertSimpleToMCFG/Nondet.hs index da7511eaf..6627c5f2e 100644 --- a/src/GF/OldParsing/ConvertSimpleToMCFG/Nondet.hs +++ b/src/GF/OldParsing/ConvertSimpleToMCFG/Nondet.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:58 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Converting SimpleGFC grammars to MCFG grammars, nondeterministically. -- @@ -24,14 +24,14 @@ import GF.Printing.PrintSimplifiedTerm -- import PrintGFC -- import qualified PrGrammar as PG -import Monad +import Control.Monad -- import Ident (Ident(..)) -import qualified AbsGFC +import qualified GF.Canon.AbsGFC as AbsGFC -- import GFC -import Look -import Operations +import GF.Canon.Look +import GF.Data.Operations -- import qualified Modules as M -import CMacros (defLinType) +import GF.Canon.CMacros (defLinType) -- import MkGFC (grammar2canon) import GF.OldParsing.Utilities -- import GF.OldParsing.GrammarTypes @@ -39,7 +39,7 @@ import GF.Data.SortedList import qualified GF.OldParsing.MCFGrammar as MCF (Grammar, Rule(..), Lin(..)) import GF.OldParsing.SimpleGFC -- import Maybe (listToMaybe) -import List (groupBy) -- , transpose) +import Data.List (groupBy) -- , transpose) import GF.Data.BacktrackM diff --git a/src/GF/OldParsing/ConvertSimpleToMCFG/Old.hs b/src/GF/OldParsing/ConvertSimpleToMCFG/Old.hs index 88a459625..dd2ff0713 100644 --- a/src/GF/OldParsing/ConvertSimpleToMCFG/Old.hs +++ b/src/GF/OldParsing/ConvertSimpleToMCFG/Old.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:59 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Converting GFC grammars to MCFG grammars. (Old variant) -- @@ -18,30 +18,30 @@ ----------------------------------------------------------------------------- -module GF.OldParsing.ConvertGFCtoMCFG.Old (convertGrammar) where +module GF.OldParsing.ConvertSimpleToMCFG.Old (convertGrammar) where import GF.System.Tracing import GF.Printing.PrintParser import GF.Printing.PrintSimplifiedTerm --import PrintGFC -import qualified PrGrammar as PG +import qualified GF.Grammar.PrGrammar as PG -import Monad (liftM, liftM2, guard) +import Control.Monad (liftM, liftM2, guard) -- import Maybe (listToMaybe) -import Ident (Ident(..)) -import AbsGFC -import GFC -import Look -import Operations -import qualified Modules as M -import CMacros (defLinType) -import MkGFC (grammar2canon) +import GF.Infra.Ident (Ident(..)) +import GF.Canon.AbsGFC +import GF.Canon.GFC +import GF.Canon.Look +import GF.Data.Operations +import qualified GF.Infra.Modules as M +import GF.Canon.CMacros (defLinType) +import GF.Canon.MkGFC (grammar2canon) import GF.OldParsing.Utilities import GF.OldParsing.GrammarTypes import GF.OldParsing.MCFGrammar (Rule(..), Lin(..)) import GF.Data.SortedList (nubsort, groupPairs) -import Maybe (listToMaybe) -import List (groupBy, transpose) +import Data.Maybe (listToMaybe) +import Data.List (groupBy, transpose) ---------------------------------------------------------------------- -- old style types diff --git a/src/GF/OldParsing/ConvertSimpleToMCFG/Strict.hs b/src/GF/OldParsing/ConvertSimpleToMCFG/Strict.hs index a1be8af4e..aa741518a 100644 --- a/src/GF/OldParsing/ConvertSimpleToMCFG/Strict.hs +++ b/src/GF/OldParsing/ConvertSimpleToMCFG/Strict.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:23:00 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Converting SimpleGFC grammars to MCFG grammars, deterministic. -- @@ -16,12 +16,12 @@ ----------------------------------------------------------------------------- -module GF.OldParsing.ConvertGFCtoMCFG.Strict (convertGrammar) where +module GF.OldParsing.ConvertSimpleToMCFG.Strict (convertGrammar) where import GF.System.Tracing import GF.Infra.Print -import Monad +import Control.Monad import GF.Formalism.Utilities import GF.Formalism.GCFG @@ -32,20 +32,20 @@ import GF.Conversion.Types import GF.Data.BacktrackM {- -import Ident (Ident(..)) -import AbsGFC -import GFC -import Look -import Operations -import qualified Modules as M -import CMacros (defLinType) -import MkGFC (grammar2canon) +import GF.Infra.Ident (Ident(..)) +import GF.Canon.AbsGFC +import GF.Canon.GFC +import GF.Canon.Look +import GF.Data.Operations +import qualified GF.Infra.Modules as M +import GF.Canon.CMacros (defLinType) +import GF.Canon.MkGFC (grammar2canon) import GF.OldParsing.Utilities import GF.OldParsing.GrammarTypes import GF.OldParsing.MCFGrammar (Grammar, Rule(..), Lin(..)) import GF.Data.SortedList -- import Maybe (listToMaybe) -import List (groupBy) -- , transpose) +import Data.List (groupBy) -- , transpose) import GF.Data.BacktrackM -} diff --git a/src/GF/OldParsing/GrammarTypes.hs b/src/GF/OldParsing/GrammarTypes.hs index af2832bdf..fc514fc75 100644 --- a/src/GF/OldParsing/GrammarTypes.hs +++ b/src/GF/OldParsing/GrammarTypes.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:53 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:46 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- All possible instantiations of different grammar formats used for parsing -- @@ -33,8 +33,8 @@ module GF.OldParsing.GrammarTypes (++.), (++!) ) where -import Ident (Ident(..)) -import AbsGFC +import GF.Infra.Ident (Ident(..)) +import GF.Canon.AbsGFC -- import qualified GF.OldParsing.FiniteTypes.Calc as Fin import qualified GF.OldParsing.CFGrammar as CFG import qualified GF.OldParsing.MCFGrammar as MCFG diff --git a/src/GF/OldParsing/IncrementalChart.hs b/src/GF/OldParsing/IncrementalChart.hs index 2a941ec84..132ed4dc4 100644 --- a/src/GF/OldParsing/IncrementalChart.hs +++ b/src/GF/OldParsing/IncrementalChart.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:53 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:47 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Implementation of /incremental/ deductive parsing, -- i.e. parsing one word at the time. @@ -22,7 +22,7 @@ module GF.OldParsing.IncrementalChart chartList ) where -import Array +import Data.Array import GF.Data.SortedList import GF.Data.Assoc diff --git a/src/GF/OldParsing/MCFGrammar.hs b/src/GF/OldParsing/MCFGrammar.hs index 350c574a7..ff9d7de1b 100644 --- a/src/GF/OldParsing/MCFGrammar.hs +++ b/src/GF/OldParsing/MCFGrammar.hs @@ -5,15 +5,15 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:54 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:48 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Definitions of multiple context-free grammars, -- parser information and chart conversion ----------------------------------------------------------------------------- -module GF.OldParsing.MCFGrammar +module GF.OldParsing.MCFGrammar (-- * Type definitions Grammar, Rule(..), diff --git a/src/GF/OldParsing/ParseCF.hs b/src/GF/OldParsing/ParseCF.hs index 0ed19c786..e1ef32aee 100644 --- a/src/GF/OldParsing/ParseCF.hs +++ b/src/GF/OldParsing/ParseCF.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:54 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:49 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Chart parsing of grammars in CF format ----------------------------------------------------------------------------- @@ -20,8 +20,8 @@ import GF.Printing.PrintSimplifiedTerm import GF.Data.SortedList (nubsort) import GF.Data.Assoc -import qualified CF -import qualified CFIdent as CFI +import qualified GF.CF.CF as CF +import qualified GF.CF.CFIdent as CFI import GF.OldParsing.Utilities import GF.OldParsing.CFGrammar import qualified GF.OldParsing.ParseCFG as P diff --git a/src/GF/OldParsing/ParseCFG.hs b/src/GF/OldParsing/ParseCFG.hs index 7cba41175..03c1d7dcc 100644 --- a/src/GF/OldParsing/ParseCFG.hs +++ b/src/GF/OldParsing/ParseCFG.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:54 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:49 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Main parsing module for context-free grammars ----------------------------------------------------------------------------- @@ -15,7 +15,7 @@ module GF.OldParsing.ParseCFG (parse) where -import Char (toLower) +import Data.Char (toLower) import GF.OldParsing.Utilities import GF.OldParsing.CFGrammar import qualified GF.OldParsing.ParseCFG.General as PGen diff --git a/src/GF/OldParsing/ParseCFG/General.hs b/src/GF/OldParsing/ParseCFG/General.hs index 7ac395ba3..438c89f1a 100644 --- a/src/GF/OldParsing/ParseCFG/General.hs +++ b/src/GF/OldParsing/ParseCFG/General.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:57 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:23:00 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Several implementations of CFG chart parsing ----------------------------------------------------------------------------- -module GF.OldParsing.ParseCFG.General +module GF.OldParsing.ParseCFG.General (parse, Strategy) where import GF.System.Tracing diff --git a/src/GF/OldParsing/ParseCFG/Incremental.hs b/src/GF/OldParsing/ParseCFG/Incremental.hs index 882fad26e..f1bcde404 100644 --- a/src/GF/OldParsing/ParseCFG/Incremental.hs +++ b/src/GF/OldParsing/ParseCFG/Incremental.hs @@ -5,27 +5,27 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:57 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:23:01 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Incremental chart parsing for context-free grammars ----------------------------------------------------------------------------- -module GF.OldParsing.ParseCFG.Incremental +module GF.OldParsing.ParseCFG.Incremental (parse, Strategy) where import GF.System.Tracing import GF.Printing.PrintParser -- haskell modules: -import Array +import Data.Array -- gf modules: import GF.Data.SortedList import GF.Data.Assoc -import Operations +import GF.Data.Operations -- parser modules: import GF.OldParsing.Utilities import GF.OldParsing.CFGrammar diff --git a/src/GF/OldParsing/ParseGFC.hs b/src/GF/OldParsing/ParseGFC.hs index ebd4dc782..fbc6cff5a 100644 --- a/src/GF/OldParsing/ParseGFC.hs +++ b/src/GF/OldParsing/ParseGFC.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:54 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:50 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- The main parsing module, parsing GFC grammars -- by translating to simpler formats, such as PMCFG and CFG @@ -17,20 +17,20 @@ module GF.OldParsing.ParseGFC (newParser) where import GF.System.Tracing import GF.Printing.PrintParser -import qualified PrGrammar +import qualified GF.Grammar.PrGrammar as PrGrammar -- Haskell modules -import Monad +import Control.Monad -- import Ratio ((%)) -- GF modules -import qualified Grammar as GF -import Values -import qualified Macros -import qualified Modules as Mods -import qualified AbsGFC -import qualified Ident -import qualified ShellState as SS -import Operations +import qualified GF.Grammar.Grammar as GF +import GF.Grammar.Values +import qualified GF.Grammar.Macros as Macros +import qualified GF.Infra.Modules as Mods +import qualified GF.Canon.AbsGFC as AbsGFC +import qualified GF.Infra.Ident as Ident +import qualified GF.Compile.ShellState as SS +import GF.Data.Operations import GF.Data.SortedList -- Conversion and parser modules import GF.Data.Assoc diff --git a/src/GF/OldParsing/ParseMCFG.hs b/src/GF/OldParsing/ParseMCFG.hs index ad29e5f2f..c845a76b3 100644 --- a/src/GF/OldParsing/ParseMCFG.hs +++ b/src/GF/OldParsing/ParseMCFG.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:54 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:52 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Main module for MCFG parsing ----------------------------------------------------------------------------- @@ -15,7 +15,7 @@ module GF.OldParsing.ParseMCFG (parse) where -import Char (toLower) +import Data.Char (toLower) import GF.OldParsing.Utilities import GF.OldParsing.MCFGrammar import qualified GF.OldParsing.ParseMCFG.Basic as PBas diff --git a/src/GF/OldParsing/ParseMCFG/Basic.hs b/src/GF/OldParsing/ParseMCFG/Basic.hs index 7b0d01dde..baf7e4b2a 100644 --- a/src/GF/OldParsing/ParseMCFG/Basic.hs +++ b/src/GF/OldParsing/ParseMCFG/Basic.hs @@ -5,19 +5,19 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:57 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:23:03 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Simplest possible implementation of MCFG chart parsing ----------------------------------------------------------------------------- -module GF.OldParsing.ParseMCFG.Basic +module GF.OldParsing.ParseMCFG.Basic (parse) where import GF.System.Tracing -import Ix +import Data.Ix import GF.OldParsing.Utilities import GF.OldParsing.MCFGrammar import GF.OldParsing.GeneralChart diff --git a/src/GF/OldParsing/SimpleGFC.hs b/src/GF/OldParsing/SimpleGFC.hs index 456c44685..59f379bb4 100644 --- a/src/GF/OldParsing/SimpleGFC.hs +++ b/src/GF/OldParsing/SimpleGFC.hs @@ -4,22 +4,22 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:54 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:52 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Simplistic GFC format ----------------------------------------------------------------------------- module GF.OldParsing.SimpleGFC where -import qualified AbsGFC -import qualified Ident +import qualified GF.Canon.AbsGFC as AbsGFC +import qualified GF.Infra.Ident as Ident import GF.Printing.PrintParser import GF.Printing.PrintSimplifiedTerm -import Operations (ifNull) +import GF.Data.Operations (ifNull) ---------------------------------------------------------------------- diff --git a/src/GF/OldParsing/Utilities.hs b/src/GF/OldParsing/Utilities.hs index 22d168973..6bacfe1fe 100644 --- a/src/GF/OldParsing/Utilities.hs +++ b/src/GF/OldParsing/Utilities.hs @@ -5,15 +5,15 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:52:55 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Date: 2005/04/21 16:22:54 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.2 $ -- -- Basic type declarations and functions to be used when parsing ----------------------------------------------------------------------------- -module GF.OldParsing.Utilities +module GF.OldParsing.Utilities ( -- * Symbols Symbol(..), symbol, mapSymbol, -- * Edges @@ -26,8 +26,8 @@ module GF.OldParsing.Utilities ) where -- haskell modules: -import Monad -import Array +import Control.Monad +import Data.Array -- gf modules: import GF.Data.SortedList import GF.Data.Assoc diff --git a/src/GF/Parsing/CF.hs b/src/GF/Parsing/CF.hs index 4bdaf0869..1a65f6caf 100644 --- a/src/GF/Parsing/CF.hs +++ b/src/GF/Parsing/CF.hs @@ -4,27 +4,27 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:44 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:23:04 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- Chart parsing of grammars in CF format ----------------------------------------------------------------------------- -module GF.NewParsing.CF (parse) where +module GF.Parsing.CF (parse) where -import Operations (errVal) +import GF.Data.Operations (errVal) import GF.System.Tracing import GF.Infra.Print import GF.Data.SortedList (nubsort) import GF.Data.Assoc -import qualified CF -import qualified CFIdent as CFI +import qualified GF.CF.CF as CF +import qualified GF.CF.CFIdent as CFI import GF.Formalism.Utilities import GF.Formalism.CFG -import qualified GF.NewParsing.CFG as P +import qualified GF.Parsing.CFG as P type Token = CFI.CFTok type Name = CFI.CFFun diff --git a/src/GF/Parsing/CFG.hs b/src/GF/Parsing/CFG.hs index 051e8bab0..34b1619a4 100644 --- a/src/GF/Parsing/CFG.hs +++ b/src/GF/Parsing/CFG.hs @@ -4,24 +4,24 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:44 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:23:05 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- CFG parsing ----------------------------------------------------------------------------- -module GF.NewParsing.CFG - (parseCF, module GF.NewParsing.CFG.PInfo) where +module GF.Parsing.CFG + (parseCF, module GF.Parsing.CFG.PInfo) where -import Operations (Err(..)) +import GF.Data.Operations (Err(..)) import GF.Formalism.Utilities import GF.Formalism.CFG -import GF.NewParsing.CFG.PInfo +import GF.Parsing.CFG.PInfo -import qualified GF.NewParsing.CFG.Incremental as Inc -import qualified GF.NewParsing.CFG.General as Gen +import qualified GF.Parsing.CFG.Incremental as Inc +import qualified GF.Parsing.CFG.General as Gen ---------------------------------------------------------------------- -- parsing diff --git a/src/GF/Parsing/CFG/General.hs b/src/GF/Parsing/CFG/General.hs index 52b3c5665..4f5959a85 100644 --- a/src/GF/Parsing/CFG/General.hs +++ b/src/GF/Parsing/CFG/General.hs @@ -4,14 +4,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:33 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:23:08 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- CFG parsing with a general chart ----------------------------------------------------------------------------- -module GF.NewParsing.CFG.General +module GF.Parsing.CFG.General (parse, Strategy) where import GF.System.Tracing @@ -19,10 +19,10 @@ import GF.Infra.Print import GF.Formalism.Utilities import GF.Formalism.CFG -import GF.NewParsing.CFG.PInfo -import GF.NewParsing.GeneralChart +import GF.Parsing.CFG.PInfo +import GF.Data.GeneralDeduction import GF.Data.Assoc -import Monad +import Control.Monad parse :: (Ord n, Ord c, Ord t) => Strategy -> CFParser c n t parse strategy grammar start = extract . diff --git a/src/GF/Parsing/CFG/Incremental.hs b/src/GF/Parsing/CFG/Incremental.hs index 54aaf3b6d..adab2b73c 100644 --- a/src/GF/Parsing/CFG/Incremental.hs +++ b/src/GF/Parsing/CFG/Incremental.hs @@ -4,29 +4,29 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:33 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:23:09 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- Incremental chart parsing for CFG ----------------------------------------------------------------------------- -module GF.NewParsing.CFG.Incremental +module GF.Parsing.CFG.Incremental (parse, Strategy) where import GF.System.Tracing import GF.Infra.Print -import Array +import Data.Array -import Operations +import GF.Data.Operations import GF.Data.SortedList import GF.Data.Assoc import GF.Formalism.Utilities import GF.Formalism.CFG -import GF.NewParsing.CFG.PInfo -import GF.NewParsing.IncrementalChart +import GF.Parsing.CFG.PInfo +import GF.Data.IncrementalDeduction -- | parsing strategy: (predict:(BU, TD), filter:(BU, TD)) diff --git a/src/GF/Parsing/CFG/PInfo.hs b/src/GF/Parsing/CFG/PInfo.hs index c8bb9af29..81d8d3724 100644 --- a/src/GF/Parsing/CFG/PInfo.hs +++ b/src/GF/Parsing/CFG/PInfo.hs @@ -4,14 +4,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/18 14:55:33 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.3 $ +-- > CVS $Date: 2005/04/21 16:23:10 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.4 $ -- -- CFG parsing, parser information ----------------------------------------------------------------------------- -module GF.NewParsing.CFG.PInfo +module GF.Parsing.CFG.PInfo (CFParser, CFPInfo(..), buildCFPInfo) where import GF.System.Tracing diff --git a/src/GF/Parsing/GFC.hs b/src/GF/Parsing/GFC.hs index 039cb34a7..7f54186a7 100644 --- a/src/GF/Parsing/GFC.hs +++ b/src/GF/Parsing/GFC.hs @@ -4,28 +4,28 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:44 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:23:06 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- The main parsing module, parsing GFC grammars -- by translating to simpler formats, such as PMCFG and CFG ---------------------------------------------------------------------- -module GF.NewParsing.GFC +module GF.Parsing.GFC (parse, PInfo(..), buildPInfo) where import GF.System.Tracing import GF.Infra.Print -import qualified PrGrammar +import qualified GF.Grammar.PrGrammar as PrGrammar -import Operations (Err(..)) +import GF.Data.Operations (Err(..)) -import qualified Grammar -import qualified Macros -import qualified AbsGFC -import qualified Ident -import CFIdent (CFCat, cfCat2Ident, CFTok, wordsCFTok) +import qualified GF.Grammar.Grammar as Grammar +import qualified GF.Grammar.Macros as Macros +import qualified GF.Canon.AbsGFC as AbsGFC +import qualified GF.Infra.Ident as Ident +import GF.CF.CFIdent (CFCat, cfCat2Ident, CFTok, wordsCFTok) import GF.Data.SortedList import GF.Data.Assoc @@ -36,8 +36,8 @@ import qualified GF.Formalism.GCFG as G import qualified GF.Formalism.SimpleGFC as S import qualified GF.Formalism.MCFG as M import qualified GF.Formalism.CFG as C -import qualified GF.NewParsing.MCFG as PM -import qualified GF.NewParsing.CFG as PC +import qualified GF.Parsing.MCFG as PM +import qualified GF.Parsing.CFG as PC ---------------------------------------------------------------------- -- parsing information diff --git a/src/GF/Parsing/MCFG.hs b/src/GF/Parsing/MCFG.hs index 7c239ba3b..11c845365 100644 --- a/src/GF/Parsing/MCFG.hs +++ b/src/GF/Parsing/MCFG.hs @@ -4,26 +4,26 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:45 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.2 $ +-- > CVS $Date: 2005/04/21 16:23:07 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.3 $ -- -- MCFG parsing ----------------------------------------------------------------------------- -module GF.NewParsing.MCFG - (parseMCF, module GF.NewParsing.MCFG.PInfo) where +module GF.Parsing.MCFG + (parseMCF, module GF.Parsing.MCFG.PInfo) where -import Operations (Err(..)) +import GF.Data.Operations (Err(..)) import GF.Formalism.Utilities import GF.Formalism.GCFG import GF.Formalism.MCFG -import GF.NewParsing.MCFG.PInfo +import GF.Parsing.MCFG.PInfo -import qualified GF.NewParsing.MCFG.Naive as Naive -import qualified GF.NewParsing.MCFG.Active as Active -import qualified GF.NewParsing.MCFG.Range as Range (makeRange) +import qualified GF.Parsing.MCFG.Naive as Naive +import qualified GF.Parsing.MCFG.Active as Active +import qualified GF.Parsing.MCFG.Range as Range (makeRange) ---------------------------------------------------------------------- -- parsing diff --git a/src/GF/Parsing/MCFG/Active.hs b/src/GF/Parsing/MCFG/Active.hs index dd8516379..44661b0c9 100644 --- a/src/GF/Parsing/MCFG/Active.hs +++ b/src/GF/Parsing/MCFG/Active.hs @@ -1,14 +1,14 @@ -module GF.NewParsing.MCFG.Active (parse) where +module GF.Parsing.MCFG.Active (parse) where -import GF.NewParsing.GeneralChart +import GF.Data.GeneralDeduction import GF.Formalism.GCFG import GF.Formalism.MCFG import GF.Formalism.Utilities -import GF.NewParsing.MCFG.Range -import GF.NewParsing.MCFG.PInfo +import GF.Parsing.MCFG.Range +import GF.Parsing.MCFG.PInfo import GF.System.Tracing -import Monad (guard) +import Control.Monad (guard) ---------------------------------------------------------------------- -- * parsing diff --git a/src/GF/Parsing/MCFG/Incremental.hs b/src/GF/Parsing/MCFG/Incremental.hs index 897d365c9..21467078f 100644 --- a/src/GF/Parsing/MCFG/Incremental.hs +++ b/src/GF/Parsing/MCFG/Incremental.hs @@ -8,19 +8,19 @@ As described in Ljunglöf (2004) ------------------------------------------------------------------------------} -module IncrementalParse where +module GF.Parsing.MCFG.Incremental where -- Haskell -import List +import Data.List -- GF modules import Examples -import GeneralChart -import MCFGrammar +import GF.OldParsing.GeneralChart +import GF.OldParsing.MCFGrammar import MCFParser import Parser -import Range +import GF.Parsing.MCFG.Range import Nondet diff --git a/src/GF/Parsing/MCFG/Naive.hs b/src/GF/Parsing/MCFG/Naive.hs index 1d315506d..4b994e726 100644 --- a/src/GF/Parsing/MCFG/Naive.hs +++ b/src/GF/Parsing/MCFG/Naive.hs @@ -1,14 +1,14 @@ -module GF.NewParsing.MCFG.Naive (parse) where +module GF.Parsing.MCFG.Naive (parse) where -- GF modules -import GF.NewParsing.GeneralChart +import GF.Data.GeneralDeduction import GF.Formalism.GCFG import GF.Formalism.MCFG import GF.Formalism.Utilities -import GF.NewParsing.MCFG.Range -import GF.NewParsing.MCFG.PInfo +import GF.Parsing.MCFG.Range +import GF.Parsing.MCFG.PInfo import GF.Data.SortedList import GF.Data.Assoc import GF.System.Tracing diff --git a/src/GF/Parsing/MCFG/PInfo.hs b/src/GF/Parsing/MCFG/PInfo.hs index a51ec7d20..b89ce6d5e 100644 --- a/src/GF/Parsing/MCFG/PInfo.hs +++ b/src/GF/Parsing/MCFG/PInfo.hs @@ -4,14 +4,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:45 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.2 $ +-- > CVS $Date: 2005/04/21 16:23:14 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.3 $ -- -- MCFG parsing, parser information ----------------------------------------------------------------------------- -module GF.NewParsing.MCFG.PInfo where +module GF.Parsing.MCFG.PInfo where import GF.System.Tracing import GF.Infra.Print @@ -21,7 +21,7 @@ import GF.Formalism.GCFG import GF.Formalism.MCFG import GF.Data.SortedList import GF.Data.Assoc -import GF.NewParsing.MCFG.Range +import GF.Parsing.MCFG.Range ---------------------------------------------------------------------- -- type declarations diff --git a/src/GF/Parsing/MCFG/Range.hs b/src/GF/Parsing/MCFG/Range.hs index e60b9916e..994f8fdb7 100644 --- a/src/GF/Parsing/MCFG/Range.hs +++ b/src/GF/Parsing/MCFG/Range.hs @@ -1,10 +1,10 @@ -module GF.NewParsing.MCFG.Range where +module GF.Parsing.MCFG.Range where -- Haskell -import List -import Monad +import Data.List +import Control.Monad -- GF modules import GF.Formalism.GCFG diff --git a/src/GF/Parsing/MCFG/ViaCFG.hs b/src/GF/Parsing/MCFG/ViaCFG.hs index f1b76bb75..5007eec20 100644 --- a/src/GF/Parsing/MCFG/ViaCFG.hs +++ b/src/GF/Parsing/MCFG/ViaCFG.hs @@ -8,24 +8,24 @@ Ljunglöf (2004) ------------------------------------------------------------------------------} -module ApproxParse where +module GF.Parsing.MCFG.ViaCFG where -- Haskell modules -import List -import Monad +import Data.List +import Control.Monad -- GF modules import ConvertMCFGtoDecoratedCFG import qualified DecoratedCFParser as CFP import qualified DecoratedGrammar as CFG import Examples -import GeneralChart -import qualified MCFGrammar as MCFG +import GF.OldParsing.GeneralChart +import qualified GF.OldParsing.MCFGrammar as MCFG import MCFParser import Nondet import Parser -import Range +import GF.Parsing.MCFG.Range {-- Datatypes ----------------------------------------------------------------- @@ -180,4 +180,4 @@ symToRec beta = map makeLblRng $ groupBy (\(_, d) (_, d') -> (d == d')) sBd (_, d) (_, d') | d < d' = LT | d > d' = GT - | otherwise = EQ \ No newline at end of file + | otherwise = EQ diff --git a/src/GF/Printing/PrintParser.hs b/src/GF/Printing/PrintParser.hs index 0869bf685..d9041ecaa 100644 --- a/src/GF/Printing/PrintParser.hs +++ b/src/GF/Printing/PrintParser.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/29 11:17:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.2 $ +-- > CVS $Date: 2005/04/21 16:23:16 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.3 $ -- -- Pretty-printing of parser objects ----------------------------------------------------------------------------- @@ -19,11 +19,11 @@ module GF.Printing.PrintParser (Print(..), ) where -- haskell modules: -import List (intersperse) +import Data.List (intersperse) -- gf modules: -import Operations (Err(..)) -import Ident (Ident(..)) -import qualified PrintGFC as P +import GF.Data.Operations (Err(..)) +import GF.Infra.Ident (Ident(..)) +import qualified GF.Canon.PrintGFC as P ------------------------------------------------------------ diff --git a/src/GF/Printing/PrintSimplifiedTerm.hs b/src/GF/Printing/PrintSimplifiedTerm.hs index bde186549..309fe8f6d 100644 --- a/src/GF/Printing/PrintSimplifiedTerm.hs +++ b/src/GF/Printing/PrintSimplifiedTerm.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/29 11:17:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.2 $ +-- > CVS $Date: 2005/04/21 16:23:17 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.3 $ -- -- Instances for printing terms in a simplified format ----------------------------------------------------------------------------- @@ -15,11 +15,11 @@ module GF.Printing.PrintSimplifiedTerm () where -import AbsGFC -import CF -import CFIdent +import GF.Canon.AbsGFC +import GF.CF.CF +import GF.CF.CFIdent import GF.Printing.PrintParser -import qualified PrintGFC as P +import qualified GF.Canon.PrintGFC as P instance Print Term where prt (Arg arg) = prt arg diff --git a/src/GF/Shell.hs b/src/GF/Shell.hs index 9c22cdd14..af1fabf34 100644 --- a/src/GF/Shell.hs +++ b/src/GF/Shell.hs @@ -5,58 +5,58 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/25 15:35:48 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.34 $ +-- > CVS $Date: 2005/04/21 16:21:04 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.35 $ -- -- GF shell command interpreter. ----------------------------------------------------------------------------- -module Shell where +module GF.Shell where --- abstract away from these? -import Str -import qualified Grammar as G -import qualified Ident as I -import qualified Compute as Co -import qualified CheckGrammar as Ch -import qualified Lookup as L -import qualified GFC -import qualified Look -import qualified CMacros -import qualified GrammarToCanon -import Values -import GetTree +import GF.Data.Str +import qualified GF.Grammar.Grammar as G +import qualified GF.Infra.Ident as I +import qualified GF.Grammar.Compute as Co +import qualified GF.Compile.CheckGrammar as Ch +import qualified GF.Grammar.Lookup as L +import qualified GF.Canon.GFC as GFC +import qualified GF.Canon.Look as Look +import qualified GF.Canon.CMacros as CMacros +import qualified GF.Compile.GrammarToCanon as GrammarToCanon +import GF.Grammar.Values +import GF.UseGrammar.GetTree -import ShellCommands +import GF.Shell.ShellCommands -import VisualizeGrammar (visualizeCanonGrammar, visualizeSourceGrammar) -import API -import IOGrammar -import Compile +import GF.Visualization.VisualizeGrammar (visualizeCanonGrammar, visualizeSourceGrammar) +import GF.API +import GF.API.IOGrammar +import GF.Compile.Compile ---- import GFTex -import TeachYourself -- also a subshell +import GF.Shell.TeachYourself -- also a subshell -import Randomized --- -import Editing (goFirstMeta) --- +import GF.UseGrammar.Randomized --- +import GF.UseGrammar.Editing (goFirstMeta) --- -import ShellState -import Option -import Information -import HelpFile -import PrOld -import PrGrammar +import GF.Compile.ShellState +import GF.Infra.Option +import GF.UseGrammar.Information +import GF.Shell.HelpFile +import GF.Compile.PrOld +import GF.Grammar.PrGrammar -import Monad (foldM,liftM) +import Control.Monad (foldM,liftM) import System (system) -import Random (newStdGen) ---- -import Zipper ---- +import System.Random (newStdGen) ---- +import GF.Data.Zipper ---- -import Operations -import UseIO -import UTF8 (encodeUTF8) +import GF.Data.Operations +import GF.Infra.UseIO +import GF.Text.UTF8 (encodeUTF8) -import VisualizeGrammar (visualizeSourceGrammar) +import GF.Visualization.VisualizeGrammar (visualizeSourceGrammar) ---- import qualified GrammarToGramlet as Gr ---- import qualified GrammarToCanonXML2 as Canon diff --git a/src/GF/Shell/CommandL.hs b/src/GF/Shell/CommandL.hs index 9f7315c56..889af5b6f 100644 --- a/src/GF/Shell/CommandL.hs +++ b/src/GF/Shell/CommandL.hs @@ -5,32 +5,32 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/10 11:14:11 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.15 $ +-- > CVS $Date: 2005/04/21 16:23:19 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.16 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module CommandL where +module GF.Shell.CommandL where -import Operations -import UseIO +import GF.Data.Operations +import GF.Infra.UseIO -import CMacros -import Values (Tree) +import GF.Canon.CMacros +import GF.Grammar.Values (Tree) -import GetTree -import ShellState -import Option -import Session -import Commands +import GF.UseGrammar.GetTree +import GF.Compile.ShellState +import GF.Infra.Option +import GF.UseGrammar.Session +import GF.Shell.Commands -import Char -import List (intersperse) -import Monad (foldM) +import Data.Char +import Data.List (intersperse) +import Control.Monad (foldM) -import UTF8 +import GF.Text.UTF8 -- | a line-based shell initEditLoop :: CEnv -> IO () -> IO () diff --git a/src/GF/Shell/Commands.hs b/src/GF/Shell/Commands.hs index 03cd7cbe2..d95cd51b1 100644 --- a/src/GF/Shell/Commands.hs +++ b/src/GF/Shell/Commands.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/10 11:14:11 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.36 $ +-- > CVS $Date: 2005/04/21 16:23:19 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.37 $ -- -- temporary hacks for GF 2.0 -- @@ -16,49 +16,49 @@ -- See "CommandsL" for a parser of a command language. ----------------------------------------------------------------------------- -module Commands where +module GF.Shell.Commands where -import Operations -import Zipper +import GF.Data.Operations +import GF.Data.Zipper -import qualified Grammar as G ---- Cat, Fun, Q, QC -import GFC -import CMacros -import Macros (qq)---- -import LookAbs -import Look -import Values (loc2treeFocus,tree2exp)---- +import qualified GF.Grammar.Grammar as G ---- Cat, Fun, Q, QC +import GF.Canon.GFC +import GF.Canon.CMacros +import GF.Grammar.Macros (qq)---- +import GF.Grammar.LookAbs +import GF.Canon.Look +import GF.Grammar.Values (loc2treeFocus,tree2exp)---- -import GetTree -import API -import ShellState +import GF.UseGrammar.GetTree +import GF.API +import GF.Compile.ShellState -import qualified Shell -import qualified PShell -import qualified Macros as M -import PrGrammar -import PGrammar -import IOGrammar -import UseIO -import Unicode +import qualified GF.Shell as Shell +import qualified GF.Shell.PShell as PShell +import qualified GF.Grammar.Macros as M +import GF.Grammar.PrGrammar +import GF.Compile.PGrammar +import GF.API.IOGrammar +import GF.Infra.UseIO +import GF.Text.Unicode -import CF -import CFIdent (cat2CFCat, cfCat2Cat) -import PPrCF (prCFCat) -import Linear -import Randomized -import Editing -import Session -import Custom +import GF.CF.CF +import GF.CF.CFIdent (cat2CFCat, cfCat2Cat) +import GF.CF.PPrCF (prCFCat) +import GF.UseGrammar.Linear +import GF.UseGrammar.Randomized +import GF.UseGrammar.Editing +import GF.UseGrammar.Session +import GF.UseGrammar.Custom -import qualified Ident as I -import Option -import Str (sstr) ---- -import UTF8 ---- +import qualified GF.Infra.Ident as I +import GF.Infra.Option +import GF.Data.Str (sstr) ---- +import GF.Text.UTF8 ---- -import Random (StdGen, mkStdGen, newStdGen) -import Monad (liftM2, foldM) -import List (intersperse) +import System.Random (StdGen, mkStdGen, newStdGen) +import Control.Monad (liftM2, foldM) +import Data.List (intersperse) --- temporary hacks for GF 2.0 diff --git a/src/GF/Shell/HelpFile.hs b/src/GF/Shell/HelpFile.hs index 8b0ab96fc..e55495e66 100644 --- a/src/GF/Shell/HelpFile.hs +++ b/src/GF/Shell/HelpFile.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/21 11:40:59 $ +-- > CVS $Date: 2005/04/21 16:23:20 $ -- > CVS $Author: bringert $ --- > CVS $Revision: 1.1 $ +-- > CVS $Revision: 1.2 $ -- -- Help on shell commands. Generated from HelpFile by 'make help'. -- PLEASE DON'T EDIT THIS FILE. @@ -16,7 +16,7 @@ module GF.Shell.HelpFile where -import Operations +import GF.Data.Operations txtHelpFileSummary = unlines $ map (concat . take 1 . lines) $ paragraphs txtHelpFile @@ -516,4 +516,4 @@ txtHelpFile = "\n -unlexer=bind like identity, but bind at \"&+\"" ++ "\n" ++ "\n-- *: Commands and options marked with * are not yet implemented." ++ - [] \ No newline at end of file + [] diff --git a/src/GF/Shell/JGF.hs b/src/GF/Shell/JGF.hs index e3438a33c..58be7bfbf 100644 --- a/src/GF/Shell/JGF.hs +++ b/src/GF/Shell/JGF.hs @@ -5,28 +5,28 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/10 11:14:11 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.11 $ +-- > CVS $Date: 2005/04/21 16:23:21 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.12 $ -- -- GF editing session controlled by e.g. a Java program. AR 16\/11\/2001 ----------------------------------------------------------------------------- -module JGF where +module GF.Shell.JGF where -import Operations -import UseIO -import Unicode +import GF.Data.Operations +import GF.Infra.UseIO +import GF.Text.Unicode -import IOGrammar -import Option -import ShellState -import Session -import Commands -import CommandL +import GF.API.IOGrammar +import GF.Infra.Option +import GF.Compile.ShellState +import GF.UseGrammar.Session +import GF.Shell.Commands +import GF.Shell.CommandL import System -import UTF8 +import GF.Text.UTF8 -- GF editing session controlled by e.g. a Java program. AR 16/11/2001 diff --git a/src/GF/Shell/PShell.hs b/src/GF/Shell/PShell.hs index bb375d00d..b84e3c4f3 100644 --- a/src/GF/Shell/PShell.hs +++ b/src/GF/Shell/PShell.hs @@ -5,27 +5,27 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:37 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.18 $ +-- > CVS $Date: 2005/04/21 16:23:22 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.19 $ -- -- parsing GF shell commands. AR 11\/11\/2001 ----------------------------------------------------------------------------- -module PShell where +module GF.Shell.PShell where -import Operations -import UseIO -import ShellState -import ShellCommands -import Shell -import Option -import PGrammar (pzIdent, pTrm) --- (string2formsAndTerm) -import API +import GF.Data.Operations +import GF.Infra.UseIO +import GF.Compile.ShellState +import GF.Shell.ShellCommands +import GF.Shell +import GF.Infra.Option +import GF.Compile.PGrammar (pzIdent, pTrm) --- (string2formsAndTerm) +import GF.API import Arch(fetchCommand) -import Char (isDigit) -import IO +import Data.Char (isDigit) +import System.IO.Error -- parsing GF shell commands. AR 11/11/2001 @@ -37,7 +37,7 @@ getCommandLines = do getCommandLinesBatch :: IO (String,[CommandLine]) getCommandLinesBatch = do - s <- catch getLine (\e -> if IO.isEOFError e then return "q" else ioError e) + s <- catch getLine (\e -> if isEOFError e then return "q" else ioError e) return $ (s,pCommandLines s) pCommandLines :: String -> [CommandLine] diff --git a/src/GF/Shell/ShellCommands.hs b/src/GF/Shell/ShellCommands.hs index b61f8e3e7..f72f574f8 100644 --- a/src/GF/Shell/ShellCommands.hs +++ b/src/GF/Shell/ShellCommands.hs @@ -5,26 +5,26 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/16 05:40:50 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.29 $ +-- > CVS $Date: 2005/04/21 16:23:22 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.30 $ -- -- The datatype of shell commands and the list of their options. ----------------------------------------------------------------------------- -module ShellCommands where +module GF.Shell.ShellCommands where -import qualified Ident as I -import ShellState -import Custom -import PrGrammar +import qualified GF.Infra.Ident as I +import GF.Compile.ShellState +import GF.UseGrammar.Custom +import GF.Grammar.PrGrammar -import Option -import Operations -import Modules +import GF.Infra.Option +import GF.Data.Operations +import GF.Infra.Modules -import Char (isDigit) -import Monad (mplus) +import Data.Char (isDigit) +import Control.Monad (mplus) -- shell commands and their options -- moved to separate module and added option check: AR 27/5/2004 diff --git a/src/GF/Shell/SubShell.hs b/src/GF/Shell/SubShell.hs index 66d7f5253..5c8c17014 100644 --- a/src/GF/Shell/SubShell.hs +++ b/src/GF/Shell/SubShell.hs @@ -5,25 +5,25 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:37 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:23:23 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module SubShell where +module GF.Shell.SubShell where -import Operations -import UseIO -import ShellState -import Option -import API +import GF.Data.Operations +import GF.Infra.UseIO +import GF.Compile.ShellState +import GF.Infra.Option +import GF.API -import CommandL +import GF.Shell.CommandL import ArchEdit -import List +import Data.List -- AR 20/4/2000 -- 12/11/2001 diff --git a/src/GF/Shell/TeachYourself.hs b/src/GF/Shell/TeachYourself.hs index 7cb3594f7..05088c71a 100644 --- a/src/GF/Shell/TeachYourself.hs +++ b/src/GF/Shell/TeachYourself.hs @@ -5,26 +5,26 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:37 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:23:24 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- translation and morphology quiz. AR 10\/5\/2000 -- 12\/4\/2002 ----------------------------------------------------------------------------- -module TeachYourself where +module GF.Shell.TeachYourself where -import ShellState -import API -import Linear -import PrGrammar +import GF.Compile.ShellState +import GF.API +import GF.UseGrammar.Linear +import GF.Grammar.PrGrammar -import Option +import GF.Infra.Option import Arch (myStdGen) -import Operations -import UseIO +import GF.Data.Operations +import GF.Infra.UseIO -import Random --- (randoms) --- bad import for hbc +import System.Random --- (randoms) --- bad import for hbc import System -- translation and morphology quiz. AR 10/5/2000 -- 12/4/2002 diff --git a/src/GF/Source/AbsGF.hs b/src/GF/Source/AbsGF.hs index 30f77b4cb..575cff48b 100644 --- a/src/GF/Source/AbsGF.hs +++ b/src/GF/Source/AbsGF.hs @@ -1,7 +1,7 @@ -module AbsGF where +module GF.Source.AbsGF where -import Ident --H +import GF.Infra.Ident --H -- Haskell module generated by the BNF converter, except --H diff --git a/src/GF/Source/GrammarToSource.hs b/src/GF/Source/GrammarToSource.hs index bfbb815f7..e2f5f132e 100644 --- a/src/GF/Source/GrammarToSource.hs +++ b/src/GF/Source/GrammarToSource.hs @@ -5,26 +5,26 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/04 15:50:27 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.18 $ +-- > CVS $Date: 2005/04/21 16:23:25 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.19 $ -- -- From internal source syntax to BNFC-generated (used for printing). ----------------------------------------------------------------------------- -module GrammarToSource ( trGrammar, +module GF.Source.GrammarToSource ( trGrammar, trModule, trAnyDef, trLabel, trt, tri, trp ) where -import Operations -import Grammar -import Modules -import Option -import qualified AbsGF as P -import Ident +import GF.Data.Operations +import GF.Grammar.Grammar +import GF.Infra.Modules +import GF.Infra.Option +import qualified GF.Source.AbsGF as P +import GF.Infra.Ident -- | AR 13\/5\/2003 -- diff --git a/src/GF/Source/LexGF.hs b/src/GF/Source/LexGF.hs index 1978273f9..9ea4c4a5b 100644 --- a/src/GF/Source/LexGF.hs +++ b/src/GF/Source/LexGF.hs @@ -1,16 +1,16 @@ {-# OPTIONS -cpp #-} {-# LINE 3 "LexGF.x" #-} -module LexGF where +module GF.Source.LexGF where -import ErrM +import GF.Data.ErrM #if __GLASGOW_HASKELL__ >= 503 import Data.Array import Data.Char (ord) import Data.Array.Base (unsafeAt) #else -import Array -import Char (ord) +import Data.Array +import Data.Char (ord) #endif alex_base :: Array Int Int alex_base = listArray (0,27) [1,21,57,58,24,25,26,0,68,69,27,28,29,66,0,38,19,39,0,44,45,156,364,0,279,487,213,51] diff --git a/src/GF/Source/ParGF.hs b/src/GF/Source/ParGF.hs index 5da21ac2f..dee189179 100644 --- a/src/GF/Source/ParGF.hs +++ b/src/GF/Source/ParGF.hs @@ -1,12 +1,12 @@ {-# OPTIONS -fglasgow-exts -cpp #-} -- parser produced by Happy Version 1.13 -module ParGF where -import AbsGF -import LexGF -import ErrM -import Ident --H -import Array +module GF.Source.ParGF where +import GF.Source.AbsGF +import GF.Source.LexGF +import GF.Data.ErrM +import GF.Infra.Ident --H +import Data.Array #if __GLASGOW_HASKELL__ >= 503 import GHC.Exts #else @@ -2904,7 +2904,7 @@ happyError ts = myLexer = tokens {-# LINE 1 "GenericTemplate.hs" #-} --- $Id: ParGF.hs,v 1.9 2005/02/04 20:18:00 aarne Exp $ +-- $Id: ParGF.hs,v 1.10 2005/04/21 16:23:27 bringert Exp $ diff --git a/src/GF/Source/PrintGF.hs b/src/GF/Source/PrintGF.hs index f51dbbdee..007ca7928 100644 --- a/src/GF/Source/PrintGF.hs +++ b/src/GF/Source/PrintGF.hs @@ -1,11 +1,11 @@ -module PrintGF where +module GF.Source.PrintGF where -- pretty-printer generated by the BNF converter, except --H -import Ident --H -import AbsGF -import Char +import GF.Infra.Ident --H +import GF.Source.AbsGF +import Data.Char -- the top-level printing method printTree :: Print a => a -> String diff --git a/src/GF/Source/SkelGF.hs b/src/GF/Source/SkelGF.hs index 3283dd702..76e0bdc85 100644 --- a/src/GF/Source/SkelGF.hs +++ b/src/GF/Source/SkelGF.hs @@ -1,10 +1,10 @@ -module SkelGF where +module GF.Source.SkelGF where -- Haskell module generated by the BNF converter -import AbsGF -import ErrM +import GF.Source.AbsGF +import GF.Data.ErrM type Result = Err String failure :: Show a => a -> Result diff --git a/src/GF/Source/SourceToGrammar.hs b/src/GF/Source/SourceToGrammar.hs index 259e4f9fe..75474200a 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:38 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.21 $ +-- > CVS $Date: 2005/04/21 16:23:29 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.22 $ -- -- based on the skeleton Haskell module generated by the BNF converter ----------------------------------------------------------------------------- -module SourceToGrammar ( transGrammar, +module GF.Source.SourceToGrammar ( transGrammar, transInclude, transModDef, transOldGrammar, @@ -20,22 +20,22 @@ module SourceToGrammar ( transGrammar, newReservedWords ) where -import qualified Grammar as G -import qualified PrGrammar as GP -import qualified Modules as GM -import qualified Macros as M -import qualified Update as U -import qualified Option as GO -import qualified ModDeps as GD -import Ident -import AbsGF -import PrintGF -import RemoveLiT --- for bw compat -import Operations -import Option +import qualified GF.Grammar.Grammar as G +import qualified GF.Grammar.PrGrammar as GP +import qualified GF.Infra.Modules as GM +import qualified GF.Grammar.Macros as M +import qualified GF.Compile.Update as U +import qualified GF.Infra.Option as GO +import qualified GF.Compile.ModDeps as GD +import GF.Infra.Ident +import GF.Source.AbsGF +import GF.Source.PrintGF +import GF.Compile.RemoveLiT --- for bw compat +import GF.Data.Operations +import GF.Infra.Option -import Monad -import Char +import Control.Monad +import Data.Char -- based on the skeleton Haskell module generated by the BNF converter diff --git a/src/GF/Source/TestGF.hs b/src/GF/Source/TestGF.hs index 645f3a94b..65c238db2 100644 --- a/src/GF/Source/TestGF.hs +++ b/src/GF/Source/TestGF.hs @@ -1,19 +1,19 @@ -- automatically generated by BNF Converter -module Main where +module GF.Source.TestGF where -import IO ( stdin, hGetContents ) +import System.IO ( stdin, hGetContents ) import System ( getArgs, getProgName ) -import LexGF -import ParGF -import SkelGF -import PrintGF -import AbsGF +import GF.Source.LexGF +import GF.Source.ParGF +import GF.Source.SkelGF +import GF.Source.PrintGF +import GF.Source.AbsGF -import ErrM +import GF.Data.ErrM type ParseFun a = [Token] -> Err a diff --git a/src/GF/Speech/PrGSL.hs b/src/GF/Speech/PrGSL.hs index 0455e3653..14fb4c58e 100644 --- a/src/GF/Speech/PrGSL.hs +++ b/src/GF/Speech/PrGSL.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/15 09:45:32 $ +-- > CVS $Date: 2005/04/21 16:23:31 $ -- > CVS $Author: bringert $ --- > CVS $Revision: 1.17 $ +-- > CVS $Revision: 1.18 $ -- -- This module prints a CFG as a Nuance GSL 2.0 grammar. -- @@ -15,16 +15,16 @@ -- categories in the grammar ----------------------------------------------------------------------------- -module PrGSL (gslPrinter) where +module GF.Speech.PrGSL (gslPrinter) where -import SRG -import Ident +import GF.Speech.SRG +import GF.Infra.Ident import GF.Formalism.CFG import GF.Formalism.Utilities (Symbol(..)) import GF.Conversion.Types import GF.Infra.Print -import Option +import GF.Infra.Option import Data.Char (toUpper,toLower) diff --git a/src/GF/Speech/PrJSGF.hs b/src/GF/Speech/PrJSGF.hs index 178365bac..58a33a324 100644 --- a/src/GF/Speech/PrJSGF.hs +++ b/src/GF/Speech/PrJSGF.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/15 09:45:32 $ +-- > CVS $Date: 2005/04/21 16:23:31 $ -- > CVS $Author: bringert $ --- > CVS $Revision: 1.11 $ +-- > CVS $Revision: 1.12 $ -- -- This module prints a CFG as a JSGF grammar. -- @@ -17,15 +17,15 @@ -- FIXME: convert to UTF-8 ----------------------------------------------------------------------------- -module PrJSGF (jsgfPrinter) where +module GF.Speech.PrJSGF (jsgfPrinter) where -import SRG -import Ident +import GF.Speech.SRG +import GF.Infra.Ident import GF.Formalism.CFG import GF.Formalism.Utilities (Symbol(..)) import GF.Conversion.Types import GF.Infra.Print -import Option +import GF.Infra.Option jsgfPrinter :: Ident -- ^ Grammar name -> Options -> CGrammar -> String diff --git a/src/GF/Speech/SRG.hs b/src/GF/Speech/SRG.hs index e1ac0efc4..d59a391a1 100644 --- a/src/GF/Speech/SRG.hs +++ b/src/GF/Speech/SRG.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/14 18:38:36 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.12 $ +-- > CVS $Date: 2005/04/21 16:23:32 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.13 $ -- -- Representation of, conversion to, and utilities for -- printing of a general Speech Recognition Grammar. @@ -18,9 +18,9 @@ -- FIXME: figure out name prefix from grammar name ----------------------------------------------------------------------------- -module SRG where +module GF.Speech.SRG where -import Ident +import GF.Infra.Ident -- import GF.OldParsing.CFGrammar -- import GF.OldParsing.Utilities (Symbol(..)) -- import GF.OldParsing.GrammarTypes @@ -29,8 +29,8 @@ import GF.Formalism.CFG import GF.Formalism.Utilities (Symbol(..)) import GF.Conversion.Types import GF.Infra.Print -import TransformCFG -import Option +import GF.Speech.TransformCFG +import GF.Infra.Option import Data.List import Data.Maybe (fromMaybe) diff --git a/src/GF/Speech/TransformCFG.hs b/src/GF/Speech/TransformCFG.hs index 8e2673a9f..71b3ca296 100644 --- a/src/GF/Speech/TransformCFG.hs +++ b/src/GF/Speech/TransformCFG.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/15 09:45:32 $ +-- > CVS $Date: 2005/04/21 16:23:33 $ -- > CVS $Author: bringert $ --- > CVS $Revision: 1.11 $ +-- > CVS $Revision: 1.12 $ -- -- This module does some useful transformations on CFGs. -- @@ -16,9 +16,9 @@ -- peb thinks: most of this module should be moved to GF.Conversion... ----------------------------------------------------------------------------- -module TransformCFG (makeNice, CFRule_) where +module GF.Speech.TransformCFG (makeNice, CFRule_) where -import Ident +import GF.Infra.Ident import GF.Formalism.CFG import GF.Formalism.Utilities (Symbol(..), mapSymbol) import GF.Conversion.Types @@ -100,4 +100,4 @@ fix f x = let x' = f x in if x' == x then x else fix f x' nothingOrNull :: Maybe [a] -> Bool nothingOrNull Nothing = True -nothingOrNull (Just xs) = null xs \ No newline at end of file +nothingOrNull (Just xs) = null xs diff --git a/src/GF/Text/Arabic.hs b/src/GF/Text/Arabic.hs index 1b829981f..c482b1172 100644 --- a/src/GF/Text/Arabic.hs +++ b/src/GF/Text/Arabic.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:13 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:23:34 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Arabic (mkArabic) where +module GF.Text.Arabic (mkArabic) where mkArabic :: String -> String mkArabic = unwords . (map mkArabicWord) . words diff --git a/src/GF/Text/Devanagari.hs b/src/GF/Text/Devanagari.hs index 86bcc3811..6bd23149f 100644 --- a/src/GF/Text/Devanagari.hs +++ b/src/GF/Text/Devanagari.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:34 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Devanagari (mkDevanagari) where +module GF.Text.Devanagari (mkDevanagari) where mkDevanagari :: String -> String mkDevanagari = digraphWordToUnicode . adHocToDigraphWord diff --git a/src/GF/Text/Ethiopic.hs b/src/GF/Text/Ethiopic.hs index e67f8f1a2..26ae4b933 100644 --- a/src/GF/Text/Ethiopic.hs +++ b/src/GF/Text/Ethiopic.hs @@ -5,15 +5,15 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:23:35 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- Ascii-Unicode decoding for Ethiopian. -- Copyright (c) Harald Hammarström 2003 under Gnu General Public License ----------------------------------------------------------------------------- -module Ethiopic (mkEthiopic) where +module GF.Text.Ethiopic (mkEthiopic) where mkEthiopic :: String -> String mkEthiopic = digraphWordToUnicode . adHocToDigraphWord diff --git a/src/GF/Text/ExtendedArabic.hs b/src/GF/Text/ExtendedArabic.hs index 1b77248e3..d2c5faac5 100644 --- a/src/GF/Text/ExtendedArabic.hs +++ b/src/GF/Text/ExtendedArabic.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:23:36 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module ExtendedArabic (mkArabic0600, mkExtendedArabic) where +module GF.Text.ExtendedArabic (mkArabic0600, mkExtendedArabic) where mkArabic0600 :: String -> String mkArabic0600 = digraphWordToUnicode . aarnesToDigraphWord @@ -96,4 +96,4 @@ spoolMarkup2 :: String -> [(Char, Char)] spoolMarkup2 s = case s of [] -> [] -- Shouldn't happen '>' : cs -> ('\\', '>') : aarnesToDigraphWord cs - c1 : cs -> ('\\', c1) : spoolMarkup2 cs \ No newline at end of file + c1 : cs -> ('\\', c1) : spoolMarkup2 cs diff --git a/src/GF/Text/ExtraDiacritics.hs b/src/GF/Text/ExtraDiacritics.hs index f9e484b59..f3d811c2c 100644 --- a/src/GF/Text/ExtraDiacritics.hs +++ b/src/GF/Text/ExtraDiacritics.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:36 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module ExtraDiacritics (mkExtraDiacritics) where +module GF.Text.ExtraDiacritics (mkExtraDiacritics) where mkExtraDiacritics :: String -> String mkExtraDiacritics = mkExtraDiacriticsWord diff --git a/src/GF/Text/Greek.hs b/src/GF/Text/Greek.hs index 191bc0985..6b9361a29 100644 --- a/src/GF/Text/Greek.hs +++ b/src/GF/Text/Greek.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:37 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Greek (mkGreek) where +module GF.Text.Greek (mkGreek) where mkGreek :: String -> String mkGreek = unwords . (map mkGreekWord) . mkGravis . words diff --git a/src/GF/Text/Hebrew.hs b/src/GF/Text/Hebrew.hs index 6c7db2677..c7026d8da 100644 --- a/src/GF/Text/Hebrew.hs +++ b/src/GF/Text/Hebrew.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:23:37 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Hebrew (mkHebrew) where +module GF.Text.Hebrew (mkHebrew) where mkHebrew :: String -> String mkHebrew = mkHebrewWord diff --git a/src/GF/Text/Hiragana.hs b/src/GF/Text/Hiragana.hs index 877a22930..ba74fc83c 100644 --- a/src/GF/Text/Hiragana.hs +++ b/src/GF/Text/Hiragana.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:38 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Hiragana (mkJapanese) where +module GF.Text.Hiragana (mkJapanese) where -- long vowel romaaji must be ei, ou not ee, oo diff --git a/src/GF/Text/LatinASupplement.hs b/src/GF/Text/LatinASupplement.hs index 1952aa8a7..de6e170ac 100644 --- a/src/GF/Text/LatinASupplement.hs +++ b/src/GF/Text/LatinASupplement.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:14 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:39 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module LatinASupplement (mkLatinASupplement) where +module GF.Text.LatinASupplement (mkLatinASupplement) where mkLatinASupplement :: String -> String mkLatinASupplement = mkLatinASupplementWord diff --git a/src/GF/Text/OCSCyrillic.hs b/src/GF/Text/OCSCyrillic.hs index cffe064fe..7bbd1a773 100644 --- a/src/GF/Text/OCSCyrillic.hs +++ b/src/GF/Text/OCSCyrillic.hs @@ -4,14 +4,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/29 11:17:56 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:23:39 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module OCSCyrillic (mkOCSCyrillic) where +module GF.Text.OCSCyrillic (mkOCSCyrillic) where mkOCSCyrillic :: String -> String mkOCSCyrillic = mkOCSCyrillicWord diff --git a/src/GF/Text/Russian.hs b/src/GF/Text/Russian.hs index dd8751848..5e49d2fbb 100644 --- a/src/GF/Text/Russian.hs +++ b/src/GF/Text/Russian.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:15 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:40 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Russian (mkRussian, mkRusKOI8) where +module GF.Text.Russian (mkRussian, mkRusKOI8) where -- | an ad hoc ASCII encoding. Delimiters: @\/_ _\/@ mkRussian :: String -> String diff --git a/src/GF/Text/Tamil.hs b/src/GF/Text/Tamil.hs index 47623bac5..e938247c0 100644 --- a/src/GF/Text/Tamil.hs +++ b/src/GF/Text/Tamil.hs @@ -5,14 +5,14 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:16 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:40 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Tamil (mkTamil) where +module GF.Text.Tamil (mkTamil) where mkTamil :: String -> String mkTamil = digraphWordToUnicode . adHocToDigraphWord diff --git a/src/GF/Text/Text.hs b/src/GF/Text/Text.hs index 92d8ca9e2..dc9130f90 100644 --- a/src/GF/Text/Text.hs +++ b/src/GF/Text/Text.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/31 16:57:35 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.8 $ +-- > CVS $Date: 2005/04/21 16:23:41 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.9 $ -- -- elementary text postprocessing. AR 21\/11\/2001. -- @@ -17,7 +17,7 @@ -- XML hack 14\/8\/2004; not in use yet ----------------------------------------------------------------------------- -module Text (untokWithXML, +module GF.Text.Text (untokWithXML, exceptXML, formatAsTextLit, formatAsCodeLit, @@ -30,8 +30,8 @@ module Text (untokWithXML, concatRemSpace ) where -import Operations -import Char +import GF.Data.Operations +import Data.Char -- | does not apply untokenizer within XML tags --- heuristic "< " -- this function is applied from top level... diff --git a/src/GF/Text/UTF8.hs b/src/GF/Text/UTF8.hs index 32f5b49ff..e27773aad 100644 --- a/src/GF/Text/UTF8.hs +++ b/src/GF/Text/UTF8.hs @@ -5,15 +5,15 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:16 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:42 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- From the Char module supplied with HBC. -- code by Thomas Hallgren (Jul 10 1999) ----------------------------------------------------------------------------- -module UTF8 (decodeUTF8, encodeUTF8) where +module GF.Text.UTF8 (decodeUTF8, encodeUTF8) where -- | Take a Unicode string and encode it as a string -- with the UTF8 method. diff --git a/src/GF/Text/Unicode.hs b/src/GF/Text/Unicode.hs index 76bb6929c..9d0b9d1a8 100644 --- a/src/GF/Text/Unicode.hs +++ b/src/GF/Text/Unicode.hs @@ -5,31 +5,31 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:16 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.11 $ +-- > CVS $Date: 2005/04/21 16:23:42 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.12 $ -- -- ad hoc Unicode conversions from different alphabets. -- AR 12\/4\/2000, 18\/9\/2001, 30\/5\/2002, 26\/1\/2004 ----------------------------------------------------------------------------- -module Unicode (mkUnicode, treat) where +module GF.Text.Unicode (mkUnicode, treat) where -import Greek (mkGreek) -import Arabic (mkArabic) -import Hebrew (mkHebrew) -import Russian (mkRussian, mkRusKOI8) -import Ethiopic (mkEthiopic) -import Tamil (mkTamil) -import OCSCyrillic (mkOCSCyrillic) -import LatinASupplement (mkLatinASupplement) -import Devanagari (mkDevanagari) -import Hiragana (mkJapanese) -import ExtendedArabic (mkArabic0600) -import ExtendedArabic (mkExtendedArabic) -import ExtraDiacritics (mkExtraDiacritics) +import GF.Text.Greek (mkGreek) +import GF.Text.Arabic (mkArabic) +import GF.Text.Hebrew (mkHebrew) +import GF.Text.Russian (mkRussian, mkRusKOI8) +import GF.Text.Ethiopic (mkEthiopic) +import GF.Text.Tamil (mkTamil) +import GF.Text.OCSCyrillic (mkOCSCyrillic) +import GF.Text.LatinASupplement (mkLatinASupplement) +import GF.Text.Devanagari (mkDevanagari) +import GF.Text.Hiragana (mkJapanese) +import GF.Text.ExtendedArabic (mkArabic0600) +import GF.Text.ExtendedArabic (mkExtendedArabic) +import GF.Text.ExtraDiacritics (mkExtraDiacritics) -import Char +import Data.Char mkUnicode :: String -> String mkUnicode s = case s of diff --git a/src/GF/Translate/GFT.hs b/src/GF/Translate/GFT.hs index 8a9796bf9..e4a9d8193 100644 --- a/src/GF/Translate/GFT.hs +++ b/src/GF/Translate/GFT.hs @@ -4,28 +4,28 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/16 05:40:50 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:23:43 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Main (main) where +module GF.Translate.GFT (main) where -import ShellState -import GetGFC -import API +import GF.Compile.ShellState +import GF.Canon.GetGFC +import GF.API -import Unicode -import UTF8 -import UseIO -import Option -import Modules (emptyMGrammar) ---- -import Operations +import GF.Text.Unicode +import GF.Text.UTF8 +import GF.Infra.UseIO +import GF.Infra.Option +import GF.Infra.Modules (emptyMGrammar) ---- +import GF.Data.Operations import System -import List +import Data.List main :: IO () diff --git a/src/GF/UseGrammar/Custom.hs b/src/GF/UseGrammar/Custom.hs index f237f92ad..81bb2afed 100644 --- a/src/GF/UseGrammar/Custom.hs +++ b/src/GF/UseGrammar/Custom.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 20:09:19 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.57 $ +-- > CVS $Date: 2005/04/21 16:23:44 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.58 $ -- -- A database for customizable GF shell commands. -- @@ -25,48 +25,48 @@ -- - additions are made to the end of the database ----------------------------------------------------------------------------- -module Custom where +module GF.UseGrammar.Custom where -import Operations -import Text -import Tokenize -import Values -import qualified Grammar as G -import qualified AbsGFC as A -import qualified GFC as C -import qualified AbsGF as GF -import qualified MMacros as MM -import AbsCompute -import TypeCheck -import Generate +import GF.Data.Operations +import GF.Text.Text +import GF.UseGrammar.Tokenize +import GF.Grammar.Values +import qualified GF.Grammar.Grammar as G +import qualified GF.Canon.AbsGFC as A +import qualified GF.Canon.GFC as C +import qualified GF.Source.AbsGF as GF +import qualified GF.Grammar.MMacros as MM +import GF.Grammar.AbsCompute +import GF.Grammar.TypeCheck +import GF.UseGrammar.Generate ------import Compile -import ShellState -import Editing -import Paraphrases -import Option -import CF -import CFIdent +import GF.Compile.ShellState +import GF.UseGrammar.Editing +import GF.UseGrammar.Paraphrases +import GF.Infra.Option +import GF.CF.CF +import GF.CF.CFIdent -import CanonToGrammar -import PPrCF -import PrLBNF -import PrGrammar -import PrOld -import MkGFC -import CFtoSRG -import PrGSL (gslPrinter) -import PrJSGF (jsgfPrinter) +import GF.Canon.CanonToGrammar +import GF.CF.PPrCF +import GF.CF.PrLBNF +import GF.Grammar.PrGrammar +import GF.Compile.PrOld +import GF.Canon.MkGFC +import GF.CF.CFtoSRG +import GF.Speech.PrGSL (gslPrinter) +import GF.Speech.PrJSGF (jsgfPrinter) -import Zipper +import GF.Data.Zipper -import Morphology -import GrammarToHaskell +import GF.UseGrammar.Morphology +import GF.API.GrammarToHaskell -----import GrammarToCanon (showCanon, showCanonOpt) -----import qualified GrammarToGFC as GFC -- the cf parsing algorithms -import ChartParser -- OBSOLETE -import qualified GF.NewParsing.CF as PCF +import GF.CF.ChartParser -- OBSOLETE +import qualified GF.Parsing.CF as PCF import qualified GF.OldParsing.ParseCF as PCFOld -- OBSOLETE -- grammar conversions -- peb 19/4-04 @@ -76,34 +76,34 @@ import qualified GF.Printing.PrintParser as PrtOld -- OBSOLETE import qualified GF.Infra.Print as Prt import qualified GF.Conversion.GFC as Cnv -import GFC -import qualified MkGFC as MC -import PrintCFGrammar (prCanonAsCFGM) -import VisualizeGrammar (visualizeCanonGrammar, visualizeSourceGrammar) +import GF.Canon.GFC +import qualified GF.Canon.MkGFC as MC +import GF.CFGM.PrintCFGrammar (prCanonAsCFGM) +import GF.Visualization.VisualizeGrammar (visualizeCanonGrammar, visualizeSourceGrammar) -import MyParser +import GF.API.MyParser -import UseIO +import GF.Infra.UseIO -import Monad -import Char +import Control.Monad +import Data.Char -- character codings -import Unicode -import UTF8 (decodeUTF8) -import Greek (mkGreek) -import Arabic (mkArabic) -import Hebrew (mkHebrew) -import Russian (mkRussian, mkRusKOI8) -import Ethiopic (mkEthiopic) -import Tamil (mkTamil) -import OCSCyrillic (mkOCSCyrillic) -import LatinASupplement (mkLatinASupplement) -import Devanagari (mkDevanagari) -import Hiragana (mkJapanese) -import ExtendedArabic (mkArabic0600) -import ExtendedArabic (mkExtendedArabic) -import ExtraDiacritics (mkExtraDiacritics) +import GF.Text.Unicode +import GF.Text.UTF8 (decodeUTF8) +import GF.Text.Greek (mkGreek) +import GF.Text.Arabic (mkArabic) +import GF.Text.Hebrew (mkHebrew) +import GF.Text.Russian (mkRussian, mkRusKOI8) +import GF.Text.Ethiopic (mkEthiopic) +import GF.Text.Tamil (mkTamil) +import GF.Text.OCSCyrillic (mkOCSCyrillic) +import GF.Text.LatinASupplement (mkLatinASupplement) +import GF.Text.Devanagari (mkDevanagari) +import GF.Text.Hiragana (mkJapanese) +import GF.Text.ExtendedArabic (mkArabic0600) +import GF.Text.ExtendedArabic (mkExtendedArabic) +import GF.Text.ExtraDiacritics (mkExtraDiacritics) -- minimal version also used in Hugs. AR 2/12/2002. diff --git a/src/GF/UseGrammar/Editing.hs b/src/GF/UseGrammar/Editing.hs index a816d85ef..762562eb0 100644 --- a/src/GF/UseGrammar/Editing.hs +++ b/src/GF/UseGrammar/Editing.hs @@ -5,25 +5,25 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/02 14:25:45 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.13 $ +-- > CVS $Date: 2005/04/21 16:23:45 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.14 $ -- -- generic tree editing, with some grammar notions assumed. AR 18\/8\/2001. -- 19\/6\/2003 for GFC ----------------------------------------------------------------------------- -module Editing where +module GF.UseGrammar.Editing where -import Abstract -import qualified GFC -import TypeCheck -import LookAbs -import AbsCompute -import Macros (errorCat) +import GF.Grammar.Abstract +import qualified GF.Canon.GFC as GFC +import GF.Grammar.TypeCheck +import GF.Grammar.LookAbs +import GF.Grammar.AbsCompute +import GF.Grammar.Macros (errorCat) -import Operations -import Zipper +import GF.Data.Operations +import GF.Data.Zipper -- generic tree editing, with some grammar notions assumed. AR 18/8/2001 -- 19/6/2003 for GFC diff --git a/src/GF/UseGrammar/Generate.hs b/src/GF/UseGrammar/Generate.hs index c83b7bbb3..ee7419fb5 100644 --- a/src/GF/UseGrammar/Generate.hs +++ b/src/GF/UseGrammar/Generate.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/03/04 12:05:10 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.13 $ +-- > CVS $Date: 2005/04/21 16:23:46 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.14 $ -- -- Generate all trees of given category and depth. AR 30\/4\/2004 -- @@ -17,19 +17,19 @@ -- guarantee the correctness of bindings\/dependences. ----------------------------------------------------------------------------- -module Generate (generateTrees) where +module GF.UseGrammar.Generate (generateTrees) where -import GFC -import LookAbs -import PrGrammar -import Macros -import Values -import Grammar (Cat) +import GF.Canon.GFC +import GF.Grammar.LookAbs +import GF.Grammar.PrGrammar +import GF.Grammar.Macros +import GF.Grammar.Values +import GF.Grammar.Grammar (Cat) -import Operations -import Zipper +import GF.Data.Operations +import GF.Data.Zipper -import List +import Data.List -- Generate all trees of given category and depth. AR 30/4/2004 -- (c) Aarne Ranta 2004 under GNU GPL diff --git a/src/GF/UseGrammar/GetTree.hs b/src/GF/UseGrammar/GetTree.hs index b755ec7f3..a8d5fcab2 100644 --- a/src/GF/UseGrammar/GetTree.hs +++ b/src/GF/UseGrammar/GetTree.hs @@ -5,31 +5,31 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:38 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.6 $ +-- > CVS $Date: 2005/04/21 16:23:47 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.7 $ -- -- how to form linearizable trees from strings and from terms of different levels -- -- 'String' --> raw 'Term' --> annot, qualif 'Term' --> 'Tree' ----------------------------------------------------------------------------- -module GetTree where +module GF.UseGrammar.GetTree where -import GFC -import Values -import qualified Grammar as G -import Ident -import MMacros -import Macros -import Rename -import TypeCheck -import PGrammar -import ShellState +import GF.Canon.GFC +import GF.Grammar.Values +import qualified GF.Grammar.Grammar as G +import GF.Infra.Ident +import GF.Grammar.MMacros +import GF.Grammar.Macros +import GF.Compile.Rename +import GF.Grammar.TypeCheck +import GF.Compile.PGrammar +import GF.Compile.ShellState -import Operations +import GF.Data.Operations -import Char +import Data.Char -- how to form linearizable trees from strings and from terms of different levels -- diff --git a/src/GF/UseGrammar/Information.hs b/src/GF/UseGrammar/Information.hs index ea94d1270..37cacbb1a 100644 --- a/src/GF/UseGrammar/Information.hs +++ b/src/GF/UseGrammar/Information.hs @@ -5,31 +5,31 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:38 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:47 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- information on module, category, function, operation, parameter,... -- AR 16\/9\/2003. -- uses source grammar ----------------------------------------------------------------------------- -module Information (showInformation) where +module GF.UseGrammar.Information (showInformation) where -import Grammar -import Ident -import Modules -import Option -import CF -import PPrCF -import ShellState -import PrGrammar -import Lookup -import qualified GFC -import qualified AbsGFC +import GF.Grammar.Grammar +import GF.Infra.Ident +import GF.Infra.Modules +import GF.Infra.Option +import GF.CF.CF +import GF.CF.PPrCF +import GF.Compile.ShellState +import GF.Grammar.PrGrammar +import GF.Grammar.Lookup +import qualified GF.Canon.GFC as GFC +import qualified GF.Canon.AbsGFC as AbsGFC -import Operations -import UseIO +import GF.Data.Operations +import GF.Infra.UseIO -- information on module, category, function, operation, parameter,... AR 16/9/2003 -- uses source grammar diff --git a/src/GF/UseGrammar/Linear.hs b/src/GF/UseGrammar/Linear.hs index 4b2a4d9bb..794db670c 100644 --- a/src/GF/UseGrammar/Linear.hs +++ b/src/GF/UseGrammar/Linear.hs @@ -5,35 +5,35 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:38 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.14 $ +-- > CVS $Date: 2005/04/21 16:23:48 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.15 $ -- -- Linearization for canonical GF. AR 7\/6\/2003 ----------------------------------------------------------------------------- -module Linear where +module GF.UseGrammar.Linear where -import GFC -import AbsGFC -import qualified Abstract as A -import MkGFC (rtQIdent) ---- -import Ident -import PrGrammar -import CMacros -import Look -import LookAbs -import MMacros -import TypeCheck (annotate) ---- -import Str -import Text +import GF.Canon.GFC +import GF.Canon.AbsGFC +import qualified GF.Grammar.Abstract as A +import GF.Canon.MkGFC (rtQIdent) ---- +import GF.Infra.Ident +import GF.Grammar.PrGrammar +import GF.Canon.CMacros +import GF.Canon.Look +import GF.Grammar.LookAbs +import GF.Grammar.MMacros +import GF.Grammar.TypeCheck (annotate) ---- +import GF.Data.Str +import GF.Text.Text ----import TypeCheck -- to annotate -import Operations -import Zipper +import GF.Data.Operations +import GF.Data.Zipper -import Monad -import List (intersperse) +import Control.Monad +import Data.List (intersperse) -- Linearization for canonical GF. AR 7/6/2003 diff --git a/src/GF/UseGrammar/Morphology.hs b/src/GF/UseGrammar/Morphology.hs index 62aeb7725..626269836 100644 --- a/src/GF/UseGrammar/Morphology.hs +++ b/src/GF/UseGrammar/Morphology.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:39 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:23:49 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- Morphological analyser constructed from a GF grammar. -- @@ -17,24 +17,24 @@ -- for decompositions and also want to use it in the parser ----------------------------------------------------------------------------- -module Morphology where +module GF.UseGrammar.Morphology where -import AbsGFC -import GFC -import PrGrammar -import CMacros -import LookAbs -import Ident -import qualified Macros as M -import Linear +import GF.Canon.AbsGFC +import GF.Canon.GFC +import GF.Grammar.PrGrammar +import GF.Canon.CMacros +import GF.Grammar.LookAbs +import GF.Infra.Ident +import qualified GF.Grammar.Macros as M +import GF.UseGrammar.Linear -import Operations -import Glue +import GF.Data.Operations +import GF.Data.Glue -import Char -import List (sortBy, intersperse) -import Monad (liftM) -import Trie2 +import Data.Char +import Data.List (sortBy, intersperse) +import Control.Monad (liftM) +import GF.Data.Trie2 -- construct a morphological analyser from a GF grammar. AR 11/4/2001 diff --git a/src/GF/UseGrammar/Paraphrases.hs b/src/GF/UseGrammar/Paraphrases.hs index 2946c3625..d04f22aa6 100644 --- a/src/GF/UseGrammar/Paraphrases.hs +++ b/src/GF/UseGrammar/Paraphrases.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:39 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.5 $ +-- > CVS $Date: 2005/04/21 16:23:49 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.6 $ -- -- paraphrases of GF terms. AR 6\/10\/1998 -- 24\/9\/1999 -- 5\/7\/2000 -- 5\/6\/2002 -- @@ -16,16 +16,16 @@ -- thus inherited from the old GF. Incomplete and inefficient... ----------------------------------------------------------------------------- -module Paraphrases (mkParaphrases) where +module GF.UseGrammar.Paraphrases (mkParaphrases) where -import Abstract -import PrGrammar -import LookAbs -import AbsCompute +import GF.Grammar.Abstract +import GF.Grammar.PrGrammar +import GF.Grammar.LookAbs +import GF.Grammar.AbsCompute -import Operations +import GF.Data.Operations -import List (nub) +import Data.List (nub) -- paraphrases of GF terms. AR 6/10/1998 -- 24/9/1999 -- 5/7/2000 -- 5/6/2002 -- Copyright (c) Aarne Ranta 1998--99, under GNU General Public License (see GPL) diff --git a/src/GF/UseGrammar/Parsing.hs b/src/GF/UseGrammar/Parsing.hs index b546c04b6..5edf8a124 100644 --- a/src/GF/UseGrammar/Parsing.hs +++ b/src/GF/UseGrammar/Parsing.hs @@ -5,43 +5,43 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/20 12:49:45 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.19 $ +-- > CVS $Date: 2005/04/21 16:23:50 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.20 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Parsing where +module GF.UseGrammar.Parsing where -import CheckM -import qualified AbsGFC as C -import GFC -import MkGFC (trExp) ---- -import CMacros -import MMacros (refreshMetas) -import Linear -import Str -import CF -import CFIdent -import Ident -import TypeCheck -import Values +import GF.Infra.CheckM +import qualified GF.Canon.AbsGFC as C +import GF.Canon.GFC +import GF.Canon.MkGFC (trExp) ---- +import GF.Canon.CMacros +import GF.Grammar.MMacros (refreshMetas) +import GF.UseGrammar.Linear +import GF.Data.Str +import GF.CF.CF +import GF.CF.CFIdent +import GF.Infra.Ident +import GF.Grammar.TypeCheck +import GF.Grammar.Values --import CFMethod -import Tokenize -import Profile -import Option -import Custom -import ShellState +import GF.UseGrammar.Tokenize +import GF.CF.Profile +import GF.Infra.Option +import GF.UseGrammar.Custom +import GF.Compile.ShellState -import PPrCF (prCFTree) +import GF.CF.PPrCF (prCFTree) import qualified GF.OldParsing.ParseGFC as NewOld -- OBSOLETE -import qualified GF.NewParsing.GFC as New +import qualified GF.Parsing.GFC as New -import Operations +import GF.Data.Operations -import List (nub) -import Monad (liftM) +import Data.List (nub) +import Control.Monad (liftM) -- AR 26/1/2000 -- 8/4 -- 28/1/2001 -- 9/12/2002 diff --git a/src/GF/UseGrammar/Randomized.hs b/src/GF/UseGrammar/Randomized.hs index d893e663b..c1c77edb2 100644 --- a/src/GF/UseGrammar/Randomized.hs +++ b/src/GF/UseGrammar/Randomized.hs @@ -5,24 +5,24 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:39 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:23:51 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- random generation and refinement. AR 22\/8\/2001. -- implemented as sequence of refinement menu selecsions, encoded as integers ----------------------------------------------------------------------------- -module Randomized where +module GF.UseGrammar.Randomized where -import Abstract -import Editing +import GF.Grammar.Abstract +import GF.UseGrammar.Editing -import Operations -import Zipper +import GF.Data.Operations +import GF.Data.Zipper --- import Arch (myStdGen) --- circular for hbc -import Random --- (mkStdGen, StdGen, randoms) --- bad import for hbc +import System.Random --- (mkStdGen, StdGen, randoms) --- bad import for hbc -- random generation and refinement. AR 22/8/2001 -- implemented as sequence of refinement menu selecsions, encoded as integers diff --git a/src/GF/UseGrammar/Session.hs b/src/GF/UseGrammar/Session.hs index 6e27d4971..34ffeed4a 100644 --- a/src/GF/UseGrammar/Session.hs +++ b/src/GF/UseGrammar/Session.hs @@ -5,22 +5,22 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:39 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.8 $ +-- > CVS $Date: 2005/04/21 16:23:51 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.9 $ -- -- (Description of the module) ----------------------------------------------------------------------------- -module Session where +module GF.UseGrammar.Session where -import Abstract -import Option -import Custom -import Editing -import ShellState ---- grammar +import GF.Grammar.Abstract +import GF.Infra.Option +import GF.UseGrammar.Custom +import GF.UseGrammar.Editing +import GF.Compile.ShellState ---- grammar -import Operations +import GF.Data.Operations -- First version 8/2001. Adapted to GFC with modules 19/6/2003. -- Nothing had to be changed, which is a sign of good modularity. diff --git a/src/GF/UseGrammar/Tokenize.hs b/src/GF/UseGrammar/Tokenize.hs index da4d419b3..6a8119ac0 100644 --- a/src/GF/UseGrammar/Tokenize.hs +++ b/src/GF/UseGrammar/Tokenize.hs @@ -5,15 +5,15 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/04 17:29:18 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.12 $ +-- > CVS $Date: 2005/04/21 16:23:52 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.13 $ -- -- lexers = tokenizers, to prepare input for GF grammars. AR 4\/1\/2002. -- an entry for each is included in 'Custom.customTokenizer' ----------------------------------------------------------------------------- -module Tokenize ( tokWords, +module GF.UseGrammar.Tokenize ( tokWords, tokLits, tokVars, lexHaskell, @@ -24,11 +24,11 @@ module Tokenize ( tokWords, lexTextLiteral, ) where -import Operations +import GF.Data.Operations ---- import UseGrammar (isLiteral,identC) -import CFIdent +import GF.CF.CFIdent -import Char +import Data.Char -- lexers = tokenizers, to prepare input for GF grammars. AR 4/1/2002 -- an entry for each is included in Custom.customTokenizer diff --git a/src/GF/UseGrammar/Transfer.hs b/src/GF/UseGrammar/Transfer.hs index d0ac42688..3a4aadf96 100644 --- a/src/GF/UseGrammar/Transfer.hs +++ b/src/GF/UseGrammar/Transfer.hs @@ -5,27 +5,27 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/24 11:46:40 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.4 $ +-- > CVS $Date: 2005/04/21 16:23:53 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.5 $ -- -- linearize, parse, etc, by transfer. AR 9\/10\/2003 ----------------------------------------------------------------------------- -module Transfer where +module GF.UseGrammar.Transfer where -import Grammar -import Values -import AbsCompute -import qualified GFC -import LookAbs -import MMacros -import TypeCheck +import GF.Grammar.Grammar +import GF.Grammar.Values +import GF.Grammar.AbsCompute +import qualified GF.Canon.GFC as GFC +import GF.Grammar.LookAbs +import GF.Grammar.MMacros +import GF.Grammar.TypeCheck -import Ident -import Operations +import GF.Infra.Ident +import GF.Data.Operations -import Monad +import Control.Monad -- linearize, parse, etc, by transfer. AR 9/10/2003 diff --git a/src/GF/Visualization/VisualizeGrammar.hs b/src/GF/Visualization/VisualizeGrammar.hs index f1f8b65a9..1c3d0589a 100644 --- a/src/GF/Visualization/VisualizeGrammar.hs +++ b/src/GF/Visualization/VisualizeGrammar.hs @@ -5,21 +5,21 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/02/18 19:21:23 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.7 $ +-- > CVS $Date: 2005/04/21 16:23:54 $ +-- > CVS $Author: bringert $ +-- > CVS $Revision: 1.8 $ -- -- Print a graph of module dependencies in Graphviz DOT format ----------------------------------------------------------------------------- -module VisualizeGrammar ( visualizeCanonGrammar, +module GF.Visualization.VisualizeGrammar ( visualizeCanonGrammar, visualizeSourceGrammar ) where -import qualified Modules as M -import GFC -import Ident -import Grammar (SourceGrammar) +import qualified GF.Infra.Modules as M +import GF.Canon.GFC +import GF.Infra.Ident +import GF.Grammar.Grammar (SourceGrammar) import Data.List (intersperse, nub) import Data.Maybe (maybeToList) diff --git a/src/Makefile b/src/Makefile index bb80d07fc..2e54972f8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -36,7 +36,7 @@ windows: today touch-files nofud-links justwindows install-java: javac -rm -f ../bin/java - ln -s ../src/java ../bin + ln -s ../src/JavaGUI ../bin @echo "PLEASE edit GFHOME in bin/jgf" opt: $(GHMAKE) $(GHCOPTFLAGS) $(GHCINCLUDENOFUD) GF.hs -o gf-bin @@ -85,11 +85,11 @@ shell: clean: -rm -rf */*.o */*.hi *.o *.hi */*.ghi *.ghi *~ */*~ -rm -f GF/*.{o,hi,ghi} GF/*/*.{o,hi,ghi} GF/*/*/*.{o,hi,ghi} - -rm -f java/*.class + -rm -f JavaGUI/*.class distclean: clean -rm -f for-ghc-nofud/*.hs - -rm -f java/gf-java.jar jgf + -rm -f JavaGUI/gf-java.jar jgf -rm -f tools/gfdoc -rm -f config.status config.mk config.log -rm -f *.tgz *.zip @@ -102,10 +102,10 @@ today: tools/mktoday.sh javac: - $(JAVAC) $(JAVAFLAGS) java/*.java + $(JAVAC) $(JAVAFLAGS) JavaGUI/*.java jar: javac - cd java; $(JAR) -cmf manifest.txt gf-java.jar *.class + cd JavaGUI; $(JAR) -cmf manifest.txt gf-java.jar *.class tools/MkHelpFile: tools/MkHelpFile.hs $(GHMAKE) -o $@ $^ @@ -156,7 +156,7 @@ binary-dist: ./configure --host="$(host)" CPPFLAGS="`lib__readline -I` `lib__ncurses -I`" LDFLAGS="`lib__readline -l` `lib__ncurses -l`" $(MAKE) all $(INSTALL) ../bin/gf tools/gfdoc $(BIN_DIST_DIR) - $(INSTALL) -m 0644 java/gf-java.jar $(BIN_DIST_DIR) + $(INSTALL) -m 0644 JavaGUI/gf-java.jar $(BIN_DIST_DIR) $(INSTALL) configure config.guess config.sub install-sh $(BIN_DIST_DIR) $(INSTALL) -m 0644 config.mk.in jgf.in $(BIN_DIST_DIR) $(INSTALL) -m 0644 ../README ../LICENSE $(BIN_DIST_DIR) @@ -178,7 +178,7 @@ install-gfdoc: install-editor: $(INSTALL) -d $(datadir)/GF-$(PACKAGE_VERSION) $(INSTALL) jgf $(bindir) - $(INSTALL) -m 0644 java/gf-java.jar $(datadir)/GF-$(PACKAGE_VERSION) + $(INSTALL) -m 0644 JavaGUI/gf-java.jar $(datadir)/GF-$(PACKAGE_VERSION) tools/gfdoc: tools/GFDoc.hs $(GHMAKE) -o $@ $^