| 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)) |
| earthy | damn. that makes it worse :) |
| quicksilver | well the reason that makes it worse is that @pl hides the monad then unpl has to 'unpl for general monad' |
| action | earthy nods |
| earthy | nods |
| quicksilver | :t \x (a,b) -> x >= a && x <= b |
| lambdabot | forall a. (Ord a) => a -> (a, a) -> Bool |
| quicksilver | :t (`ap` snd) . (. fst) . ap (flip . (((.) . (&&)) .) . (>=)) (<=) |
| lambdabot | forall a. (Ord a) => a -> (a, a) -> Bool |
| goltrpoat | i 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 |
| quicksilver | well 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) |
| goltrpoat | which monad? |
| quicksilver | it was the reader monad (r ->) I think |
| goltrpoat | where though |
| quicksilver | in the `ap` |
| goltrpoat | :t (`ap` snd) |
| lambdabot | forall b a b1. ((a, b1) -> b1 -> b) -> (a, b1) -> b |
| goltrpoat | no monad :) the snd restricts it to Reader |
| quicksilver | right but unpl can't see that so, unpl is using the generic unpacking of `ap` @src ap |
| lambdabot | ap = liftM2 id |
| goltrpoat | oh i see what you mean |
| quicksilver | that's where the returns and >>= come from |
| goltrpoat | i thought you were saying that the inferred type of the result of pl was less general than it should be makes sense now. |
| quicksilver | no, 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- |
| ivanm | I'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? |
| syntaxfree | suppose 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? |
| Cale | syntaxfree: I'd use HXT. |
| syntaxfree | HXT. okie! thanks. |
| Cale | It's a little strange at first, but once you know it, it's very nice. |