Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,250
    • Issues 5,250
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 561
    • Merge requests 561
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #9575
Closed
Open
Issue created Sep 11, 2014 by Herbert Valerio Riedel@hvr🕺Maintainer

-XAutoDeriveTypeable fails to generate instances

The following doesn't compile with GHC 7.8.3, but works with GHC HEAD. I couldn't find a matching ticket, so I don't know if this was fixed knowingly or not...

{-# LANGUAGE AutoDeriveTypeable #-}

import Data.Typeable (Typeable)

data T1 = C1 Int
     deriving (Eq,Ord)

tvoid :: Typeable a => a -> IO ()
tvoid _ = return ()

main :: IO ()
main = tvoid (C1 0)
  1. ..fails for GHC 7.8.3 with
    No instance for (Typeable T1) arising from a use of ‘tvoid’
    In the expression: tvoid (C1 0)
    In an equation for ‘main’: main = tvoid (C1 0)

I'm marking this with high priority, as it makes -XAutoDeriveTypeable unusable on GHC 7.8.3 as it stands.

Trac metadata
Trac field Value
Version 7.8.3
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking