prettyFun :: FileModule -> FunBindBase t VName -> Maybe Html
prettyFun fm (FunBind _ name _retdecl _rettype _tparams _args _ doc _)
  | Just (BoundF (tps,pts,rett)) <- M.lookup name vtable
  , visible Term name fm = Just $
    renderDoc doc <> "val " <> vnameHtml name <>
    foldMap (" " <>) (map prettyTypeParam tps) <> ": " <>
    foldMap (\t -> prettyParam t <> " -> ") pts <> prettyType rett
    where FileModule Env {envVtable = vtable} _ = fm
prettyFun :: FileModule -> FunBindBase t VName -> Maybe Html
prettyFun fm (FunBind _ name _retdecl _rettype _tparams _args _ doc _)
  | Just (BoundF (tps,pts,rett)) <- M.lookup name vtable
  , visible Term name fm = Just $
    renderDoc doc <> "val " <> vnameHtml name <>
    foldMap (" " <>) (map prettyTypeParam tps) <> ": " <>
    foldMap (\t -> prettyParam t <> " -> ") pts <> prettyType rett
    where FileModule Env {envVtable = vtable} _ = fm
prettyFun fm (FunBind _ name _retdecl _rettype _tparams _args _ doc _)
  | Just (BoundF (tps,pts,rett)) <- M.lookup name vtable
  , visible Term name fm = Just $
    renderDoc doc <> "val " <> vnameHtml name <>
    foldMap (" " <>) (map prettyTypeParam tps) <> ": " <>
    foldMap (\t -> prettyParam t <> " -> ") pts <> prettyType rett
    where FileModule Env {envVtable = vtable} _ = fm