Skip to content

Instantly share code, notes, and snippets.

@hhefesto
Last active November 5, 2018 23:24
Show Gist options
  • Select an option

  • Save hhefesto/a10bdffa5a3c9893147ca44c74f74a1e to your computer and use it in GitHub Desktop.

Select an option

Save hhefesto/a10bdffa5a3c9893147ca44c74f74a1e to your computer and use it in GitHub Desktop.
Line 36 breaks my code, and I do not know why :(
supportModalTemplate ::[Maybe (Entity Issue)] -> Maybe (Entity Customer) -> [Entity FollowUp] -> Html ()
supportModalTemplate _ Nothing _ = h2_ "Customer not found :S"
supportModalTemplate issues (Just customer) followUps = do
div_ [ class_ "panel panel-default" ] $ do
div_ [ class_ "panel-heading" ] $ do
h3_ [ class_ "panel-title" ] $ "Support"
div_ [ class_ "panel-body" ] $ do
div_ [ class_ "list-group" ] $ do
forM_ issues $ \issue -> case issue of
Nothing ->
div_ [ class_ "modal fade", id_ "supportModal", tabindex_ "-1", role_ "dialog", ariaLabelledby_ "myModalLabel" ] $ do
toHtmlRaw "<!-- no issues -->"
Just i ->
button_ [ type_ "button", class_ ("btn list-group-item " <> (issueState i)), data_ "toggle" "modal", data_ "target" "#supportModal", data_ "issueid" "8" ] $
issueSummary $ i
button_ [ type_ "button", class_ "btn list-group-item disabled", style_ "border:none; background-color: transparent; background-repeat:no-repeat; cursor:pointer; overflow: hidden; outline:none;" ] $ ""
button_ [ type_ "button", class_ "btn btn-primary", data_ "toggle" "modal", data_ "target" "#newIssueModal" ] $ "New Issue"
-------------------------------------------------
forM_ issues $ \issue -> case issue of
Nothing ->
div_ [ class_ "modal fade", id_ "supportModal", tabindex_ "-1", role_ "dialog", ariaLabelledby_ "myModalLabel" ] $ do
toHtmlRaw "<!-- no issues -->"
(Just i) ->
div_ [ class_ "modal fade", id_ "supportModal", tabindex_ "-1", role_ "dialog", ariaLabelledby_ "myModalLabel" ] $ do
toHtmlRaw $ "<!-- supportModal" <> show i <> " -->"
div_ [ class_ "modal-dialog", role_ "document" ] $ do
div_ [ class_ "modal-content" ] $ do
div_ [ class_ "modal-header" ] $ do
button_ [ type_ "button", class_ "close", data_ "dismiss" "modal", ariaLabel_ "Close" ] $ span_ [ ariaHidden_ "true" ] $ "\215"
h4_ [ class_ "modal-title", id_ "myModalLabel", align_ "left" ] $ ""
div_ [ class_ "modal-body" ] $ do
form_ $ do
div_ [ class_ "form-group", align_ "left" ] $ do
h4_ (issueDate i <> " " <> customerName customer)
div_ [ class_ "well well-lg" ] $ issueDetails i
--forM_ followUps $ \followUp ->
(h4_ "June 5, 2018 by RDATAA Tech Support") :: Html ()
(div_ [ class_ "well well-lg" ] "You should do this and that.") :: Html ()
div_ [ class_ "form-group", align_ "left" ] $ do
label_ [ for_ "message-text", class_ "control-label" ] $ "New Message:"
textarea_ [ class_ "form-control", id_ "message-text" ] $ ""
div_ [ class_ "modal-footer" ] $ do
button_ [ type_ "button", class_ "btn btn-primary", data_ "toggle" "confirmation", data_ "popout" "true", data_ "original-title" "", title_ "" ] $ "Send"
button_ [ type_ "button", class_ "btn btn-success", data_ "toggle" "confirmation", data_ "popout" "true", data_ "original-title" "", title_ "" ] $ "Close Issue"
button_ [ type_ "button", class_ "btn btn-default", data_ "dismiss" "modal" ] $ "Cancel"
supportModalTemplate ::[Maybe (Entity Issue)] -> Maybe (Entity Customer) -> [Entity FollowUp] -> Html ()
supportModalTemplate _ Nothing _ = h2_ "Customer not found :S"
supportModalTemplate issues (Just customer) followUps = do
div_ [ class_ "panel panel-default" ] $ do
div_ [ class_ "panel-heading" ] $ do
h3_ [ class_ "panel-title" ] $ "Support"
div_ [ class_ "panel-body" ] $ do
div_ [ class_ "list-group" ] $ do
forM_ issues $ \issue -> case issue of
Nothing ->
div_ [ class_ "modal fade", id_ "supportModal", tabindex_ "-1", role_ "dialog", ariaLabelledby_ "myModalLabel" ] $ do
toHtmlRaw "<!-- no issues -->"
Just i ->
button_ [ type_ "button", class_ ("btn list-group-item " <> (issueState i)), data_ "toggle" "modal", data_ "target" "#supportModal", data_ "issueid" "8" ] $
issueSummary $ i
button_ [ type_ "button", class_ "btn list-group-item disabled", style_ "border:none; background-color: transparent; background-repeat:no-repeat; cursor:pointer; overflow: hidden; outline:none;" ] $ ""
button_ [ type_ "button", class_ "btn btn-primary", data_ "toggle" "modal", data_ "target" "#newIssueModal" ] $ "New Issue"
-------------------------------------------------
forM_ issues $ \issue -> case issue of
Nothing ->
div_ [ class_ "modal fade", id_ "supportModal", tabindex_ "-1", role_ "dialog", ariaLabelledby_ "myModalLabel" ] $ do
toHtmlRaw "<!-- no issues -->"
(Just i) ->
div_ [ class_ "modal fade", id_ "supportModal", tabindex_ "-1", role_ "dialog", ariaLabelledby_ "myModalLabel" ] $ do
toHtmlRaw $ "<!-- supportModal" <> show i <> " -->"
div_ [ class_ "modal-dialog", role_ "document" ] $ do
div_ [ class_ "modal-content" ] $ do
div_ [ class_ "modal-header" ] $ do
button_ [ type_ "button", class_ "close", data_ "dismiss" "modal", ariaLabel_ "Close" ] $ span_ [ ariaHidden_ "true" ] $ "\215"
h4_ [ class_ "modal-title", id_ "myModalLabel", align_ "left" ] $ ""
div_ [ class_ "modal-body" ] $ do
form_ $ do
div_ [ class_ "form-group", align_ "left" ] $ do
h4_ (issueDate i <> " " <> customerName customer)
div_ [ class_ "well well-lg" ] $ issueDetails i
forM_ followUps $ \followUp ->
(h4_ "June 5, 2018 by RDATAA Tech Support") :: Html ()
(div_ [ class_ "well well-lg" ] "You should do this and that.") :: Html ()
div_ [ class_ "form-group", align_ "left" ] $ do
label_ [ for_ "message-text", class_ "control-label" ] $ "New Message:"
textarea_ [ class_ "form-control", id_ "message-text" ] $ ""
div_ [ class_ "modal-footer" ] $ do
button_ [ type_ "button", class_ "btn btn-primary", data_ "toggle" "confirmation", data_ "popout" "true", data_ "original-title" "", title_ "" ] $ "Send"
button_ [ type_ "button", class_ "btn btn-success", data_ "toggle" "confirmation", data_ "popout" "true", data_ "original-title" "", title_ "" ] $ "Close Issue"
button_ [ type_ "button", class_ "btn btn-default", data_ "dismiss" "modal" ] $ "Cancel"
/home/hhefesto/dev/laurus-nobilis/src/LucidTemplates/SupportModal.hs:36:34: error:
Illegal type: ‘"well well-lg"’
Perhaps you intended to use DataKinds
|
36 | (div_ [ class_ "well well-lg" ] "You should do this and that.") :: Html ()
| ^^^^^^^^^^^^^^
/home/hhefesto/dev/laurus-nobilis/src/LucidTemplates/SupportModal.hs:66:51: error:
Illegal type: ‘"You should do this and that."’
Perhaps you intended to use DataKinds
|
36 | (div_ [ class_ "well well-lg" ] "You should do this and that.") :: Html ()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment