{- | This module provides functions to generate regular Haskell records without using the large-records library. -} module Proto3.Suite.DotProto.Generate.Record where import Language.Haskell.Syntax import Proto3.Suite.DotProto.Generate.Syntax -- | Generate 'NFData' instance for a type using GHC generics nfDataInstD :: HsDecl -> String -> HsDecl nfDataInstD :: HsDecl -> String -> HsDecl nfDataInstD HsDecl _ String typeName = HsQName -> [HsType] -> [HsDecl] -> HsDecl instDecl_ (String -> HsQName haskellName String "NFData") [ String -> HsType type_ String typeName ] []