Haskell.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
newer
Persistent: IdIn constructor added

Yesod. Hamlet problems

older
Python web benchmark help requested

Anton Cheshkov

15 Mar 2011 15 Mar '11
7:28 p.m.

Hello Michael. Hello All. Please help me to explain what is wrong i have a function which worked before i add line *<img src="StaticR p1_png"> * : *toHamlet :: [SearchResult] -> String - > Int -> Html* *toHamlet results queryId n = [$hamlet|* *$forall r <- results* *

* *
* * <img src="StaticR p1_png">* *
* * <span>#{snd $ snd r}* *
* *
* *|]* I have the compile time error: *Couldn't match expected type `hamlet-0.7.1:Text.Hamlet.Quasi.R:HamletUrlHtmlM'* * against inferred type `EstateRoute'* * In the first argument of `\ u[ahZb]* * -> hamlet-0.7.1:Text.Hamlet.Quasi.urlToHamletMonad* * u[ahZb] []', namely* * `StaticR p1_png'* * In a stmt of a 'do' expression:* * \ u[ahZb]* * -> hamlet-0.7.1:Text.Hamlet.Quasi.urlToHamletMonad u[ahZb] []* * (StaticR p1_png)* * In the expression:* * do { (hamlet-0.7.1:Text.Hamlet.Quasi.htmlToHamletMonad* * . preEscapedString)* * "

Attachments:

  • attachment.html (text/html — 3.0 KB)
0 0
Reply
Sign in to reply online Use email software

Show replies by date

Michael Snoyman

15 Mar 15 Mar
7:48 p.m.

Two things: 1) You need to change the return type of toHamlet from Html to Hamlet YourRoute 2) I think you meant Michael On Tue, Mar 15, 2011 at 9:28 PM, Anton Cheshkov wrote:

...

Hello Michael.  Hello All. Please help me to explain  what is wrong i have a function which worked before i add line <img src="StaticR p1_png"> : toHamlet :: [SearchResult] -> String - > Int -> Html toHamlet results queryId n = [$hamlet| $forall r <- results     

        
           <img src="StaticR p1_png">         
            <span>#{snd $ snd r}         
        
|] I have the compile time error: Couldn't match expected type `hamlet-0.7.1:Text.Hamlet.Quasi.R:HamletUrlHtmlM'            against inferred type `EstateRoute'     In the first argument of `\ u[ahZb]                                   -> hamlet-0.7.1:Text.Hamlet.Quasi.urlToHamletMonad                                        u[ahZb] []', namely         `StaticR p1_png'     In a stmt of a 'do' expression:         \ u[ahZb]             -> hamlet-0.7.1:Text.Hamlet.Quasi.urlToHamletMonad u[ahZb] []           (StaticR p1_png)     In the expression:         do { (hamlet-0.7.1:Text.Hamlet.Quasi.htmlToHamletMonad             . preEscapedString)                "

0 0
Reply
Sign in to reply online Use email software
5225
Age (days ago)
5225
Last active (days ago)

List overview

Download

1 comments
2 participants

Add to favorites Remove from favorites

tags

participants (2)

  • Anton Cheshkov
  • Michael Snoyman

HyperKitty Powered by HyperKitty version 1.3.9.