
Hi everyone!
Thank you for your quick and (as always) helpful responses!
--------------------------------------------------------------------------------
Sandeep,
> This seems to work for me...
>
> someCheck :: forall a . (Show a, Read a, Eq a) => String -> a -> Bool
>
> someCheck s v = (read . show . (read :: String -> a) $ s) == v
>
> Probably requires 'ScopedTypeVariables'...
I clearly tried using `forall a`, but without `ScopedTypeVariables`. That's the missing thing. Thank you very much!
--------------------------------------------------------------------------------
Viktor, thank you for providing even more options!
I was looking for something like `TypeApplications`!
--------------------------------------------------------------------------------
Marian,
Agree, a good point. And actually, your variant works without any extensions.
Cheers,
boris@d12frosted.io
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, June 13, 2019 8:45 AM, Sandeep.C.R via Haskell-Cafe