Skip to content

GitLab

  • Menu
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 4,868
    • Issues 4,868
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 456
    • Merge requests 456
  • 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 Compiler
  • GHCGHC
  • Issues
  • #70
Closed
Open
Created May 29, 2002 by nobody@trac-nobody

Read for Arrays does not work

In hugs I can go:

Array> read (show (array (1,1) [(1,42)])) :: Array Int Int
array (1,1) [(1,42)]

whereas ghc gives me:

Main> read (show (array (1,1) [(1,42)])) :: Array Int Int

<interactive>:1:
    No instance for (Read (Array Int Int))
    arising from use of `read' at <interactive>:1
    In an expression with a type signature:
        read (show (array (1, 1) [(1, 42)])) :: Array
Int Int
    In the definition of `it':
        read (show (array (1, 1) [(1, 42)])) :: Array
Int Int


The Haskell Library Report 98 says Read should be defined
for Array a b, with (Read a, Ix a, Read b)
Trac metadata
Trac field Value
Version 5.02
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedFixed
Component hslibs/lang
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