summaryrefslogtreecommitdiff
path: root/src/File.hs
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-02-13 06:31:09 +1100
committerJed Barber <jjbarber@y7mail.com>2017-02-13 06:31:09 +1100
commit835c2dffc539e277812925469c82662482e1bbc5 (patch)
treed964f03e28597afe28a842df627288cb72de79e7 /src/File.hs
parentf9658404967d5fd39d22980d953dd49c72795da6 (diff)
Removed all Haskell and other old code, updated readme/notes
Diffstat (limited to 'src/File.hs')
-rw-r--r--src/File.hs42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/File.hs b/src/File.hs
deleted file mode 100644
index 5e4dce8..0000000
--- a/src/File.hs
+++ /dev/null
@@ -1,42 +0,0 @@
-module File(
- countLines
- ) where
-
-
-
-
--- This source is licensed under Creative Commons CC0 v1.0.
-
--- To read the full text, see license.txt in the main directory of this repository
--- or go to https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt
-
--- For a human readable summary, go to https://creativecommons.org/publicdomain/zero/1.0/
-
-
-
-
-import qualified System.IO as IO
-
-
-
-
-countLines :: FilePath -> IO Int
-countLines f = do
- h <- IO.openFile f IO.ReadMode
- e <- IO.hIsEOF h
- if e
- then IO.hClose h >> return 0
- else countLinesTail h 0
-
-
-
-
-countLinesTail :: IO.Handle -> Int -> IO Int
-countLinesTail h n = do
- t <- IO.hGetLine h
- e <- IO.hIsEOF h
- if e
- then IO.hClose h >> return (n + 1)
- else countLinesTail h (n + 1)
-
-