Created
January 22, 2016 16:26
-
-
Save spencerjanssen/99c5b064949769008ee9 to your computer and use it in GitHub Desktop.
Derive Generic for a data type that mentions a type synonym
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Data.Generic | |
type Fields = {x :: String, y :: Int} | |
data WrappedFields = WrappedFields Fields | |
derive instance genericWF :: Generic WrappedFields | |
{- | |
Error message: | |
No type class instance was found for | |
Data.Generic.Generic { y :: Int | |
, x :: String | |
} | |
in value declaration genericWF | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment