-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
to HsCommon, HsInterface, HsImplementation, HsTopLevel * separate out HsInterface * separate out HsImplementation * remove warnings in separated modules * remove warnings in HsCast * rename remaining HsFrontEnd to HsTopLevel * HsCommon module separation * remove warnings
- Loading branch information
Showing
9 changed files
with
571 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{-# LANGUAGE FlexibleContexts #-} | ||
{-# LANGUAGE LambdaCase #-} | ||
{-# LANGUAGE OverloadedStrings #-} | ||
{-# LANGUAGE RecordWildCards #-} | ||
|
||
module FFICXX.Generate.Code.HsCommon | ||
( genExtraImport_, | ||
genExtraImport, | ||
genImportInCast_, | ||
) | ||
where | ||
|
||
import FFICXX.Generate.Name (subModuleName) | ||
import FFICXX.Generate.Type.Module (ClassModule (..)) | ||
import qualified FFICXX.Generate.Util.GHCExactPrint as Ex | ||
import FFICXX.Generate.Util.HaskellSrcExts (mkImport) | ||
import qualified GHC.Hs as Ex | ||
import Language.Haskell.Exts.Syntax (ImportDecl) | ||
|
||
-- TODO: Remove | ||
genExtraImport_ :: ClassModule -> [ImportDecl ()] | ||
genExtraImport_ cm = map mkImport (cmExtraImport cm) | ||
|
||
-- This is the new version. | ||
genExtraImport :: ClassModule -> [Ex.ImportDecl Ex.GhcPs] | ||
genExtraImport cm = fmap Ex.mkImport (cmExtraImport cm) | ||
|
||
-- OLD | ||
-- TODO: Remove | ||
genImportInCast_ :: ClassModule -> [ImportDecl ()] | ||
genImportInCast_ m = | ||
fmap (mkImport . subModuleName) $ cmImportedSubmodulesForCast m |
Oops, something went wrong.