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