| LoganCapaldo | > (\f g x -> f x (g x)) (+) (+ 1) 4 |
| lambdabot | 9 |
| Saizan | ?type ap |
| lambdabot | forall (m :: * -> *) a b. (Monad m) => m (a -> b) -> m a -> m b |
| shoffsta | glguy: I don't know |
| LoganCapaldo | > (\f g x -> f x (g x)) (,) id 2 |
| lambdabot | (2,2) |
| Saizan | LoganCapaldo: (r -> (a -> b)) -> (r -> a) -> r -> b <-- ap in the (r (->)) monad |
| LoganCapaldo | Saizan: I know |
| Saizan | oh ok |
| LoganCapaldo | > ap (,) id 2 |
| lambdabot | (2,2) |
| TantumLex | is it possible to have lambdabot expressions that normally would go on multiple lines? > 2 + x where x = 2 |
| lambdabot | Parse error |
| Heffalump | TantumLex: that's not a valid expression where applies to declarations, not expressions > let y = 2 + x where x = 2 in y |
| lambdabot | 4 |
| TantumLex | > let y = 2 + x + z where x = 2; z = 3 in y |
| lambdabot | 7 |
| TantumLex | nice |
| cinimod | dcoutts_: the binary stuff is done in TLV.hs |
| dcoutts_ | cinimod: yes, It looks deceptively simple :-) |
| LoganCapaldo | @type ap (flip (.)) (+) (const 3) |
| lambdabot | Occurs check: cannot construct the infinite type: b = a -> b Probable cause: `+' is applied to too few arguments |
| cinimod | dcoutts_: But then you have to typecheck it to make sure it conforms to the ASN.1 spec |
| TantumLex | @pl f x = y + x |
| lambdabot | f = (y +) |
| cinimod | dcoutts_: All TLV does is turn it into tag length and value |
| dcoutts_ | cinimod: right, but by that time it's no longer in binary format. |
| dmhouse | Hey all. If you do hGetLine h >> hGetLine h, the two calls probably won't return the same string. Where is this difference in state represented? It can't be h as by referential transparency h has the same value in both calls, so perhaps in a global mutvar or something? |
| TantumLex | @pl f x = y + x where y = 2 |
| lambdabot | (line 1, column 21): unexpected "=" expecting variable, "(", operator, "+", "-" or end of input |
| TantumLex | boo |
| cinimod | dcoutts_: unfortunately it uses the unfortunately named newbinary |
| mauke | dmhouse: why does it need to be represented? |