@@ -1091,9 +1091,7 @@ instance (GFromRecord a, GFromRecord b) => GFromRecord (a :*: b) where
1091 {-# INLINE gParseRecord #-}
1091 {-# INLINE gParseRecord #-}
1093instance (Selector s, GFromJSON a) => GFromRecord (S1 s a) where
1093instance (Selector s, GFromJSON a) => GFromRecord (S1 s a) where
1094− gParseRecord obj = case M.lookup (T.pack key) obj of
1094+ gParseRecord = maybe (notFound key) gParseJSON . M.lookup (T.pack key)
1095− Nothing -> notFound key
1096− Just v -> gParseJSON v
1098 key = selName (undefined :: t s a p)
1096 key = selName (undefined :: t s a p)
1099 {-# INLINE gParseRecord #-}
1097 {-# INLINE gParseRecord #-}