module Imp.Extra.HsModule where

import qualified GHC.Hs as Hs
import qualified Imp.Ghc as Ghc

overImports ::
  ([Hs.LImportDecl Hs.GhcPs] -> [Hs.LImportDecl Hs.GhcPs]) ->
  Ghc.HsModulePs ->
  Ghc.HsModulePs
overImports :: ([LImportDecl GhcPs] -> [LImportDecl GhcPs])
-> HsModulePs -> HsModulePs
overImports [LImportDecl GhcPs] -> [LImportDecl GhcPs]
f HsModulePs
x = HsModulePs
x {Hs.hsmodImports = f $ Hs.hsmodImports x}