|
[ ghc-Bugs-1204512 ] Kind error has wrong line: msg#00082lang.haskell.glasgow.bugs
Bugs item #1204512, was opened at 2005-05-18 19:51 Message generated for change (Comment added) made by simonpj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1204512&group_id=8032 Category: Compiler (Type checker) Group: 6.4 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Kind error has wrong line Initial Comment: 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) ---------------------------------------------------------------------- >Comment By: Simon Peyton Jones (simonpj) Date: 2005-05-19 08:04 Message: Logged In: YES user_id=50165 Quite right, and happily already fixed ready for 6.4.1 Foo.hs:18:50: Kind error: `matRep' is not applied to enough type arguments In the type synonym declaration for `IOMatrix' cam-02-unx:~/tmp$ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1204512&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1194808 ] Template panics the compiler, SourceForge.net |
|---|---|
| Next by Date: | [ ghc-Bugs-1200592 ] GHC fails to pass dictionary in a rank-2 situation., SourceForge.net |
| Previous by Thread: | [ ghc-Bugs-1204512 ] Kind error has wrong line, SourceForge.net |
| Next by Thread: | [ ghc-Bugs-1205210 ] :i wrongly claims "Imported from ...", SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |