
grep -r ">>=" base | head -3 getExecutablePath = _NSGetExecutablePath >>= realpath
grep -r "flip" base | head -3 ... (o,n,[] ) -> return (foldl (flip id) defaultOptions o, n)
grep -r ">>=" base | head -3 getExecutablePath = _do realpath { _NSGetExecutablePath }
grep -r "flip" base | head -3 ... (o,n,[] ) -> return (foldl (flip id) defaultOptions o, n) -- leave
#The problem then peek p_argv >>= peek >>= peekFilePath ... = getFileSystemEncoding >>= \enc -> GHC.withCString enc fp f peekCString s = getForeignEncoding >>= flip GHC.peekCString s peekCStringLen s = getForeignEncoding >>= flip GHC.peekCStringLen s I don't know how often i've seen this one ... >>= flip ... when really we it should have been ... {...} Only because we can't just execute an IO action and fill in the result. And this list doesn't even include examples where the programmer had to resort to making a pointless temp variable just to avoid using too many complicated functions. #The solution then peekFilePath { peek {peek p_argv} } ... = do GHC.withCString {getFileSystemEncoding} fp f peekCString s = GHC.peekCString {getForeignEncoding} s peekCStringLen s = GHC.peekCStringLen {getForeignEncoding} s I think there is no use of {} in haskell that does not come after a key word but has an expression inside. But it could be some other syntax too. silvio