Search Haskell Channel Logs

Thursday, February 2, 2017

#haskell channel featuring ertes, erisco, Lokathor, mniip, Ptival, halogenandtoast,

erisco 2017-02-02 16:45:22
Ptival, that is correct, aliases must always be fully applied
erisco 2017-02-02 16:45:38
had a long discussion about that and I unfortunately forget the conclusions :P
erisco 2017-02-02 16:45:55
I think the problems came out with polymorphic recursion and one other spot
erisco 2017-02-02 16:47:00
it seems that most of us have just taken the fact for granted
Ptival 2017-02-02 16:47:56
erisco: yeah, from what I see, it's just disallowed to avoid higher-order-unification issues
Ptival 2017-02-02 16:48:05
wondering whether there is a known trick for this
erisco 2017-02-02 16:48:19
well you can use a newtype... that is the standard thing
Ptival 2017-02-02 16:48:20
I guess I can make two type ConvertFromTo a b and ConvertToFrom b a
erisco 2017-02-02 16:48:54
there is likely a Flip :: (* -> * -> *) -> * -> * -> * defined somewhere
erisco 2017-02-02 16:49:40
or I guess we can polykind it up
mniip 2017-02-02 16:49:58
that would need to be either a newtype or a fully applied tysyn
Ptival 2017-02-02 16:50:01
looks like in Bifunctors
Lokathor 2017-02-02 16:50:39
erisco, i fixed it!
erisco 2017-02-02 16:52:13
Lokathor, now you can relax and make a cup of coffee :)
erisco 2017-02-02 16:53:18
sometimes the solution to a bug is so bad you can only recover by spending time in the fetal position
Lokathor 2017-02-02 16:55:19
it's not a bug exactly
Lokathor 2017-02-02 16:55:25
i mean GHC was doing exactly what it said it would do
Lokathor 2017-02-02 16:55:33
i was jsut asking the wrong thing of it
erisco 2017-02-02 17:03:21
given a singleton type how do you get its term?
erisco 2017-02-02 17:03:28
obviously there should be a type class for this
erisco 2017-02-02 17:04:25
I think it is called sing :D
Lokathor 2017-02-02 17:06:27
sing :: Aria
Lokathor 2017-02-02 17:06:40
sing :: Ska
erisco 2017-02-02 17:14:34
thank-you unwords for making Show instances a little easier to write
halogenandtoast 2017-02-02 17:19:06
ertes: I read up on Boolean blindness, I think different people think it's different things. I thought this was an interesting article about it: https://cs-syd.eu/posts/2016-07-24-overcoming-boolean-blindness-evidence.html
halogenandtoast 2017-02-02 17:19:20
and I think this kind of thing was what you were alluding to.
ertes 2017-02-02 17:22:11
halogenandtoast: partially… i disagree with renaming Bool
ertes 2017-02-02 17:24:08
whether you call it "Bool" or "Cheeseburger" doesn't really matter… in fact Cheeseburger is really just a less convenient version of Bool, because you need to write an entirely new API around it
halogenandtoast 2017-02-02 17:25:38
ertes: sure but I assumed that maybe you meant I needed to provide more information about a story
halogenandtoast 2017-02-02 17:25:49
being fetched or unfetched
halogenandtoast 2017-02-02 17:26:03
rather than asking it if it was fetched or not
ertes 2017-02-02 17:26:27
halogenandtoast: remember that i don't know whether your code really suffers from it at all
halogenandtoast 2017-02-02 17:26:55
Sure, but I was trying to understand the impetus for you mentioning it at all.
halogenandtoast 2017-02-02 17:27:05
You pretty much saw all of the code in my application
ertes 2017-02-02 17:31:57
halogenandtoast: style note: _c >>= maybe _n _j
halogenandtoast 2017-02-02 17:32:44
ertes: oh nice
halogenandtoast 2017-02-02 17:32:55
I like that better as well, but not sure why
halogenandtoast 2017-02-02 17:33:03
what is the "theme" that drives that
ertes 2017-02-02 17:33:26
it avoids a short-lived name and exposes the data flow directly… that's why you like it =)
erisco 2017-02-02 17:34:04
WHAT WAS THE ORIGINAL?
ertes 2017-02-02 17:35:55
revisiting your code my issue, as far as i understand your code, may be that a 'story' is not necessarily a "story"
ertes 2017-02-02 17:36:54
in my idea of well-designed code there is never any doubt as to what a piece of data is, whenever its type is fully known
ertes 2017-02-02 17:37:19
in other words a Story is a story, period… there is no such thing as a "story that still needs to be fetched"… that thing should have a different type
erisco 2017-02-02 17:43:34
I like to say what data is by the functions I define on it
erisco 2017-02-02 17:43:54
rather than saying data ought to be this or that