Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a8d017d

Browse files
committedSep 27, 2017
Unify Filename and FilePath
1 parent 3ddd0f7 commit a8d017d

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed
 

‎src/Course/Anagrams.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Functions that might help
3030
-- that appear in the given dictionary file.
3131
anagrams ::
3232
Chars
33-
-> Filename
33+
-> FilePath
3434
-> IO (List Chars)
3535
anagrams =
3636
error "todo: Course.Anagrams#anagrams"

‎src/Course/FastAnagrams.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import qualified Data.Set as S
1212
-- that appear in the given dictionary file.
1313
fastAnagrams ::
1414
Chars
15-
-> Filename
15+
-> FilePath
1616
-> IO (List Chars)
1717
fastAnagrams =
1818
error "todo: Course.FastAnagrams#fastAnagrams"

‎src/Course/FileIO.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ main ::
8282
main =
8383
error "todo: Course.FileIO#main"
8484

85-
type FilePath =
86-
Chars
87-
8885
-- Given a file name, read it and for each line in that file, read and print contents of each.
8986
-- Use @getFiles@ and @printFiles@.
9087
run ::

‎src/Course/JsonParser.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ jsonValue =
247247
--
248248
-- /Tip:/ Use @System.IO#readFile@ and `jsonValue`.
249249
readJsonValue ::
250-
Filename
250+
FilePath
251251
-> IO (ParseResult JsonValue)
252252
readJsonValue =
253253
error "todo: Course.JsonParser#readJsonValue"

‎src/Course/List.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,13 @@ putStrLn =
365365
P.putStrLn . hlist
366366

367367
readFile ::
368-
Filename
368+
FilePath
369369
-> IO Chars
370370
readFile =
371371
P.fmap listh . P.readFile . hlist
372372

373373
writeFile ::
374-
Filename
374+
FilePath
375375
-> Chars
376376
-> IO ()
377377
writeFile n s =
@@ -666,8 +666,8 @@ instance IsString (List Char) where
666666
type Chars =
667667
List Char
668668

669-
type Filename =
670-
Chars
669+
type FilePath =
670+
List Char
671671

672672
strconcat ::
673673
[Chars]

0 commit comments

Comments
 (0)
Please sign in to comment.