@@ -164,9 +164,9 @@ platformAdjustToUriPath systemOS srcPath
164
164
FPP. addTrailingPathSeparator (init drv)
165
165
| otherwise = drv
166
166
167
- -- | A file path that is already normalized. It is stored in a 'ShortByteString' with UTF-8 encoding.
167
+ -- | A file path that is already normalized. It is stored as an UTF-8 encoded 'ShortByteString'
168
168
--
169
- -- The NormalizedUri is cached to avoided
169
+ -- The ' NormalizedUri' is cached to avoided
170
170
-- repeated normalisation when we need to compute them (which is a lot).
171
171
--
172
172
-- This is one of the most performance critical parts of ghcide, do not
@@ -218,9 +218,8 @@ toNormalizedFilePath fp = NormalizedFilePath nuri . encodeFilePath $ nfp
218
218
nfp = FP. normalise fp
219
219
nuri = internalNormalizedFilePathToUri nfp
220
220
221
- -- | Extract 'FilePath' from 'NormalizedFilePath'.
222
- -- The function is total if 'NormalizedFilePath' is valid. The 'HasCallStack' constraint is added
223
- -- for debugging purpose, in case an invalid
221
+ -- | Extracts 'FilePath' from 'NormalizedFilePath'.
222
+ -- The function is total. The 'HasCallStack' constraint is added for debugging purpose only.
224
223
fromNormalizedFilePath :: HasCallStack => NormalizedFilePath -> FilePath
225
224
fromNormalizedFilePath (NormalizedFilePath _ fp) =
226
225
case decodeFilePath fp of
@@ -239,6 +238,7 @@ emptyNormalizedUri =
239
238
let s = " file://"
240
239
in NormalizedUri (hash s) s
241
240
241
+ -- | 'NormalizedFilePath' that contains an empty file path
242
242
emptyNormalizedFilePath :: NormalizedFilePath
243
243
emptyNormalizedFilePath = NormalizedFilePath emptyNormalizedUri " "
244
244
0 commit comments