serokell / universum

:milky_way: Prelude written in @Serokell
MIT License
174 stars 26 forks source link

[#165] `readMaybe` type changing #256

Closed DK318 closed 2 years ago

DK318 commented 2 years ago

Description

Problem

readMaybe type isn't polymorphic. One of the key points in the design of Universum is to avoid String as much as possible.

Solution

Changed type to readMaybe :: (ToString a, Read b) => a -> Maybe b

Related issues(s)

✓ Checklist for your Pull Request

Ideally a PR has all of the checkmarks set.

If something in this list is irrelevant to your PR, you should still set this checkmark indicating that you are sure it is dealt with (be that by irrelevance).

Related changes (conditional)

Stylistic guide (mandatory)