Fixed module names and imports after giant file move.

This commit is contained in:
bringert
2005-04-21 15:21:02 +00:00
parent 3433c97848
commit 5c9917ff8d
209 changed files with 2038 additions and 2036 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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
-}
-}

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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 =

View File

@@ -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

View File

@@ -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",

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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')

View File

@@ -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:
--

View File

@@ -1,4 +1,4 @@
module AbsCFG where
module GF.CFGM.AbsCFG where
-- Haskell module generated by the BNF converter

View File

@@ -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

View File

@@ -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 $

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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)]

View File

@@ -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

View File

@@ -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]

View File

@@ -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

View File

@@ -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

View File

@@ -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 $

View File

@@ -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

View File

@@ -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

View File

@@ -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] ---

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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] ---

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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,

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)
----------------------------------------------------------------------

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 ++-

View File

@@ -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)
--------------------------------------------------

View File

@@ -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)
--------------------------------------------------

View File

@@ -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 |||, +||

View File

@@ -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,

View File

@@ -1,5 +1,5 @@
module SharedString (shareString) where
module GF.Data.SharedString (shareString) where
import Data.HashTable as H
import System.IO.Unsafe (unsafePerformIO)

View File

@@ -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.

View File

@@ -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)

View File

@@ -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

View File

@@ -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])

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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 ---

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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
_ -> False

View File

@@ -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

View File

@@ -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

View File

@@ -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]

View File

@@ -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

View File

@@ -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)

Some files were not shown because too many files have changed in this diff Show More