I was making a small script that would remove all blank characters before a newline. i was unable to find a robust way to identify binary files so i decided to whitelist extensions.
I have a list of extensions without the dot and i needed to get a OsChar for the dot to use cons on each extension.
With a fresh mind i reconsidered my options and had a second look over filepath and found hasExtension which does exactly what i wanted, i also could use the Semigroup typeclass combined with isSuffixOf to implement that.