2024/05/03

Newest at the top

2024-05-03 15:30:14 +0200stiell(~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 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2024-05-03 15:25:06 +0200stiell_(~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 +0200poscat(~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 +0200zetef(~quassel@5.14.202.140) (Remote host closed the connection)
2024-05-03 15:21:32 +0200stiell(~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 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds)
2024-05-03 15:17:44 +0200poscat0x04(~poscat@user/poscat) (Quit: Bye)
2024-05-03 15:17:19 +0200jumper149(~jumper149@base.felixspringer.xyz)
2024-05-03 15:17:06 +0200stiell_(~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 +0200billchenchina(~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 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds)
2024-05-03 15:13:40 +0200Square3(~Square4@user/square) (Ping timeout: 245 seconds)
2024-05-03 15:13:29 +0200bitdex(~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 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2024-05-03 15:11:27 +0200 <onion> > g :: Bool -> () = const ()
2024-05-03 15:11:17 +0200 <onion> ah
2024-05-03 15:10:19 +0200 <lambdabot> in a pattern binding signature
2024-05-03 15:10:19 +0200 <lambdabot> • You cannot bind scoped type variable ‘a’
2024-05-03 15:10:19 +0200 <lambdabot> error:
2024-05-03 15:10:18 +0200 <danse-nr3> > let f :: a -> a = id in f True
2024-05-03 15:10:10 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds)
2024-05-03 15:09:59 +0200 <lambdabot> True
2024-05-03 15:09:58 +0200 <danse-nr3> > let x :: Bool = True in x
2024-05-03 15:09:41 +0200 <danse-nr3> in a let i guess
2024-05-03 15:09:28 +0200 <lambdabot> <hint>:1:11: error: parse error on input ‘=’
2024-05-03 15:09:27 +0200 <danse-nr3> > x :: Bool = True
2024-05-03 15:09:02 +0200 <lambdabot> <hint>:1:13: error: parse error on input ‘=’
2024-05-03 15:09:00 +0200 <danse-nr3> > f :: a -> a = id