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/API.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/GF/API.hs') diff --git a/src/GF/API.hs b/src/GF/API.hs index 7474d3c75..b1deeddfc 100644 --- a/src/GF/API.hs +++ b/src/GF/API.hs @@ -79,6 +79,7 @@ import Data.Char (toLower) import Data.Maybe (fromMaybe) import Control.Monad (liftM) import System (system) +import System.FilePath type GFGrammar = StateGrammar type GFCat = CFCat @@ -155,7 +156,7 @@ string2GFCat = string2CFCat optFile2grammar :: Options -> FilePath -> IOE GFGrammar optFile2grammar os f - | fileSuffix f == "gfcm" = ioeIO $ liftM firstStateGrammar $ EA.file2grammar f + | takeExtensions f == ".gfcm" = ioeIO $ liftM firstStateGrammar $ EA.file2grammar f | otherwise = do ((_,_,gr,_),_) <- compileModule os emptyShellState f ioeErr $ grammar2stateGrammar os gr -- cgit v1.2.3