PureScript by example: Applicative Validation: Exercises: stateRegex and nonEmptyRegex

Yes, I believe that was the original motivation for using unsafePartial in this situation.

It would be really nice to get both compile-time safety and conciseness by allowing some of this code to execute as a post-compilation step (perhaps compiledPartial). Elaborated a bit more on this wishlist item in this post.