summaryrefslogtreecommitdiff
path: root/src/GF/API.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/API.hs')
-rw-r--r--src/GF/API.hs3
1 files changed, 2 insertions, 1 deletions
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