#haskell - Mon 19 Feb 2007 between 08:35 and 08:45

NY Lost Funds



lambdabot(\ l -> (\ ag -> ((\ x d e h -> (x >= e) && (d h)) >>= \ q -> l >>= \ p -> return (q p)) (fst ag)) >>= \ al -> snd >>= \ ak -> return (al ak))
earthydamn. that makes it worse :)
quicksilverwell the reason that makes it worse is that @pl hides the monad
then unpl has to 'unpl for general monad'
actionearthy nods
earthynods
quicksilver:t \x (a,b) -> x >= a && x <= b
lambdabotforall a. (Ord a) => a -> (a, a) -> Bool
quicksilver:t (`ap` snd) . (. fst) . ap (flip . (((.) . (&&)) .) . (>=)) (<=)
lambdabotforall a. (Ord a) => a -> (a, a) -> Bool
goltrpoati just used unsafeCoerce three times in a row, maybe i should add the unpl (pl (\x (a,b) -> x >= a && x <= b)) to it to top it off
quicksilverwell unpl doesn't "have to"
but it does, since it is doesn't have the full inferrer built in
so it doesn't infer the monad (although it could in principle)
goltrpoatwhich monad?
quicksilverit was the reader monad (r ->) I think
goltrpoatwhere though
quicksilverin the `ap`
goltrpoat:t (`ap` snd)
lambdabotforall b a b1. ((a, b1) -> b1 -> b) -> (a, b1) -> b
goltrpoatno monad :) the snd restricts it to Reader
quicksilverright
but unpl can't see that
so, unpl is using the generic unpacking of `ap`
@src ap
lambdabotap = liftM2 id
goltrpoatoh i see what you mean
quicksilverthat's where the returns and >>= come from
goltrpoati thought you were saying that the inferred type of the result of pl was less general than it should be
makes sense now.
quicksilverno, I was saying that unpl doesn't notice when the inferrable type is constraints, and uses general rules for reasoning about 'ap' even when it could use specific expansions for the monad in question
goltrpoat-nod-
ivanmI'm passing through (^2) as an (Int -> Int) function, but when compiling with -Wall it says that its defaulting to Integer constraints... how can I resolve this?
syntaxfreesuppose I want to do some very basic HTML parsing.
I want to extract title tags and links.
Should I use HaXML or roll my own in Parsec?
Calesyntaxfree: I'd use HXT.
syntaxfreeHXT.
okie!
thanks.
CaleIt's a little strange at first, but once you know it, it's very nice.

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 

IrcArchive

NY Lost Funds