[Haskell-beginners] How to write the FromJSON instance for CUid

PICCA Frederic-Emmanuel frederic-emmanuel.picca at synchrotron-soleil.fr
Fri Aug 10 08:05:21 UTC 2018


Hello, and thanks for the reply

What about this 

instance FromJSON CGid where
    parseJSON x = CGid <$> (parseJSON x :: Parser Word32)
    {-# INLINE parseJSON #-}


Do you think that it deal with all the problem you are trying to prevent ?


Cheers

Fred


More information about the Beginners mailing list