Closed emmanueltouzery closed 11 years ago
Are you sharing this type between server and client? Otherwise there is currently no point in having Show instances.
The issue occurs because of RebindableSyntax+Fay.Text.fromString, this seems to solve it but I can't tell you why =o
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, RebindableSyntax #-}
import Fay.Text (Text, fromString)
import qualified Fay.Text as T
import Prelude
data MainAction = Primary T.Text
| Danger T.Text
instance Show MainAction
OK I understand so since we switched to Text this deriving (Show) is a pattern to avoid in Fay programs, and "print" and "show" will anyway work as expected even without implementing the typeclass. I can live with that :-)
I thought maybe you overlooked this..
Thank you!
Show never did anything actually, we might have had the constraint on print
at some point, but that would have been loong ago :)
I didn't manage to get autoderivation of "Show" to work as expected:
This used to work fine when using plain String. How to achieve that with the latest master, if at all possible?