diff options
author | alexbiehl <alex.biehl@gmail.com> | 2017-08-16 09:06:40 +0200 |
---|---|---|
committer | alexbiehl <alex.biehl@gmail.com> | 2017-08-16 09:06:40 +0200 |
commit | f7032e5e48c7a6635e1dca607a37a16c8893e94b (patch) | |
tree | c7828fc46261fa482f5c2fe4c40250075f009f1d /haddock-library/src/Documentation | |
parent | 2ad45f618b9ad2a7a5507e83c3990d93b752a3c0 (diff) |
Refactoring: Make doc renaming monadic
This allows us to later throw warnings if can't find an identifier
Diffstat (limited to 'haddock-library/src/Documentation')
-rw-r--r-- | haddock-library/src/Documentation/Haddock/Types.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/haddock-library/src/Documentation/Haddock/Types.hs b/haddock-library/src/Documentation/Haddock/Types.hs index 48b29075..1e76c631 100644 --- a/haddock-library/src/Documentation/Haddock/Types.hs +++ b/haddock-library/src/Documentation/Haddock/Types.hs @@ -56,6 +56,9 @@ instance Bitraversable MetaDoc where overDoc :: (DocH a b -> DocH c d) -> MetaDoc a b -> MetaDoc c d overDoc f d = d { _doc = f $ _doc d } +overDocF :: Functor f => (DocH a b -> f (DocH c d)) -> MetaDoc a b -> f (MetaDoc c d) +overDocF f d = (\x -> d { _doc = x }) <$> f (_doc d) + type Version = [Int] data Hyperlink = Hyperlink |