From michael@snoyman.com Sun Sep 9 13:41:03 2012 From: Michael Snoyman To: web-devel@haskell.org Subject: Re: [web-devel] [Yesod] Abstracting permissions with Yesod Date: Sun, 09 Sep 2012 14:40:38 +0300 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5066314247368893985==" --===============5066314247368893985== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sun, Sep 9, 2012 at 2:15 PM, Arthur Clemens wrot= e: > /admin AdminR: > /product/#ProductId AdminProductR GET POST > ... > > > So if I have: > > /admin AdminR: > / AdminRootR GET > /categories AdminCategoriesR GET > > and the handlers are specified as: > > getAdminRootR :: Handler RepHtml > getAdminRootR =3D do > .. > > getAdminCategoriesR :: Handler RepHtml > getAdminCategoriesR =3D do > .. > > what more is needed to create links? > Currently I use but that results in > > Handler/Admin.hs:14:22: > Not in scope: data constructor `AdminRootR' > > Arthur You'll need the AdminR constructor: AdminR AdminRootR. If you use -ddump-splices when compiling, GHC will spit out the generated code/data types, which should give a good idea of what's going on under the surface. Michael --===============5066314247368893985==--