From 8bb0c32a9cf2cbad0375ab5886b7f2be37109477 Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 30 May 2008 11:15:33 +0000 Subject: replace GFCC with PGF in (almost) all places --- src-3.0/GF/Command/Importing.hs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src-3.0/GF/Command/Importing.hs') diff --git a/src-3.0/GF/Command/Importing.hs b/src-3.0/GF/Command/Importing.hs index 91bcdcb73..d4eeb18ce 100644 --- a/src-3.0/GF/Command/Importing.hs +++ b/src-3.0/GF/Command/Importing.hs @@ -13,20 +13,18 @@ import Data.List (nubBy) import System.FilePath -- import a grammar in an environment where it extends an existing grammar -importGrammar :: MultiGrammar -> Options -> [FilePath] -> IO MultiGrammar -importGrammar mgr0 opts files = +importGrammar :: PGF -> Options -> [FilePath] -> IO PGF +importGrammar pgf0 opts files = case takeExtensions (last files) of s | elem s [".gf",".gfo"] -> do - res <- appIOE $ compileToGFCC opts files + res <- appIOE $ compileToPGF opts files case res of - Ok gfcc2 -> do let gfcc3 = unionGFCC (gfcc mgr0) gfcc2 - return $ MultiGrammar gfcc3 - Bad msg -> do putStrLn msg - return mgr0 - ".gfcc" -> do - gfcc2 <- mapM file2gfcc files >>= return . foldl1 unionGFCC - let gfcc3 = unionGFCC (gfcc mgr0) gfcc2 - return $ MultiGrammar gfcc3 + Ok pgf2 -> do return $ unionPGF pgf0 pgf2 + Bad msg -> do putStrLn msg + return pgf0 + ".pgf" -> do + pgf2 <- mapM file2pgf files >>= return . foldl1 unionPGF + return $ unionPGF pgf0 pgf2 importSource :: SourceGrammar -> Options -> [FilePath] -> IO SourceGrammar importSource src0 opts files = do -- cgit v1.2.3