Arbitrary
instances for InstallDirs
and PathTemplate
create invalid filenames
#9281
Labels
Arbitrary
instances for InstallDirs
and PathTemplate
create invalid filenames
#9281
Describe the bug
While they are used at multiple types, ultimately those bottom out to
Prelude
'sFilePath
which isString
. The result is that the pathnames they generate can containNUL
s, Windows device names, and illegal sequences (for example, on Windows a path component cannot end with a.
).Ideally we would use the new
filepath
library with its bespokeFilePath
type, for which validArbitrary
instances can be written and may even already exist. There is no way to make it work withPrelude
'sFilePath
.There is more discussion in #9253 and #9254, and the latter adds a warning comment to the problematic instances.
The text was updated successfully, but these errors were encountered: