Skip to content

Instantly share code, notes, and snippets.

@spencerjanssen
Created January 22, 2016 16:26
Show Gist options
  • Save spencerjanssen/99c5b064949769008ee9 to your computer and use it in GitHub Desktop.
Save spencerjanssen/99c5b064949769008ee9 to your computer and use it in GitHub Desktop.
Derive Generic for a data type that mentions a type synonym
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