summaryrefslogtreecommitdiff
path: root/src/GF/Command/Importing.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2008-04-22 11:39:46 +0000
committerkrasimir <krasimir@chalmers.se>2008-04-22 11:39:46 +0000
commitfc111c1a7910ab4a2a1bf40c0473bbaacadedd61 (patch)
tree6f9c2bed83320272ebe41f314fd930f2a13ce3d9 /src/GF/Command/Importing.hs
parent7a6adbf35932efeed283f762b300b6f5a3b21d8a (diff)
use the standard System.FilePath module instead of our own broken file path manipulation functions
Diffstat (limited to 'src/GF/Command/Importing.hs')
-rw-r--r--src/GF/Command/Importing.hs7
1 files changed, 4 insertions, 3 deletions
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