Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6590055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:15:10+00:00 2026-05-25T17:15:10+00:00

I am try to pass a parameter to a route at runtime inside a

  • 0

I am try to pass a parameter to a route at runtime inside a hamlet template.

  buildFeedRow :: Item [Attribute Text] -> GWidget a a ()
  buildFeedRow item = do
    let f = unpackItem item
        u :: Text = url f
    [whamlet|
    <tr>
      <td>
        <a href="#{url f}">#{url f}
      <td>#{nextCrawlTime f}
      <td>#{crawlDelay f}
      <td>
         <a href="@{DeleteFeedR u}">Delete
      <td>Edit |]

It fails with a type error.

Couldn't match type `Route a' with `ConsoleRoute'
Expected type: ConsoleRoute -> [(Text, Text)] -> Text
Actual type: Route a -> [(Text, Text)] -> Text
Expected type: GHandler
                 a a (ConsoleRoute -> [(Text, Text)] -> Text)
  Actual type: GGHandler
                 a
                 a
                 (Data.Enumerator.Iteratee Data.ByteString.Internal.ByteString IO)
                 (Route a -> [(Text, Text)] -> Text)
In the first argument of `lift', namely `getUrlRenderParams'
In the first argument of `(>>=)', namely `lift getUrlRenderParams'

My question is how do you pass parameters to routes in a hamlet template.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:15:11+00:00Added an answer on May 25, 2026 at 5:15 pm

    I think the the type signature of your widget might be too generic. Since you’re using a route, it now depends on your foundation type so it should have the type

    buildFeedRow :: Item [Attribute Text] -> GWidget YourFoundation YourFoundation ()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a get-parameter with name controller . When I try to pass it
I try to pass Package variable to my UserControl: <uc:Template ID=Template runat=server Package=<%=TemplateParams.SimpleSearch %>
I'm working on a program where I try to pass parameters by reference. I'm
What is the difference between ',' and 'as' in except statements, eg: try: pass
If you try to pass the username/password to OpenVPN from a file via the
My compiler behaves oddly when I try to pass a fixed-size array to a
Given the email address: Jim <jim@example.com> If I try to pass this to MailAddress
Hy Guys, I have to pass in a method action a string parameter, because
I try to pass a pointer of a structure which is given me as
I'm trying to pass some parameter to a function used as callback , how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.