module Imp.Extra.HsModule where

import qualified GHC.Hs as Hs

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