Logs: freenode/#haskell
| 2021-03-19 04:51:33 | × | drbean quits (~drbean@TC210-63-209-13.static.apol.com.tw) (Ping timeout: 264 seconds) |
| 2021-03-19 04:53:07 | × | polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 260 seconds) |
| 2021-03-19 04:55:17 | → | bobweb joins (ac3a17ce@172.58.23.206) |
| 2021-03-19 04:55:20 | × | jrqc quits (~rofl@96.78.87.197) (Ping timeout: 240 seconds) |
| 2021-03-19 04:55:40 | × | forgottenone quits (~forgotten@176.42.16.24) (Quit: Konversation terminated!) |
| 2021-03-19 04:58:30 | → | kashima joins (~sphone@2001:ee0:21c:3e3f:df30:800a:29fa:cd04) |
| 2021-03-19 04:58:38 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-3-8.w83-200.abo.wanadoo.fr) (Read error: Connection reset by peer) |
| 2021-03-19 04:58:55 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-3-8.w83-200.abo.wanadoo.fr) |
| 2021-03-19 04:58:57 | → | jrqc joins (~rofl@96.78.87.197) |
| 2021-03-19 05:00:58 | → | hexfive joins (~hexfive@50.35.83.177) |
| 2021-03-19 05:01:18 | × | dsrt^ quits (dsrt@ip98-184-89-2.mc.at.cox.net) () |
| 2021-03-19 05:02:29 | → | tfl^ joins (tfl@ip98-184-89-2.mc.at.cox.net) |
| 2021-03-19 05:04:12 | × | dramforever quits (~dram@unaffiliated/dramforever) (Quit: Leaving) |
| 2021-03-19 05:04:28 | <emmanuel_erc> | ephemient: Thanks for answering and showing me that thread. |
| 2021-03-19 05:04:46 | <emmanuel_erc> | It seems like the only way to get past this strangeness is to turn off the pattern match checker |
| 2021-03-19 05:04:54 | <emmanuel_erc> | This seems strange...maybe dangerous. |
| 2021-03-19 05:06:01 | <bobweb> | Hi. I have this problem: https://paste.tomsmeding.com/9aXgZdwX Please help me to get my Functor instance to compile. Thank you. |
| 2021-03-19 05:08:42 | <ephemient> | :t +v fmap |
| 2021-03-19 05:08:43 | <lambdabot> | Functor f => (a -> b) -> f a -> f b |
| 2021-03-19 05:08:54 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-03-19 05:09:38 | <ephemient> | hmm was there some way to get lambdabot/eval to explicitly print out the forall.? |
| 2021-03-19 05:09:49 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 2021-03-19 05:10:07 | <bobweb> | Sorry, that came from the ghci capture. |
| 2021-03-19 05:10:41 | <ephemient> | in any case, bobweb. "how do i make the compiler understand that the function f should be (a -> a)" you can't, fmap :: forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b means that it has to work for all types a and b, not restricted to ones that you choose |
| 2021-03-19 05:11:10 | → | zaquest joins (~notzaques@5.128.210.178) |
| 2021-03-19 05:11:40 | <bobweb> | So it's impossible to instantiate Functor for a type (Pair a a) ? |
| 2021-03-19 05:11:57 | <ephemient> | you don't have a type Pair a a, you have a type Pair a |
| 2021-03-19 05:12:06 | <ephemient> | and it is possible, just not in the way you're thinking |
| 2021-03-19 05:12:30 | <bobweb> | Sorry, type (Pair a) yes, data constructor (Pair a a). |
| 2021-03-19 05:12:44 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 2021-03-19 05:13:09 | <bobweb> | OK. Well, I'm a noob. Any suggestions? |
| 2021-03-19 05:13:46 | <ephemient> | I don't know how to give a hint without spoiling the whole thing, and I think it would be more elucidating if you figured it out yourself... |
| 2021-03-19 05:14:11 | <bobweb> | OK. Thanks. |
| 2021-03-19 05:14:21 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds) |
| 2021-03-19 05:14:30 | <ephemient> | but what makes you want to use (f y)? |
| 2021-03-19 05:15:32 | × | kashima quits (~sphone@2001:ee0:21c:3e3f:df30:800a:29fa:cd04) (Read error: Connection reset by peer) |
| 2021-03-19 05:15:36 | <bobweb> | Because the function f has to apply to the last argument to satisfy kindedness |
| 2021-03-19 05:16:27 | × | xff0x quits (~xff0x@2001:1a81:5242:1600:cb36:cbb0:c64a:920) (Ping timeout: 265 seconds) |
| 2021-03-19 05:16:56 | → | xff0x joins (~xff0x@port-92-195-0-54.dynamic.as20676.net) |
| 2021-03-19 05:17:01 | <ephemient> | of the type, but you're working with the values there |
| 2021-03-19 05:18:04 | <ephemient> | it's totally legal to define data Pair a b = Pair b a, for example, and then Functor (Pair a) would have to fmap the *first* (b) part of the constructor |
| 2021-03-19 05:18:29 | <ephemient> | perhaps give Pair (type) and Pair (data constructor) different names and you'll see? |
| 2021-03-19 05:21:20 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 2021-03-19 05:21:21 | <bobweb> | OK, but the exercise gives the data constructor parameters as a a not a b and trying to make them a b gives a variable not in scope error for the b. |
| 2021-03-19 05:22:19 | → | forgottenone joins (~forgotten@176.42.16.24) |
| 2021-03-19 05:24:34 | → | drbean joins (~drbean@TC210-63-209-220.static.apol.com.tw) |
| 2021-03-19 05:25:38 | <ephemient> | Pair b (type) = Pair b b (value) |
| 2021-03-19 05:25:48 | <ephemient> | how would you make that? |
| 2021-03-19 05:25:48 | × | emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer) |
| 2021-03-19 05:25:58 | → | emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) |
| 2021-03-19 05:26:06 | samebchase-5 | is now known as samebchase- |
| 2021-03-19 05:26:28 | <bobweb> | data Pair b = Pair b b |
| 2021-03-19 05:26:55 | <bobweb> | deriving (Eq, Show) |
| 2021-03-19 05:27:31 | → | sm2n_ joins (~sm2n@bras-base-hmtnon143hw-grc-11-65-95-103-225.dsl.bell.ca) |
| 2021-03-19 05:28:03 | <ephemient> | ... my point's not getting across, hmm. |
| 2021-03-19 05:28:10 | × | sm2n quits (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca) (Ping timeout: 260 seconds) |
| 2021-03-19 05:28:19 | <bobweb> | Apologies. |
| 2021-03-19 05:28:32 | <ephemient> | ok, different tack. how would you implement pure :: a -> Pair a? |
| 2021-03-19 05:29:33 | <bobweb> | pure 5 = Pair 5 5 |
| 2021-03-19 05:29:57 | <ephemient> | right, you don't just put it in the last slot... |
| 2021-03-19 05:30:30 | <bobweb> | OK, BRB |
| 2021-03-19 05:30:56 | × | jrqc quits (~rofl@96.78.87.197) (Ping timeout: 240 seconds) |
| 2021-03-19 05:32:35 | <bobweb> | Well, damn. OK, so = Pair (f x) (f y) |
| 2021-03-19 05:32:35 | × | emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer) |
| 2021-03-19 05:32:48 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 246 seconds) |
| 2021-03-19 05:33:04 | → | emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) |
| 2021-03-19 05:33:06 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-03-19 05:33:19 | <bobweb> | so the whole kindednes thing is irrelevant in this case. |
| 2021-03-19 05:34:27 | → | jrqc joins (~rofl@96.78.87.197) |
| 2021-03-19 05:34:51 | <bobweb> | or rather, it's not an issue because Pair a (type) is * -> * |
| 2021-03-19 05:35:16 | × | epicte7us quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer) |
| 2021-03-19 05:35:27 | <ephemient> | a needs to be the last part of Pair :: * -> * (type), but that doesn't mean the same of Pair :: a -> a -> Pair a (value) |
| 2021-03-19 05:37:07 | <bobweb> | Yes. Thank you for relieving my tunnel vision, ephemient: ! |
| 2021-03-19 05:37:42 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
| 2021-03-19 05:41:26 | × | bobweb quits (ac3a17ce@172.58.23.206) (Quit: Connection closed) |
| 2021-03-19 05:44:49 | → | openheimer joins (~death__@unaffiliated/death/x-3645061) |
| 2021-03-19 05:46:23 | → | stree joins (~stree@68.36.8.116) |
| 2021-03-19 05:55:39 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 2021-03-19 05:56:28 | → | Gurkenglas_ joins (~Gurkengla@unaffiliated/gurkenglas) |
| 2021-03-19 05:57:16 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-3-8.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 2021-03-19 05:58:30 | → | Hi-Angel joins (~constanti@broadband-188-32-15-112.ip.moscow.rt.ru) |
| 2021-03-19 05:58:56 | × | jrqc quits (~rofl@96.78.87.197) (Ping timeout: 240 seconds) |
| 2021-03-19 05:59:57 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 265 seconds) |
| 2021-03-19 06:00:36 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 2021-03-19 06:02:02 | → | jrqc joins (~rofl@96.78.87.197) |
| 2021-03-19 06:09:55 | × | openheimer quits (~death__@unaffiliated/death/x-3645061) (Quit: openheimer) |
| 2021-03-19 06:12:33 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 2021-03-19 06:15:33 | → | Sathiana joins (~kath@185-113-98-38.cust.bredband2.com) |
| 2021-03-19 06:21:52 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-03-19 06:26:32 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 2021-03-19 06:30:48 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-19 06:31:18 | → | openheimer joins (~death__@unaffiliated/death/x-3645061) |
| 2021-03-19 06:33:05 | → | knupfer joins (~Thunderbi@200116b82c36b500c400f0a7257bfe8e.dip.versatel-1u1.de) |
| 2021-03-19 06:33:05 | × | emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer) |
| 2021-03-19 06:33:39 | → | emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) |
| 2021-03-19 06:33:55 | × | Forkk quits (forkk@2600:3c00::f03c:91ff:fe84:de4d) (Ping timeout: 240 seconds) |
| 2021-03-19 06:41:14 | → | Forkk joins (forkk@2600:3c00::f03c:91ff:fe84:de4d) |
| 2021-03-19 06:42:25 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 2021-03-19 06:43:45 | → | johannes joins (~johannes@b2b-37-24-119-189.unitymedia.biz) |
| 2021-03-19 06:44:39 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
All times are in UTC.