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,261
    • Issues 5,261
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 567
    • Merge requests 567
  • 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
  • #316
Closed
Open
Issue created Mar 04, 2005 by Simon Marlow@simonmarDeveloper

GHCi: No instance for (Show (IO ()))

From Wolfgang Thaller:

This behaviour (from today's stable branch) is slightly
confusing:

> Prelude> print id
>
> Top level:
>     No instance for (Show (IO ()))
>       arising from use of `print' at Top level
>     Probable fix: add an instance declaration for
(Show (IO ()))
>     In a 'do' expression: print it
>
> <interactive>:1:0:
>     No instance for (Show (a -> a))
>       arising from use of `print' at <interactive>:1:0-4
>     Probable fix: add an instance declaration for
(Show (a -> a))
>     In the definition of `it': it = print id

The second message makes sense, but the first one
doesn't. Also, what's 
the difference between "Top level" and "<interactive>:1:0"?

Trac metadata
Trac field Value
Version 6.4
Type Bug
TypeOfFailure OtherFailure
Priority low
Resolution ResolvedFixed
Component GHCi
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