garepinoh 0.9.9.2 → 0.9.9.2.1
raw patch · 2 files changed
+13/−13 lines, 2 files
Files
- code/Console/Garepinoh/GenMain.hs +11/−11
- garepinoh.cabal +2/−2
code/Console/Garepinoh/GenMain.hs view
@@ -89,7 +89,7 @@ -> (>> continue) $ mapM_ calc $ map reverse $ reverse $ tails $ reverse ws -- TODO: make it better | otherwise- -> return ()+ -> continue -- or print warning? Just ws -> calc ws >> continue@@ -100,8 +100,8 @@ | otherwise = return () calc ws = liftIO $ putStrLn $ either- (",, Error: "++)- ((",, "++) . show . reverse)+ ((" ,, Error: "++).(++"\n ,, Try typing \",,help\"."))+ ((" ,, "++) . show . reverse) (calculate p ws) repl = null as @@ -117,9 +117,9 @@ } : p Just x | x `elem` postulates- -> Left $ ",, Error: " ++ show x ++ " postulated but not defined."+ -> Left $ " ,, Error: " ++ show x ++ " postulated but not defined." | otherwise- -> Left $ ",, Error: Unkown function " ++ show x ++ "."+ -> Left $ " ,, Error: Unkown function " ++ show x ++ "." where invalid (',':d) = invalid d -- FIXME: this case is very critical and probably buggy! (is ,,x valid?) invalid d = and@@ -141,7 +141,7 @@ funcText, helpText :: (Read t, Show t) => Prelude t -> String funcText p = intercalate "\n"- [ ",, Functions (and Variables):"+ [ " ,, Functions (and Variables):" , printList p (list . symb) ] @@ -149,14 +149,14 @@ cmndText :: String cmndText = intercalate "\n"- [ ",, Commands:"- , ",, Use commands by typing \",,<command>\" as the first word."- , printList [exitList,helpList,funcList,cmndList] id+ [ " ,, Commands:"+ , " ,, Use commands by typing \",,<command>\" as the first word."+ , printList [exitList,helpList,funcList,cmndList,postList] id ] postText :: Prelude t -> [String] -> String postText prelude postulates = intercalate "\n"- [ ",, Postulates:"+ [ " ,, Postulates:" , flip printList id $ map return $ filter (`notElem` preluded) postulates ] where@@ -173,4 +173,4 @@ printList :: [a] -> (a -> [String]) -> String printList l f = flip concatMap l- $ (++"\n") . (",, * "++) . intercalate ", " . f+ $ (++"\n") . (" ,, "++) . intercalate ", " . f
garepinoh.cabal view
@@ -1,5 +1,5 @@ name: garepinoh-version: 0.9.9.2+version: 0.9.9.2.1 synopsis: reverse prefix notation calculator and calculation library description: Another concatenative and stack-based calculator using reverse prefix (– not polish! –) notation.@@ -21,7 +21,7 @@ type: darcs location:- http://hub.darcs.net/mekeor/garepinoh+ http://hub.darcs.net/mekeor/Garepinoh executable garepinoh hs-source-dirs: