prettyDec :: FileModule -> Dec -> Maybe (DocM Html)
prettyDec fileModule dec = case dec of
  FunDec f -> return <$> prettyFun fileModule f
  SigDec s -> prettySig fileModule s
  ModDec m -> prettyMod fileModule m
  ValDec v -> prettyVal fileModule v
  TypeDec t -> renderType fileModule t
  OpenDec _x _xs (Info _names) _ -> Nothing
                            --Just $ prettyOpen fileModule (x:xs) names
  LocalDec _ _ -> Nothing

--prettyOpen :: FileModule -> [ModExpBase Info VName] -> [VName] -> DocM Html
--prettyOpen fm xs (Info names) = mconcat <$> mapM (renderModExp fm) xs
--  where FileModule (Env { envModTable = modtable }) = fm
    --envs = foldMap (renderEnv . (\(ModEnv e) -> e) . (modtable M.!)) names
prettyDec :: FileModule -> Dec -> Maybe (DocM Html)
prettyDec fileModule dec = case dec of
  FunDec f -> return <$> prettyFun fileModule f
  SigDec s -> prettySig fileModule s
  ModDec m -> prettyMod fileModule m
  ValDec v -> prettyVal fileModule v
  TypeDec t -> renderType fileModule t
  OpenDec _x _xs (Info _names) _ -> Nothing
                            --Just $ prettyOpen fileModule (x:xs) names
  LocalDec _ _ -> Nothing

--prettyOpen :: FileModule -> [ModExpBase Info VName] -> [VName] -> DocM Html
--prettyOpen fm xs (Info names) = mconcat <$> mapM (renderModExp fm) xs
--  where FileModule (Env { envModTable = modtable }) = fm
    --envs = foldMap (renderEnv . (\(ModEnv e) -> e) . (modtable M.!)) names
prettyDec fileModule dec = case dec of
  FunDec f -> return <$> prettyFun fileModule f
  SigDec s -> prettySig fileModule s
  ModDec m -> prettyMod fileModule m
  ValDec v -> prettyVal fileModule v
  TypeDec t -> renderType fileModule t
  OpenDec _x _xs (Info _names) _ -> Nothing
                            --Just $ prettyOpen fileModule (x:xs) names
  LocalDec _ _ -> Nothing

--prettyOpen :: FileModule -> [ModExpBase Info VName] -> [VName] -> DocM Html
--prettyOpen fm xs (Info names) = mconcat <$> mapM (renderModExp fm) xs
--  where FileModule (Env { envModTable = modtable }) = fm
    --envs = foldMap (renderEnv . (\(ModEnv e) -> e) . (modtable M.!)) names