Skip to content

Parse Error inside QuasiQuotes #907

Closed
@ericnething

Description

@ericnething

I am using haskell-mode version 20150920.858 from melpa. I updated a few days ago. The code below gives me the error Illegal Token: =

messageField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Text
messageField = Field
  { fieldParse = parseHelper $ Right
  , fieldView = \theId name attrs val isReq -> [whamlet|
$newline never
<input id="#{theId}" name="#{name}" maxlength="140" type="text" value="#{either id id val}" :isReq:required  *{attrs}>
  |]
  , fieldEnctype = UrlEncoded
  }

It is the <input> line that is causing the problem. Strangely, if I remove the quotations from value="#{either id id val}", the error goes away. Nothing inside the QuasiQuotes should be parsed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions