-- | This module provides functions to generate Haskell records module Proto3.Suite.DotProto.Generate.Record where import GHC.Types.Name.Occurrence (tcName) import Proto3.Suite.DotProto.Generate.Syntax -- | Generate `Control.DeepSeq.NFData` instance for a type using GHC generics nfDataInstD :: HsDecl -> String -> HsDecl nfDataInstD :: HsDecl -> String -> HsDecl nfDataInstD HsDecl _ String typeName = HsQName -> [HsType] -> [HsBind] -> HsDecl instDecl_ (NameSpace -> String -> HsQName haskellName NameSpace tcName String "NFData") [ String -> HsType type_ String typeName ] []