X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=utils%2Fghctags%2FGhcTags.hs;fp=utils%2Fghctags%2FGhcTags.hs;h=ef0e55e85a336278550ace89ad12f2e57ff8dcbb;hp=5237bbc53bba638f9d0343cdef887e943bc55b04;hb=9761825a6ee1c7c0b7115b9b7f58bd3b3e8cb5fe;hpb=5a230f0eba0ed06df341a8180f8521d9f869745a diff --git a/utils/ghctags/GhcTags.hs b/utils/ghctags/GhcTags.hs index 5237bbc..ef0e55e 100644 --- a/utils/ghctags/GhcTags.hs +++ b/utils/ghctags/GhcTags.hs @@ -251,17 +251,12 @@ boundValues :: ModuleName -> HsGroup Name -> [FoundThing] boundValues mod group = let vals = case hs_valds group of ValBindsOut nest _sigs -> - [ x | (_rec, binds) <- nest, bind <- bagToList binds, - x <- boundThings mod bind ] + [ x | (_rec, binds) <- nest + , bind <- bagToList binds + , x <- boundThings mod bind ] _other -> error "boundValues" - tys = concat $ map tyBound (hs_tyclds group) - where tyBound ltcd = case unLoc ltcd of - ForeignType { tcdLName = n } -> [found n] - TyData { tcdLName = tycon, tcdCons = cons } -> - dataNames tycon cons - TySynonym { tcdLName = n } -> [found n] - ClassDecl { tcdLName = n } -> [found n] - _ -> error "boundValues: tys" + tys = [ n | ns <- map (tyClDeclNames . unLoc) (hs_tyclds group) + , n <- map found ns ] fors = concat $ map forBound (hs_fords group) where forBound lford = case unLoc lford of ForeignImport n _ _ -> [found n]