Search Haskell Channel Logs

Wednesday, February 1, 2017

#haskell channel featuring LudvikGalois, ClaudiusMaximus, ph88, glguy, lyxia, lpaste, and 5 others.

LudvikGalois 2017-02-01 06:52:33
does anyone know what "GHC error in desugarer lookup in . Can't find interface-file declaration for variable $tc'(,)" actually means?
LudvikGalois 2017-02-01 06:53:31
is it that it's having an error loading the definition of a tuple for higher kinded tuples?
ph88 2017-02-01 06:57:36
i'm reading this blog https://ocharles.org.uk/blog/posts/2014-04-26-constructing-generically.html when the author does :kind! (Rep Coffee) he gets a lot of M1 when i do the same command on my own type i get a lot of 'MetaData and then when i try to use this GHC says it's a syntax error, what's going on ?
phadej 2017-02-01 06:59:30
different GHC versions
Tuplanolla 2017-02-01 07:00:44
For a moment there I thought you wrote `Rep Cofree` and was quite confused, ph88.
LudvikGalois 2017-02-01 07:00:52
my problem seems to be caused by attempting to generate an instance of Typeable for something with a type variable of kind [(Symbol,Type)]
lyxia 2017-02-01 07:01:03
ph88: The 'MetaData syntax is enabled by the DataKinds extension.
LudvikGalois 2017-02-01 07:02:00
is this something I should be able to do? Is the bug in allowing me to derive Typeable, or is the bug in GHC?
lyxia 2017-02-01 07:02:02
ph88: and this extra metadata in derived representations of generic types was added in GHC 8
lyxia 2017-02-01 07:03:45
LudvikGalois: seems like something you should be able to do.
Tuplanolla 2017-02-01 07:04:41
These days GHC derives `Typeable` for everything automatically, LudvikGalois.
ph88 2017-02-01 07:05:14
lyxia, i added the DataKinds extension and i still get the same error
LudvikGalois 2017-02-01 07:06:54
Tuplanolla: oh, well after removing "deriving Typeable", nothing changes. It type checks, but compilation still fails after that with a GHC panic
ocharles 2017-02-01 07:07:12
ph88: author here, you are witnessing the beautiful progress of GHC
ocharles 2017-02-01 07:07:13
:)
Tuplanolla 2017-02-01 07:07:26
There should never be a panic if GHC is functioning correctly, LudvikGalois.
LudvikGalois 2017-02-01 07:08:19
Tuplanolla: I know, but I'm trying to work out if the bug is from something actually going wrong, or it accidentally accepting nonsense
Tuplanolla 2017-02-01 07:08:48
I can't tell from here.
lpaste 2017-02-01 07:13:23
LudvikGalois pasted "GHC typeable tuple panic" at http://lpaste.net/351899
LudvikGalois 2017-02-01 07:14:31
I'm running GHC 8.0.1. Does it cause a GHC panic for anyone else?
ph88 2017-02-01 07:15:16
ocharles, i thought i could start making functions on the representation and go from there, but if it doesn't compile 'MetaData i will have to find another approach
glguy 2017-02-01 07:15:25
LudvikGalois: That file loads in 8.0.2
LudvikGalois 2017-02-01 07:16:32
glguy: when you run it, is the last line it prints "[5]"?
glguy 2017-02-01 07:17:05
lines of the output: "[5]", "An Object", "[5]"
LudvikGalois 2017-02-01 07:17:23
glguy: thanks, I guess I better go upgrade my GHC
ClaudiusMaximus 2017-02-01 07:18:20
LudvikGalois: yes panics in ghci-8.0.1, loads fine in ghci-8.0.2
reactormonk 2017-02-01 07:18:21
With stack, how can I exec a ghci in test-suite context?
ongy 2017-02-01 07:19:17
I have ghc-8.0.1 and it panics aswell
lyxia 2017-02-01 07:22:41
ph88: What are you trying to do
ph88 2017-02-01 07:23:59
lyxia, use ghc generics to derive pretty printing function on my data types .. this is what i have so far https://paste.fedoraproject.org/542540/59734321/
glguy 2017-02-01 07:35:42
ph88: Why are you trying to manually construct a value of the generic representation of LibraryUnit?
ph88 2017-02-01 07:35:54
for practice
glguy 2017-02-01 07:36:03
practicing what?
ph88 2017-02-01 07:36:06
thought i'd start with something small that works
ph88 2017-02-01 07:36:08
GHC.Generics
ph88 2017-02-01 07:36:17
i'm just following the outline of the blog
glguy 2017-02-01 07:37:52
'MetaData isn't a value, it's a type
glguy 2017-02-01 07:38:00
so you can't use it in this context
ph88 2017-02-01 07:39:49
oh :/
glguy 2017-02-01 07:40:03
For that matter, D1, C1, and S1 are all also types
glguy 2017-02-01 07:40:45
Your definition of "coffee" on line 26 is what you should be trying to emulate, if anything
ph88 2017-02-01 07:42:01
i followed the same procedure as in the blog :kind! (Rep Coffee) and :kind! (Rep LibraryUnit)
glguy 2017-02-01 07:42:48
None of the stuff that :kind! prints is a value
glguy 2017-02-01 07:43:05
It's telling you the kind of Rep Coffee is * -> *
glguy 2017-02-01 07:43:22
and that the type families involved expand out to the 20 line type following the =
ph88 2017-02-01 07:43:52
hmmm