- 
                Notifications
    You must be signed in to change notification settings 
- Fork 65
Closed
Description
Consider a react class:
data Message
  = Hello
  | Bye
instance showMessage :: Show Message where
  show Hello = "Hello :)"
  show Bye = "Bye!"
cls :: ReactClass Message
cls = createClass (spec unit renderFn)
  where
    renderFn this = do
      msg <- getProps this
      pure $ div' [ text (show msg) ]
When rendering it PureScript will fail to pattern match on Hello and Bye and will error.
index.js:34228 Uncaught Error: Failed pattern match at Main line 24, column 1 - line 24, column 37: Object
Metadata
Metadata
Assignees
Labels
No labels
