From 8b2ee333020aeb9e639cd1772e1dca3b4b4ef3d2 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 1 Oct 2011 01:34:06 +0100 Subject: Follow changes to ForeignImport/ForeignExport in GHC --- src/Haddock/Interface/Create.hs | 2 +- src/Haddock/Interface/ExtractFnArgDocs.hs | 2 +- src/Haddock/Interface/Rename.hs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Haddock/Interface') diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index 860a0044..057fceb7 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -263,7 +263,7 @@ declsFromClass class_ = docs ++ defs ++ sigs ++ ats declNames :: HsDecl a -> [a] declNames (TyClD d) = [tcdName d] -declNames (ForD (ForeignImport n _ _)) = [unLoc n] +declNames (ForD (ForeignImport n _ _ _)) = [unLoc n] -- we have normal sigs only (since they are taken from ValBindsOut) declNames (SigD sig) = sigNameNoLoc sig declNames _ = error "unexpected argument to declNames" diff --git a/src/Haddock/Interface/ExtractFnArgDocs.hs b/src/Haddock/Interface/ExtractFnArgDocs.hs index 8889c3ab..a9f8a807 100644 --- a/src/Haddock/Interface/ExtractFnArgDocs.hs +++ b/src/Haddock/Interface/ExtractFnArgDocs.hs @@ -24,7 +24,7 @@ import GHC getDeclFnArgDocs :: HsDecl Name -> Map Int HsDocString getDeclFnArgDocs (SigD (TypeSig _ ty)) = getTypeFnArgDocs ty -getDeclFnArgDocs (ForD (ForeignImport _ ty _)) = getTypeFnArgDocs ty +getDeclFnArgDocs (ForD (ForeignImport _ ty _ _)) = getTypeFnArgDocs ty getDeclFnArgDocs (TyClD (TySynonym {tcdSynRhs = ty})) = getTypeFnArgDocs ty getDeclFnArgDocs _ = Map.empty diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs index 4ea22a2e..546ba62b 100644 --- a/src/Haddock/Interface/Rename.hs +++ b/src/Haddock/Interface/Rename.hs @@ -392,14 +392,14 @@ renameSig sig = case sig of renameForD :: ForeignDecl Name -> RnM (ForeignDecl DocName) -renameForD (ForeignImport lname ltype x) = do +renameForD (ForeignImport lname ltype co x) = do lname' <- renameL lname ltype' <- renameLType ltype - return (ForeignImport lname' ltype' x) -renameForD (ForeignExport lname ltype x) = do + return (ForeignImport lname' ltype' co x) +renameForD (ForeignExport lname ltype co x) = do lname' <- renameL lname ltype' <- renameLType ltype - return (ForeignExport lname' ltype' x) + return (ForeignExport lname' ltype' co x) renameInstD :: InstDecl Name -> RnM (InstDecl DocName) -- cgit v1.2.3