Skip to content

Improve documentation/safety of hasExt #190

@thomasjm

Description

@thomasjm

The hasExt function leaves something to be desired with respect to documentation and type safety. Commit 8288d27 left it in an even worse state, with a reference to the hasExtension function that had been reexported from the now-removed system-filepath dependency. Even worse, that commit introduced a sneaky semantics change where the first arg needs to begin with a dot when before it didn't. It would be good to at least document whether the dot is required, or even better make it foolproof with the type signature somehow.

hasExt :: Text -> FilePath -> Bool

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions