diff options
| author | krasimir <krasimir@chalmers.se> | 2008-05-30 11:15:33 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2008-05-30 11:15:33 +0000 |
| commit | 8bb0c32a9cf2cbad0375ab5886b7f2be37109477 (patch) | |
| tree | 2290b07d391a1da4e94ee367b445a6b2f64ca2cd /src-3.0/GF/Command/Importing.hs | |
| parent | 1172539a9544ed999c565053b79cf6a30ec14de4 (diff) | |
replace GFCC with PGF in (almost) all places
Diffstat (limited to 'src-3.0/GF/Command/Importing.hs')
| -rw-r--r-- | src-3.0/GF/Command/Importing.hs | 20 |
1 files changed, 9 insertions, 11 deletions
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 |
