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