Comments on: Clearer Reflections http://comonad.com/reader/2009/clearer-reflection/ types, (co)monads, substructural logic Sat, 29 Dec 2012 15:18:06 -0800 http://wordpress.org/?v=2.8.4 hourly 1 By: Edward Kmett http://comonad.com/reader/2009/clearer-reflection/comment-page-1/#comment-11224 Edward Kmett Sun, 23 Aug 2009 13:39:18 +0000 http://comonad.com/reader/?p=93#comment-11224 @Sjoerd: The problem with that is that Monoid isn't the only kind of thing we might want to reify into a type so we can reflect it as a dictionary. If any other type had the same dictionary shape, and you took that approach then you could very easily conflate instances. If the reflection library wanted to concern itself with every type class in Haskell, that would work fine, but otherwise, you would be stuck with orphan instances. ;) @Sjoerd:

The problem with that is that Monoid isn’t the only kind of thing we might want to reify into a type so we can reflect it as a dictionary.

If any other type had the same dictionary shape, and you took that approach then you could very easily conflate instances.

If the reflection library wanted to concern itself with every type class in Haskell, that would work fine, but otherwise, you would be stuck with orphan instances. ;)

]]>
By: Sjoerd Visscher http://comonad.com/reader/2009/clearer-reflection/comment-page-1/#comment-11212 Sjoerd Visscher Sun, 23 Aug 2009 00:54:01 +0000 http://comonad.com/reader/?p=93#comment-11212 Is there a reason not to make a Monoid instance of Tagged, skipping M and monoidTag and tagMonoid? Is there a reason not to make a Monoid instance of Tagged, skipping M and monoidTag and tagMonoid?

]]>
By: Edward Kmett http://comonad.com/reader/2009/clearer-reflection/comment-page-1/#comment-11060 Edward Kmett Sat, 15 Aug 2009 17:17:14 +0000 http://comonad.com/reader/?p=93#comment-11060 @Cale: Yeah, it seems to be a bug in the package I'm using for syntax highlighting. =/ I swapped it out like 3 times, and eventually just moved on. If you have a suggestion for a good WordPress syntax highlighter that does Haskell, I'm all ears. @Cale:

Yeah, it seems to be a bug in the package I’m using for syntax highlighting. =/ I swapped it out like 3 times, and eventually just moved on. If you have a suggestion for a good WordPress syntax highlighter that does Haskell, I’m all ears.

]]>
By: Cale http://comonad.com/reader/2009/clearer-reflection/comment-page-1/#comment-11059 Cale Sat, 15 Aug 2009 16:24:57 +0000 http://comonad.com/reader/?p=93#comment-11059 Haha, and then the example I copied into my comment was deleted from the comment entirely. Let's try... < *> I'm always amazed at how badly blog software manages to screw up text processing. Haha, and then the example I copied into my comment was deleted from the comment entirely.

Let’s try… < *>

I’m always amazed at how badly blog software manages to screw up text processing.

]]>
By: Cale http://comonad.com/reader/2009/clearer-reflection/comment-page-1/#comment-11058 Cale Sat, 15 Aug 2009 16:20:15 +0000 http://comonad.com/reader/?p=93#comment-11058 Somehow spurious extra spaces are getting inserted into your code... Perhaps a bug in whatever script is responsible for converting characters to HTML character codes? Somehow spurious extra spaces are getting inserted into your code…

Perhaps a bug in whatever script is responsible for converting characters to HTML character codes?

]]>
By: Edward Kmett http://comonad.com/reader/2009/clearer-reflection/comment-page-1/#comment-11056 Edward Kmett Sat, 15 Aug 2009 14:41:20 +0000 http://comonad.com/reader/?p=93#comment-11056 @Sebastian: Actually, I went through and tried to minimize the number of language extensions the package required. Two of the ones I eliminated were EmptyDataDecls and KindSignatures, since you can define a 'bottom only' datatype with a newtype wrapper, and you can perform some shenanigans to avoid the kind signatures once it is a newtype. However, when you don't use the newtype's constructor anywhere, -Wall gives you a warning. Rather than have the module spit out 8-9 warnings, I wrote the Unused typeclass to give a single reference to each constructor and to silence the compiler. @Sebastian:

Actually, I went through and tried to minimize the number of language extensions the package required. Two of the ones I eliminated were EmptyDataDecls and KindSignatures, since you can define a ‘bottom only’ datatype with a newtype wrapper, and you can perform some shenanigans to avoid the kind signatures once it is a newtype.

However, when you don’t use the newtype’s constructor anywhere, -Wall gives you a warning. Rather than have the module spit out 8-9 warnings, I wrote the Unused typeclass to give a single reference to each constructor and to silence the compiler.

]]>
By: Sebastian http://comonad.com/reader/2009/clearer-reflection/comment-page-1/#comment-11055 Sebastian Sat, 15 Aug 2009 14:26:18 +0000 http://comonad.com/reader/?p=93#comment-11055 Is the `Unused` typeclass defined in version 0.2.0 of the reflection package a pun? It seems, like the name suggests, neither used nor exported. Is the `Unused` typeclass defined in version 0.2.0 of the reflection package a pun? It seems, like the name suggests, neither used nor exported.

]]>