Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,332
    • Issues 4,332
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 363
    • Merge Requests 363
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #385

Closed
Open
Opened May 18, 2005 by nobody@trac-nobody

Kind error has wrong line

With the attached test file (t.hs) I get the following
result:
--------------------------

cptchaos@motion2 ~ $ ghci-6.4 -fglasgow-exts t.hs
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version
6.4, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base-1.0 ... linking ... done.
Compiling Main             ( t.hs, interpreted )

t.hs:4:0:
    Couldn't match kind `* -> *' against `*'
    In the class declaration for `IOMatrixIf'
Failed, modules loaded: none.
Prelude>

------------------------------

but line 4 is correct (it is in fact an example from
the userguide)

-------------------------------------- example file: t.hs
module Main where

class IOMatrixIf (iomat :: * -> *) b where
  iomatrix_new        :: Int -> Int -> IO (iomat b)
   -- ^ creates a matrix with random values ( just mem.
allocation)
  iomatrix_rows       :: (iomat b) -> Int
  iomatrix_cols       :: (iomat b) -> Int
  iomatrix_read_elem  :: (iomat b) -> Int -> Int -> IO b
  iomatrix_write_elem :: (iomat b) -> Int -> Int -> b
-> IO ()


hello = "foo" -- junk code may be some lines


-- here is the kind error 
type IOMatrix matRep = IOMatrixIf matRep b => (IO matRep)
Trac metadata
Trac field Value
Version 6.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedFixed
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#385