runner icon indicating copy to clipboard operation
runner copied to clipboard

Add purescript/transformers and purescript/exceptions to enable authors to create custom assertion functions

Open hobovsky opened this issue 1 year ago • 1 comments

Motivated by this translation.

I wanted to create my own assertion, because basic Spec assertions do not allow for custom messages. I came up with:

-- shouldEqualMsg :: String -> String -> String -> MonadThrow Error Unit
shouldEqualMsg v1 v2 msg = when (v1 /= v2) $ fail msg

However, signatures of assertion functions use types which are not available in packages defined as dependencies accessible for code of kata:


:+1: reaction might help to get this request prioritized.

hobovsky avatar Jan 01 '24 17:01 hobovsky

The container image for PureScript is maintained in https://github.com/codewars/purescript

Can you open a PR?

kazk avatar Jan 03 '24 07:01 kazk