2025/12/12

Newest at the top

2025-12-12 18:19:13 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-12-12 18:18:51 +0100sindu(~sindu@2.148.32.207.tmi.telenormobil.no)
2025-12-12 18:14:50 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Ping timeout: 244 seconds)
2025-12-12 18:14:07 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2025-12-12 18:14:07 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-12 18:12:48 +0100acidjnk(~acidjnk@p200300d6e717190330ae5c7be13b8759.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2025-12-12 18:12:41 +0100 <ski> (but there are contexts in which tyvars are not implicitly `forall'-quantified, like when the tyvar is already in scope outside of the signature)
2025-12-12 18:12:00 +0100 <ski> Enrico63 : for the most part, yes
2025-12-12 18:11:47 +0100 <ski> if you'd represent type class instances using "dictionaries"/"vtables" (records of methods), then `Eq a' (as above) would be represented as `data EqDict a = MkEqDict {(==) :: a -> a -> Bool}', while for the `Functor' case we'd get `data FunctorDict f = MkFunctorDict {fmap :: forall a b. (a -> b) -> f a -> f b}', where the component/field here is polymorphic, so that the `MkFunctorDict' has a rank-1 type
2025-12-12 18:11:24 +0100 <Enrico63> When I wrote `(forall a. a -> a) -> b` [...] the same as `forall b. (forall a. a -> a) -> b` , I think I was assuming a leading `::`, i.e. that that was the whole signature. Is that what makes the difference?
2025-12-12 18:08:47 +0100 <ski> (so, that's a "polymorphic method" example)
2025-12-12 18:08:28 +0100 <ski> so, in `class Eq a where (==) :: a -> a -> Bool', the `(==)' method here is *not* polymorphic, it is monomorphic in the specific `a' being an instance of `Eq' that we're talking about. otoh, in `class Functor f where fmap :: (a -> b) -> f a -> f b', the signature here *is* interpreted as `fmap :: forall a b. (a -> b) -> f a -> f b' (so polymorphic in `a' and `b', but not in `f')
2025-12-12 18:05:43 +0100 <ski> (exceptions being method signatures in `class' (and `instance') declarations, which have the type variables in the head of the declaration free; field/component signatures in record notation for data types; also local signatures (e.g. with `where' or `let'-`in') if you have non local tyvars in scope, using `ScopedTypeVariables')
2025-12-12 18:03:55 +0100__monty__(~toonn@user/toonn) (Ping timeout: 240 seconds)
2025-12-12 18:03:33 +0100 <mauke> if it was, then [a] -> Integer would be the same as ([a] -> Int)eger
2025-12-12 18:03:19 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 250 seconds)
2025-12-12 18:03:18 +0100 <ski> Enrico63 : in *most* (but not all) circumstances, `foo :: ..a..' is interpreted as `foo :: forall a. ..a..'
2025-12-12 18:03:16 +0100 <mauke> similarly, [a] -> Int is not the same as ([a] -> Int)
2025-12-12 18:02:25 +0100 <ski> Enrico63 : if it was, then `Eq a => a -> ([a] -> [a]) -> [a] -> [[a]]' would be the same as `Eq a => a -> (forall a. [a] -> [a]) -> [a] -> [[a]]', which is obviously nonsense
2025-12-12 18:01:07 +0100 <ski> Enrico63 : `[a] -> [a]' is not the same as `forall a. [a] -> [a]'
2025-12-12 18:00:12 +0100trickard_trickard
2025-12-12 17:58:21 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-12 17:53:37 +0100__monty__(~toonn@user/toonn) toonn
2025-12-12 17:50:54 +0100 <kuribas> Yes, except for scoped type variables.
2025-12-12 17:49:06 +0100 <EvanR> using implicit forall it seems so
2025-12-12 17:49:00 +0100 <EvanR> is (forall a . a -> a) -> b the same as forall b . (forall a . a -> a) -> b
2025-12-12 17:48:38 +0100 <Enrico63> ski , blinks?
2025-12-12 17:48:09 +0100Enrico63(~Enrico63@host-95-251-99-143.retail.telecomitalia.it) Enrico63
2025-12-12 17:47:21 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-12-12 17:42:33 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-12 17:39:33 +0100skiblinks
2025-12-12 17:34:26 +0100chexum(~quassel@gateway/tor-sasl/chexum) chexum
2025-12-12 17:31:35 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-12 17:30:49 +0100__monty__(~toonn@user/toonn) (Ping timeout: 250 seconds)
2025-12-12 17:27:23 +0100Enrico63(~Enrico63@host-95-251-99-143.retail.telecomitalia.it) (Quit: Client closed)
2025-12-12 17:26:45 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-12 17:20:47 +0100 <Enrico63> ski, why?
2025-12-12 17:16:17 +0100 <ski> Enrico63 : "Well, that's the same as `forall b. (forall a. a -> a) -> b`" -- no
2025-12-12 17:15:36 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-12-12 17:10:43 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-12 17:05:21 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) kuribas
2025-12-12 17:03:36 +0100pebble(~pebble@37.63.32.91) pebble
2025-12-12 17:00:46 +0100skum(~skum@user/skum) skum
2025-12-12 16:59:35 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-12 16:55:00 +0100trickard_(~trickard@cpe-83-98-47-163.wireline.com.au)
2025-12-12 16:54:56 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-12 16:54:47 +0100trickard_(~trickard@cpe-83-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-12-12 16:54:04 +0100lucabtz(~lucabtz@user/lucabtz) (Quit: Lost terminal)
2025-12-12 16:52:07 +0100Enrico63(~Enrico63@host-95-251-99-143.retail.telecomitalia.it) Enrico63
2025-12-12 16:50:38 +0100deptype(~deptype@2406:b400:3a:9d2f:c928:dba3:487d:1bc)