mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-10 03:32:51 -06:00
use the standard System.FilePath module instead of our own broken file path manipulation functions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user