Newest at the top
2024-05-03 15:36:52 +0200 | <onion> | hmm.. |
2024-05-03 15:36:46 +0200 | <lambdabot> | 8 |
2024-05-03 15:36:45 +0200 | <onion> | > let id' (f :: a -> a) (x :: Int) = f x :: a in id' succ 7 |
2024-05-03 15:36:36 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 15:36:27 +0200 | <lambdabot> | 7 |
2024-05-03 15:36:26 +0200 | <onion> | > let id' (f :: a -> a) (x :: a) = f x :: a in id' id 7 |
2024-05-03 15:36:15 +0200 | <onion> | oops |
2024-05-03 15:35:45 +0200 | <lambdabot> | a |
2024-05-03 15:35:43 +0200 | <onion> | > let id' (f :: a -> a) (x :: a) = f a :: a in id' id 7 |
2024-05-03 15:35:37 +0200 | onion | (~yin@user/zero) |
2024-05-03 15:34:54 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 15:33:15 +0200 | onion | (~yin@user/zero) (Ping timeout: 245 seconds) |
2024-05-03 15:31:47 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 15:31:21 +0200 | tv | (~tv@user/tv) (Ping timeout: 255 seconds) |
2024-05-03 15:30:14 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 15:29:03 +0200 | <lambdabot> | (7,False,"ok") |
2024-05-03 15:29:01 +0200 | <onion> | > let f (a :: Int) (b :: Bool) (c :: a) = (a,b,c) :: (Int,Bool,a) in f 7 False "ok" |
2024-05-03 15:27:50 +0200 | <onion> | i just found out i can write this: |
2024-05-03 15:26:26 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 15:25:06 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 15:24:10 +0200 | <onion> | thanks ncf |
2024-05-03 15:23:57 +0200 | <ncf> | this explains why a -> a doesn't work, but not why forall a. a -> a doesn't |
2024-05-03 15:23:55 +0200 | poscat | (~poscat@user/poscat) |
2024-05-03 15:23:46 +0200 | <ncf> | https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/scoped_type_variables.html#pattern-type-sigs |
2024-05-03 15:23:10 +0200 | zetef | (~quassel@5.14.202.140) (Remote host closed the connection) |
2024-05-03 15:21:32 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 15:21:11 +0200 | <danse-nr3> | i don't think the forall helps, but i am not sure why just `a` would not work |
2024-05-03 15:20:29 +0200 | <lambdabot> | with actual type ‘a0 -> a0’ |
2024-05-03 15:20:29 +0200 | <lambdabot> | • Couldn't match expected type ‘forall a1. a1 -> a1’ |
2024-05-03 15:20:29 +0200 | <lambdabot> | error: |
2024-05-03 15:20:27 +0200 | <onion> | > let q :: forall a. a -> a = id in q 7 |
2024-05-03 15:19:58 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 15:17:44 +0200 | poscat0x04 | (~poscat@user/poscat) (Quit: Bye) |
2024-05-03 15:17:19 +0200 | jumper149 | (~jumper149@base.felixspringer.xyz) |
2024-05-03 15:17:06 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 15:17:01 +0200 | <lambdabot> | () |
2024-05-03 15:17:00 +0200 | <onion> | > let g :: Bool -> () = const () in g True |
2024-05-03 15:16:22 +0200 | <onion> | hm... |
2024-05-03 15:16:18 +0200 | <lambdabot> | <hint>:1:23: error: parse error on input ‘=’ |
2024-05-03 15:16:17 +0200 | <onion> | > f :: forall a. a -> a = id |
2024-05-03 15:16:11 +0200 | <onion> | f :: forall a. a -> a = id |
2024-05-03 15:16:07 +0200 | billchenchina | (~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe) (Quit: Leaving) |
2024-05-03 15:15:52 +0200 | <lambdabot> | a -> a |
2024-05-03 15:15:51 +0200 | <onion> | :t id |
2024-05-03 15:14:50 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 15:13:40 +0200 | Square3 | (~Square4@user/square) (Ping timeout: 245 seconds) |
2024-05-03 15:13:29 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2024-05-03 15:11:50 +0200 | <onion> | wait, i can do this in ghci |
2024-05-03 15:11:29 +0200 | <lambdabot> | <hint>:1:17: error: parse error on input ‘=’ |
2024-05-03 15:11:29 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |