#haskell - Tue 8 May 2007 between 18:35 and 18:45



LoganCapaldo> (\f g x -> f x (g x)) (+) (+ 1) 4
lambdabot9
Saizan?type ap
lambdabotforall (m :: * -> *) a b. (Monad m) => m (a -> b) -> m a -> m b
shoffstaglguy: I don't know
LoganCapaldo> (\f g x -> f x (g x)) (,) id 2
lambdabot(2,2)
SaizanLoganCapaldo: (r -> (a -> b)) -> (r -> a) -> r -> b <-- ap in the (r (->)) monad
LoganCapaldoSaizan: I know
Saizanoh ok
LoganCapaldo> ap (,) id 2
lambdabot(2,2)
TantumLexis it possible to have lambdabot expressions that normally would go on multiple lines?
> 2 + x where x = 2
lambdabotParse error
HeffalumpTantumLex: that's not a valid expression
where applies to declarations, not expressions
> let y = 2 + x where x = 2 in y
lambdabot4
TantumLex> let y = 2 + x + z where x = 2; z = 3 in y
lambdabot7
TantumLexnice
cinimoddcoutts_: the binary stuff is done in TLV.hs
dcoutts_cinimod: yes, It looks deceptively simple :-)
LoganCapaldo@type ap (flip (.)) (+) (const 3)
lambdabotOccurs check: cannot construct the infinite type: b = a -> b
Probable cause: `+' is applied to too few arguments
cinimoddcoutts_: But then you have to typecheck it to make sure it conforms to the ASN.1 spec
TantumLex@pl f x = y + x
lambdabotf = (y +)
cinimoddcoutts_: 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.
dmhouseHey 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
TantumLexboo
cinimoddcoutts_: unfortunately it uses the unfortunately named newbinary
maukedmhouse: why does it need to be represented?

Page: 3 10 17 24 31 38 45 52 59 66 73 80 87 94 101 108 

IrcArchive