lookupName :: String -> M.Map String Type -> TypeM Type
lookupName str decls = maybe (throwError $ str ++ " not found in declarations")
                             return
                             (M.lookup str decls)
lookupName :: String -> M.Map String Type -> TypeM Type
lookupName str decls = maybe (throwError $ str ++ " not found in declarations")
                             return
                             (M.lookup str decls)
lookupName str decls = maybe (throwError $ str ++ " not found in declarations")
                             return
                             (M.lookup str decls)