Use the primes package
Prefer comparing over compare `on`
Remove unnecessary imports
Use splitOn from the split package
Remove unnecessary import
Add type annotation
Redundant $
Use String as an alias for [Char]
Redundant $ and ()