
13 Jun
2019
13 Jun
'19
1:36 a.m.
Hi everyone, I was playing around with some tests and run into code that looks really similar to the following function someCheck :: (Show a, Read a, Eq a) => String -> a -> Bool someCheck s v = (read . show . read $ s) == v But obviously, it's not clear what instance to use in the right-most read and the show functions. So it doesn't compile. Out of curiosity, is it possible to make this function compile? I've struggled some time and could not find an answer by myself, so here I am. Thanks in advance! Cheers, boris@d12frosted.io