0
我想在Yesod(版本1.4.5.1)中使用分层路由,但显然我做错了什么。我config/routes
文件的相关部分(我使用的是标准的脚手架网站)看起来是这样的:Yesod中的分层路由
/ HomeR GET
/about AboutR:
/AboutIndexR GET
/team AboutTeamR GET
/service ServiceR:
/ServiceIndexR GET
/newsletter ServiceNewsletterR GET
我得到以下编译错误:
Foundation.hs:34:21
Exception when trying to run compile-time code:
Overlapping routes:
("HomeR", "AboutIndexR")
("HomeR", "ServiceIndexR")
("AboutIndexR", "ServiceIndexR")
显然耶索德不明白,所有的三个/
是不同的路径!?我的错误在哪里?
这很奇怪。尽管我非常肯定缩进是正确的,但经过一些(无关的)更改和yesod的完全重新安装后,一切都如预期的那样工作......感谢您确认我的方法是/是确定的。 – Arno 2015-04-01 17:17:39