From fc111c1a7910ab4a2a1bf40c0473bbaacadedd61 Mon Sep 17 00:00:00 2001 From: krasimir Date: Tue, 22 Apr 2008 11:39:46 +0000 Subject: use the standard System.FilePath module instead of our own broken file path manipulation functions --- src/GF/Command/Importing.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/GF/Command') diff --git a/src/GF/Command/Importing.hs b/src/GF/Command/Importing.hs index 31c4983dc..b223e3e5c 100644 --- a/src/GF/Command/Importing.hs +++ b/src/GF/Command/Importing.hs @@ -9,19 +9,20 @@ import GF.Infra.Option import GF.Data.ErrM 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 = - case fileSuffix (last files) of - s | elem s ["gf","gfo"] -> do + case takeExtensions (last files) of + s | elem s [".gf",".gfo"] -> do res <- appIOE $ compileToGFCC opts files case res of Ok gfcc2 -> do let gfcc3 = unionGFCC (gfcc mgr0) gfcc2 return $ MultiGrammar gfcc3 Bad msg -> do print msg return mgr0 - "gfcc" -> do + ".gfcc" -> do gfcc2 <- mapM file2gfcc files >>= return . foldl1 unionGFCC let gfcc3 = unionGFCC (gfcc mgr0) gfcc2 return $ MultiGrammar gfcc3 \ No newline at end of file -- cgit v1.2.3