Commits

Bryan O'Sullivan committed 2da8438

Make Result an instance of NFData

  • Participants
  • Parent commits 9305520

Comments (0)

Files changed (1)

Data/Aeson/Types.hs

               | Success a
                 deriving (Eq, Show, Typeable)
 
+instance (NFData a) => NFData (Result a) where
+    rnf (Success a) = rnf a
+    rnf (Error err) = rnf err
+
 instance Functor Result where
     fmap f (Success a) = Success (f a)
     fmap _ (Error err) = Error err