|
RE: labeled field update kind-error in ghc 6.4.20050215: msg#00082lang.haskell.glasgow.bugs
Excellent bug, thank you. This one has been lurkng for a long time (it's wrong in 6.2 too) but some recent changes made it surface. Easily fixed. Simon | -----Original Message----- | From: glasgow-haskell-bugs-bounces@xxxxxxxxxxx [mailto:glasgow-haskell-bugs- | bounces@xxxxxxxxxxx] On Behalf Of Remi Turk | Sent: 26 February 2005 15:48 | To: glasgow-haskell-bugs@xxxxxxxxxxx | Subject: labeled field update kind-error in ghc 6.4.20050215 | | Hello again, | | while trying to get HashTable to work both in IO and in ST I | hit the following probable bug in 6.4.20050215. | 6.2.1 does accept it, and the #ifdeffed-out version works in | both. When the typesignature is removed 6.4 does accept it. | | Cheers, | Remi | | {-# OPTIONS -cpp -fglasgow-exts #-} | module Foo where | | data HT (ref :: * -> *) | = HT { kcount :: Int } | | #if 1 | set_kcount :: Int -> HT ref -> HT ref | #endif | | #if 1 | set_kcount kc ht = ht{kcount=kc} | #else | set_kcount kcount (HT _) = (HT kcount) | #endif | | | foo.hs:12:19: | Couldn't match kind `*' against `* -> *' | When matching the kinds of `t :: *' and `ref :: * -> *' | Expected type: HT t | Inferred type: HT ref | In the record update: ht {kcount = kc} | Failed, modules loaded: none. | | -- | Nobody can be exactly like me. Even I have trouble doing it. | _______________________________________________ | Glasgow-haskell-bugs mailing list | Glasgow-haskell-bugs@xxxxxxxxxxx | http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | 6.4.20050215 inferred types incorrect, Remi Turk |
|---|---|
| Next by Date: | RE: 6.4.20050215: panic: lookupVers1 MHashTable HT{d}, Simon Peyton-Jones |
| Previous by Thread: | labeled field update kind-error in ghc 6.4.20050215, Remi Turk |
| Next by Thread: | 6.4.20050215: panic: lookupVers1 MHashTable HT{d}, Remi Turk |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |