[commit: haddock] ghc-head, wip/T14529, wip/revert-ttg-2017-11-20, wip/ttg2-2017-11-10, wip/ttg3-2017-11-12, wip/ttg4-constraints-2017-11-13, wip/ttg6-unrevert-2017-11-22: Match Trees That Grow (73a26af)

git at git.haskell.org git at git.haskell.org
Tue Nov 28 11:56:15 UTC 2017


Repository : ssh://git@git.haskell.org/haddock

On branches: ghc-head,wip/T14529,wip/revert-ttg-2017-11-20,wip/ttg2-2017-11-10,wip/ttg3-2017-11-12,wip/ttg4-constraints-2017-11-13,wip/ttg6-unrevert-2017-11-22
Link       : http://git.haskell.org/haddock.git/commitdiff/73a26af844ac50b8bec39de11d64452a6286b00c

>---------------------------------------------------------------

commit 73a26af844ac50b8bec39de11d64452a6286b00c
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Wed Nov 8 11:05:36 2017 +0200

    Match Trees That Grow


>---------------------------------------------------------------

73a26af844ac50b8bec39de11d64452a6286b00c
 haddock-api/src/Haddock/Interface/Create.hs     | 4 ++--
 haddock-api/src/Haddock/Interface/Specialize.hs | 5 ++---
 haddock-api/src/Haddock/Types.hs                | 3 +++
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index c6a67af..357cd78 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -520,10 +520,10 @@ ungroup group_ =
   mkDecls (typesigs . hs_valds)  SigD   group_ ++
   mkDecls (valbinds . hs_valds)  ValD   group_
   where
-    typesigs (ValBindsOut _ sigs) = filter isUserLSig sigs
+    typesigs (XValBindsLR (NValBinds _ sigs)) = filter isUserLSig sigs
     typesigs _ = error "expected ValBindsOut"
 
-    valbinds (ValBindsOut binds _) = concatMap bagToList . snd . unzip $ binds
+    valbinds (XValBindsLR (NValBinds binds _)) = concatMap bagToList . snd . unzip $ binds
     valbinds _ = error "expected ValBindsOut"
 
 
diff --git a/haddock-api/src/Haddock/Interface/Specialize.hs b/haddock-api/src/Haddock/Interface/Specialize.hs
index 0cac818..f0cf08a 100644
--- a/haddock-api/src/Haddock/Interface/Specialize.hs
+++ b/haddock-api/src/Haddock/Interface/Specialize.hs
@@ -203,12 +203,11 @@ setInternalOccName occ name =
 
 
 -- | Compute set of free variables of given type.
-freeVariables :: forall p. (NamedThing (IdP p), DataId p, Typeable p)
-              => HsType p -> Set Name
+freeVariables :: HsType GhcRn -> Set Name
 freeVariables =
     everythingWithState Set.empty Set.union query
   where
-    query term ctx = case cast term :: Maybe (HsType p) of
+    query term ctx = case cast term :: Maybe (HsType GhcRn) of
         Just (HsForAllTy _ bndrs _) ->
             (Set.empty, Set.union ctx (bndrsNames bndrs))
         Just (HsTyVar _ _ (L _ name))
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index f0f1b2f..bb8ea9c 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -697,3 +697,6 @@ type instance XXTyVarBndr   DocNameI = PlaceHolder
 
 type instance XFieldOcc    DocNameI = DocName
 type instance XXFieldOcc   DocNameI = PlaceHolder
+
+type instance XValBinds    DocNameI DocNameI = PlaceHolder
+type instance XXValBindsLR DocNameI DocNameI = NHsValBindsLR DocNameI



More information about the ghc-commits mailing list