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,242
    • Issues 5,242
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 566
    • Merge requests 566
  • 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
  • #102
Closed
Open
Issue created Dec 05, 2002 by alar@trac-alar

can't declare instance for type synonim

Trying to load into GHCi simple program (in attached 
file) I receive error stating I can declare class instances 
only for types defined using "data". I beleive it is a bug 
because Hugs handles this situation normally.
Error message:
/igor/tst.hs:1:
    No instance for `Eq (Stack -> Stack)'
    When deriving the `Eq' instance for type `Object'

/igor/tst.hs:1:
    No instance for `Show (Stack -> Stack)'
    When deriving the `Show' instance for type `Object'

/igor/tst.hs:4:
    Illegal instance declaration for `Eq Operator'
        (The instance type must be of form (T a b c)
         where T is not a synonym, and a,b,c are distinct 
type variables)
    In the instance declaration for `Eq Operator'

/igor/tst.hs:6:
    Illegal instance declaration for `Show Operator'
        (The instance type must be of form (T a b c)
         where T is not a synonym, and a,b,c are distinct 
type variables)
    In the instance declaration for `Show Operator'
Trac metadata
Trac field Value
Version None
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedRejected
Component Compiler (Type checker)
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