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/UseGrammar/Treebank.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/GF/UseGrammar') diff --git a/src/GF/UseGrammar/Treebank.hs b/src/GF/UseGrammar/Treebank.hs index d353efc8a..841a9c6dc 100644 --- a/src/GF/UseGrammar/Treebank.hs +++ b/src/GF/UseGrammar/Treebank.hs @@ -50,6 +50,7 @@ import qualified Data.Map as M import qualified Data.Set as S import qualified Data.List as L import Control.Monad (liftM) +import System.FilePath -- Generate a treebank with a multilingual grammar. AR 8/2/2006 -- (c) Aarne Ranta 2006 under GNU GPL @@ -68,14 +69,14 @@ readUniTreebanks file = do then multi2uniTreebank $ getTreebank $ lines s else let tb = getUniTreebank $ lines s - in [(zIdent (unsuffixFile file),tb)] + in [(zIdent (dropExtension file),tb)] readMultiTreebank :: FilePath -> IO MultiTreebank readMultiTreebank file = do s <- readFileIf file return $ if isMultiTreebank s then getTreebank $ lines s - else uni2multiTreebank (zIdent (unsuffixFile file)) $ getUniTreebank $ lines s + else uni2multiTreebank (zIdent (dropExtension file)) $ getUniTreebank $ lines s isMultiTreebank :: String -> Bool isMultiTreebank s = take 10 s == "" -- cgit v1.2.3