diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-05-09 10:42:03 -0400 |
---|---|---|
committer | Simon Jakobi <simon.jakobi@gmail.com> | 2018-06-13 23:39:30 +0200 |
commit | 3b028ce3d1996f82cad8a273bcf95445238f5c6e (patch) | |
tree | 0ef60accb0c2a5e090d92738a35033c158205e8d /haddock-api/src/Haddock | |
parent | 6be939f24f9db58c19a220daa0ff73d3a633a244 (diff) |
DerivingVia changes
Diffstat (limited to 'haddock-api/src/Haddock')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs | 7 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Interface/Rename.hs | 11 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Types.hs | 1 |
3 files changed, 11 insertions, 8 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs index 34512de8..7abb01a3 100644 --- a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs +++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs @@ -211,6 +211,7 @@ classify tok = ITqualified -> TkKeyword ITthen -> TkKeyword ITtype -> TkKeyword + ITvia -> TkKeyword ITwhere -> TkKeyword ITforall {} -> TkKeyword @@ -261,9 +262,6 @@ classify tok = IToptions_prag {} -> TkPragma ITinclude_prag {} -> TkPragma ITlanguage_prag -> TkPragma - ITvect_prag {} -> TkPragma - ITvect_scalar_prag {} -> TkPragma - ITnovect_prag {} -> TkPragma ITminimal_prag {} -> TkPragma IToverlappable_prag {} -> TkPragma IToverlapping_prag {} -> TkPragma @@ -408,9 +406,6 @@ inPragma False tok = IToptions_prag {} -> True ITinclude_prag {} -> True ITlanguage_prag -> True - ITvect_prag {} -> True - ITvect_scalar_prag {} -> True - ITnovect_prag {} -> True ITminimal_prag {} -> True IToverlappable_prag {} -> True IToverlapping_prag {} -> True diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs index 5684e70a..c07f8300 100644 --- a/haddock-api/src/Haddock/Interface/Rename.hs +++ b/haddock-api/src/Haddock/Interface/Rename.hs @@ -560,13 +560,20 @@ renameDerivD :: DerivDecl GhcRn -> RnM (DerivDecl DocNameI) renameDerivD (DerivDecl { deriv_type = ty , deriv_strategy = strat , deriv_overlap_mode = omode }) = do - ty' <- renameLSigWcType ty + ty' <- renameLSigWcType ty + strat' <- mapM (mapM renameDerivStrategy) strat return (DerivDecl { deriv_ext = noExt , deriv_type = ty' - , deriv_strategy = strat + , deriv_strategy = strat' , deriv_overlap_mode = omode }) renameDerivD (XDerivDecl _) = panic "haddock:renameDerivD" +renameDerivStrategy :: DerivStrategy GhcRn -> RnM (DerivStrategy DocNameI) +renameDerivStrategy StockStrategy = pure StockStrategy +renameDerivStrategy AnyclassStrategy = pure AnyclassStrategy +renameDerivStrategy NewtypeStrategy = pure NewtypeStrategy +renameDerivStrategy (ViaStrategy ty) = ViaStrategy <$> renameLSigType ty + renameClsInstD :: ClsInstDecl GhcRn -> RnM (ClsInstDecl DocNameI) renameClsInstD (ClsInstDecl { cid_overlap_mode = omode , cid_poly_ty =ltype, cid_tyfam_insts = lATs diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs index e4d79760..1f96abc0 100644 --- a/haddock-api/src/Haddock/Types.hs +++ b/haddock-api/src/Haddock/Types.hs @@ -725,6 +725,7 @@ type instance XCFamEqn DocNameI _ _ = NoExt type instance XCClsInstDecl DocNameI = NoExt type instance XCDerivDecl DocNameI = NoExt +type instance XViaStrategy DocNameI = LHsSigType DocNameI type instance XDataFamInstD DocNameI = NoExt type instance XTyFamInstD DocNameI = NoExt type instance XClsInstD DocNameI = NoExt |