ghc 7.2.1 Generics problem

Hi, I do not know why, my ghc 7.2.1 does not seem to support DeriveRepresentable. I compiled the ghc 7.2.1 myself by ghc 7.0.4. All options default. $ ghc Types/TopTalkerRecord.hs Types/TopTalkerRecord.hs:2:14: Unsupported extension: DeriveRepresentable $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.2.1 -- 竹密岂妨流水过 山高哪阻野云飞

On 1 November 2011 16:07, Magicloud Magiclouds
Hi, I do not know why, my ghc 7.2.1 does not seem to support DeriveRepresentable. I compiled the ghc 7.2.1 myself by ghc 7.0.4. All options default.
$ ghc Types/TopTalkerRecord.hs
Types/TopTalkerRecord.hs:2:14: Unsupported extension: DeriveRepresentable
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.2.1
All I can find about DeriveRepresentable is a patch submitted in April [1]. However, it seems [2] that it has been renamed to DeriveGenerics [1]: http://www.haskell.org/pipermail/cvs-ghc/2011-April/061666.html [2]: http://code.galois.com/cgi-bin/gitweb?p=type-naturals/base.git;a=commitdiff;... -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Hi.
I do not know why, my ghc 7.2.1 does not seem to support DeriveRepresentable. I compiled the ghc 7.2.1 myself by ghc 7.0.4. All options default.
$ ghc Types/TopTalkerRecord.hs
Types/TopTalkerRecord.hs:2:14: Unsupported extension: DeriveRepresentable
There's no extension of that name in 7.2.1. Do you mean DeriveGeneric? Cheers, Andres

On Tue, Nov 1, 2011 at 1:59 PM, Andres Löh
Hi.
I do not know why, my ghc 7.2.1 does not seem to support DeriveRepresentable. I compiled the ghc 7.2.1 myself by ghc 7.0.4. All options default.
$ ghc Types/TopTalkerRecord.hs
Types/TopTalkerRecord.hs:2:14: Unsupported extension: DeriveRepresentable
There's no extension of that name in 7.2.1. Do you mean DeriveGeneric?
Cheers, Andres
I do not know. I will try that. I got the name from http://www.haskell.org/haskellwiki/Generics. -- 竹密岂妨流水过 山高哪阻野云飞

Oh, right, I see that some things on that page need updating; I'll do so. Thanks, Pedro On Tue, Nov 1, 2011 at 09:33, Magicloud Magiclouds < magicloud.magiclouds@gmail.com> wrote:
On Tue, Nov 1, 2011 at 1:59 PM, Andres Löh
wrote: Hi.
I do not know why, my ghc 7.2.1 does not seem to support DeriveRepresentable. I compiled the ghc 7.2.1 myself by ghc 7.0.4. All options default.
$ ghc Types/TopTalkerRecord.hs
Types/TopTalkerRecord.hs:2:14: Unsupported extension: DeriveRepresentable
There's no extension of that name in 7.2.1. Do you mean DeriveGeneric?
Cheers, Andres
I do not know. I will try that. I got the name from http://www.haskell.org/haskellwiki/Generics.
-- 竹密岂妨流水过 山高哪阻野云飞
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

2011/11/1 José Pedro Magalhães
Oh, right, I see that some things on that page need updating; I'll do so.
Thanks, Pedro
On Tue, Nov 1, 2011 at 09:33, Magicloud Magiclouds
wrote: On Tue, Nov 1, 2011 at 1:59 PM, Andres Löh
wrote: Hi.
I do not know why, my ghc 7.2.1 does not seem to support DeriveRepresentable. I compiled the ghc 7.2.1 myself by ghc 7.0.4. All options default.
$ ghc Types/TopTalkerRecord.hs
Types/TopTalkerRecord.hs:2:14: Unsupported extension: DeriveRepresentable
There's no extension of that name in 7.2.1. Do you mean DeriveGeneric?
Cheers, Andres
I do not know. I will try that. I got the name from http://www.haskell.org/haskellwiki/Generics.
-- 竹密岂妨流水过 山高哪阻野云飞
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Thank you. I saw the page was updated. So I followed the document. And got stuck again. Copying the code and compile, I got: 25instance (GSerialize a) => GSerialize (M1 i a) where 26 gput (M1 x) = gput x test.hs:25:40: `M1 i a' is not applied to enough type arguments The first argument of `GSerialize' should have kind `* -> *', but `M1 i a' has kind `(* -> *) -> * -> *' In the instance declaration for `GSerialize (M1 i a)' -- 竹密岂妨流水过 山高哪阻野云飞

Thanks, you spotted another mistake on that page, I corrected it.
Make sure to have a look at the functions in
http://hackage.haskell.org/package/generic-deriving too; I'm sure those
compile :-)
Pedro
2011/11/3 Magicloud Magiclouds
2011/11/1 José Pedro Magalhães
: Oh, right, I see that some things on that page need updating; I'll do so.
Thanks, Pedro
On Tue, Nov 1, 2011 at 09:33, Magicloud Magiclouds
wrote: On Tue, Nov 1, 2011 at 1:59 PM, Andres Löh
wrote: Hi.
I do not know why, my ghc 7.2.1 does not seem to support DeriveRepresentable. I compiled the ghc 7.2.1 myself by ghc 7.0.4.
All
options default.
$ ghc Types/TopTalkerRecord.hs
Types/TopTalkerRecord.hs:2:14: Unsupported extension: DeriveRepresentable
There's no extension of that name in 7.2.1. Do you mean DeriveGeneric?
Cheers, Andres
I do not know. I will try that. I got the name from http://www.haskell.org/haskellwiki/Generics.
-- 竹密岂妨流水过 山高哪阻野云飞
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Thank you. I saw the page was updated. So I followed the document. And got stuck again.
Copying the code and compile, I got:
25instance (GSerialize a) => GSerialize (M1 i a) where 26 gput (M1 x) = gput x
test.hs:25:40: `M1 i a' is not applied to enough type arguments The first argument of `GSerialize' should have kind `* -> *', but `M1 i a' has kind `(* -> *) -> * -> *' In the instance declaration for `GSerialize (M1 i a)'
-- 竹密岂妨流水过 山高哪阻野云飞
participants (4)
-
Andres Löh
-
Ivan Lazar Miljenovic
-
José Pedro Magalhães
-
Magicloud Magiclouds