packages feed

lojysamban 0.0.5 → 0.0.6

raw patch · 4 files changed

+14/−8 lines, 4 filessetup-changed

Files

LojbanTools.hs view
@@ -15,6 +15,7 @@ import Data.List  getSentences :: Sentence -> [Sentence]+getSentences (TopText _ _ _ _ (Just t) _) = getSentences t getSentences (IText_1 _ _ _ _ (Just t)) = getSentences t getSentences (StatementI s1 ss) = s1 : catMaybes (map (\(_, _, s) -> s) ss) getSentences tbt@(TermsBridiTail _ _ _ _) = [tbt]
Setup.hs view
@@ -1,2 +1,3 @@ import Distribution.Simple+ main = defaultMain
lojysamban.cabal view
@@ -2,10 +2,11 @@ cabal-version:		>= 1.6  name:			lojysamban-version:		0.0.5+version:		0.0.6 stability:		experimental author:			.iocikun.juj. <PAF01143@nifty.ne.jp> maintainer:		.iocikun.juj. <PAF01143@nifty.ne.jp>+homepage:		http://homepage3.nifty.com/salamander/myblog/lojysamban.html  license:		BSD3 license-file:		LICENSE
lojysamban2.hs view
@@ -20,16 +20,19 @@ main :: IO () main = do 	args <- getArgs-	fn <- case args of-		[] -> do-			putStr "Please enter source file name: "-			hFlush stdout-			getLine-		[fn] -> return fn-	src <- readFile fn+	src <- case args of+		[] -> readFacts+		[fn] -> readFile fn 	let	Right p = parse src 		rules = map readSentence $ getSentences p 	whileJust getAsk $ flip ask1 rules++readFacts :: IO String+readFacts = do+	l <- getLine+	if "fa'o" `isInfixOf` l then return l else do+		ls <- readFacts+		return $ l ++ ls  whileJust :: IO (Maybe a) -> (a -> IO b) -> IO () whileJust test action = do