genWrappers :: [(Name, [BC])] -> String
genWrappers bcs = let
                    tags = nubBy (\x y -> snd x == snd y)  $ concatMap (getCallback . snd) bcs
                  in
                    case tags of
                        [] -> ""
                        t -> concatMap genWrapper t ++ genDispatcher t
genWrappers :: [(Name, [BC])] -> String
genWrappers bcs = let
                    tags = nubBy (\x y -> snd x == snd y)  $ concatMap (getCallback . snd) bcs
                  in
                    case tags of
                        [] -> ""
                        t -> concatMap genWrapper t ++ genDispatcher t
genWrappers bcs = let
                    tags = nubBy (\x y -> snd x == snd y)  $ concatMap (getCallback . snd) bcs
                  in
                    case tags of
                        [] -> ""
                        t -> concatMap genWrapper t ++ genDispatcher t