Skip to content

Instantly share code, notes, and snippets.

@ashutosh2411
Last active January 29, 2019 15:13
Show Gist options
  • Save ashutosh2411/46f435ceece6bdaa9f9836eae660d99c to your computer and use it in GitHub Desktop.
Save ashutosh2411/46f435ceece6bdaa9f9836eae660d99c to your computer and use it in GitHub Desktop.

Code:

data Tree a = EmptyTree | Node (Tree a) a (Tree a) deriving (Show, Typeable, Data)

Error:

    • Can't make a derived instance of ‘Data (Tree a)’:
        You need DeriveDataTypeable to derive an instance for this class
    • In the data declaration for ‘Tree’
import Data.DeriveDataTypeable 

error:

    Could not find module ‘Data.DeriveDataTypeable’
    It is not a module in the current program, or in any known package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment