generateSmokeClassesModule :: SmokeModule -> Gen ()
generateSmokeClassesModule m = do
  modName <- classesModuleName
  file <- moduleToFilePath modName
  let cs = filter (not . skipClass) (smokeModuleClasses m)
  decls <- mapM toClassDecl cs
  let mname = ModuleName $ T.unpack modName
      ptrImport = ImportDecl dummyLoc (ModuleName "Foreign.Ptr") False False Nothing Nothing Nothing
      hmod = Module dummyLoc mname [] Nothing Nothing [ptrImport] decls
  lift $ writeFile file (prettyPrint hmod)

-- FIXME: If inner classes are a problem here, do not generate them in
-- this module.  Just generate them in the module with their
-- definition since external modules will not be relying on them
generateSmokeClassesModule :: SmokeModule -> Gen ()
generateSmokeClassesModule m = do
  modName <- classesModuleName
  file <- moduleToFilePath modName
  let cs = filter (not . skipClass) (smokeModuleClasses m)
  decls <- mapM toClassDecl cs
  let mname = ModuleName $ T.unpack modName
      ptrImport = ImportDecl dummyLoc (ModuleName "Foreign.Ptr") False False Nothing Nothing Nothing
      hmod = Module dummyLoc mname [] Nothing Nothing [ptrImport] decls
  lift $ writeFile file (prettyPrint hmod)

-- FIXME: If inner classes are a problem here, do not generate them in
-- this module.  Just generate them in the module with their
-- definition since external modules will not be relying on them
generateSmokeClassesModule m = do
  modName <- classesModuleName
  file <- moduleToFilePath modName
  let cs = filter (not . skipClass) (smokeModuleClasses m)
  decls <- mapM toClassDecl cs
  let mname = ModuleName $ T.unpack modName
      ptrImport = ImportDecl dummyLoc (ModuleName "Foreign.Ptr") False False Nothing Nothing Nothing
      hmod = Module dummyLoc mname [] Nothing Nothing [ptrImport] decls
  lift $ writeFile file (prettyPrint hmod)

-- FIXME: If inner classes are a problem here, do not generate them in
-- this module.  Just generate them in the module with their
-- definition since external modules will not be relying on them