:: Read a => String -> Maybe a package:universum

Polymorhpic version of readMaybe.
>>> readMaybe @Int @Text "123"
Just 123

>>> readMaybe @Int @Text "aa"
Nothing
Lifted version of die. die is available since base-4.8, but it's more convenient to redefine it instead of using CPP.