clanki 1.2.6 → 1.2.7
raw patch · 4 files changed
+9/−14 lines, 4 filesdep ~base
Dependency ranges changed: base
Files
- clanki.cabal +2/−2
- src/Main.hs +1/−6
- src/Quiz.hs +5/−5
- src/Remove.hs +1/−1
clanki.cabal view
@@ -2,7 +2,7 @@ -- see http://haskell.org/cabal/users-guide/ name: clanki-version: 1.2.6+version: 1.2.7 synopsis: Command-line spaced-repetition software description: Command-line spaced-repetition learning software. CL (command line) + Anki (popular spaced-repetition software) = Clanki. Usage is fairly simple, just follow the instructions after running the program. Add a deck, add cards to the deck, then quiz whenever possible. The program will determine what cards need to be reviewed, using the Super Memo 2 algorithm. license: MIT@@ -23,7 +23,7 @@ ghc-options: -Wall other-modules: Add, Quiz, Remove, Display, Card, Input, Tracker, StatTracker -- other-extensions: - build-depends: base >=4.6 && < 4.9, + build-depends: base <= 4.9.0, time >= 1.4.2, directory >= 1.2.1.0, safe,
src/Main.hs view
@@ -39,9 +39,6 @@ printf $ "Invalid input" ++ "\n" mainLoop cards -{-fileHandle :: IO Handle-}-{-fileHandle = openFile "data.clanki" ReadWriteMode-}- fileName :: String fileName = "data.clanki" @@ -74,7 +71,7 @@ do displayAllDecks cards return cards- {-| "--stats" `elem` args || "-s" `elem` args =-}+ {- | "--stats" `elem` args || "-s" `elem` args = -} {-do-} {-displayList decks-} {-return decks-}@@ -119,5 +116,3 @@ args <- getArgs newCards <- startWithArgs args cards mainLoop newCards--
src/Quiz.hs view
@@ -8,9 +8,9 @@ import Data.Time.Clock.POSIX import Data.Maybe(isJust) import qualified Input-import Control.Monad(filterM, liftM)+import Control.Monad(filterM) import System.IO(hSetBuffering, BufferMode(NoBuffering, LineBuffering), stdin, stdout, hFlush)-import Data.List((\\), isInfixOf, delete)+import Data.List(delete) data QuizAction = AllCards | FromDeck deriving (Show, Eq) allQuizActions :: [QuizAction]@@ -25,9 +25,9 @@ quizAction <- getQuizAction cards runQuizAction quizAction cards -anyCardsToQuiz :: [Card] -> IO Bool-anyCardsToQuiz cards = liftM (True `elem`) shouldQuizList- where shouldQuizList = sequence $ fmap shouldQuizCard cards+{- anyCardsToQuiz :: [Card] -> IO Bool -}+{- anyCardsToQuiz cards = liftM (True `elem`) shouldQuizList -}+ {- where shouldQuizList = sequence $ fmap shouldQuizCard cards -} runQuizAction :: Maybe QuizAction -> [Card] -> IO [Card] runQuizAction (Just AllCards) cards = cardsToQuiz cards >>= (\someCards -> quizSomeCards someCards cards)
src/Remove.hs view
@@ -50,7 +50,7 @@ getRemoveAction :: [Card] -> IO (Maybe RemoveAction) getRemoveAction [] = return Nothing-getRemoveAction decks = do+getRemoveAction _ = do printf $ "What would you like to do?" ++ "\n" Input.getUserChoice allRemoveActions