Rename Elm.ModuleName.toSlashPath to toFilePath
It uses a different separator depending on the OS, so it should be
labeled clearly that it would not be safe to use in a URL which needs
the unix style.
commitca9ed2914100a00207ac6ad7233be65017ce4563
authorEvan Czaplicki <evancz@users.noreply.github.com>
dateFri 22 Feb 2019, 11:38 (8 years ago)
parent6636a97
compiler/src/Elm/ModuleName.hs+3−3
@@ -3,7 +3,7 @@ module Elm.ModuleName
33 ( Raw
44 , toChars
55 , toString
6− , toSlashPath
6+ , toFilePath
77 , toHyphenPath
88 , fromHyphenPath
99 , encode
@@ -51,8 +51,8 @@ toString =
5151 Name.toUtf8
5252
5353
54−toSlashPath :: Raw -> FilePath
55−toSlashPath name =
54+toFilePath :: Raw -> FilePath
55+toFilePath name =
5656 map (\c -> if c == '.' then FP.pathSeparator else c) (Name.toChars name)
5757
5858