21:42:04 learnt something new today: Applicatives :) 21:42:21 http://npaste.de/Cx/haskell became http://npaste.de/Cz/ :) 21:42:57 the concatText part is still ugly… 21:42:58 ^^ 21:44:56 Text is a wrapper for a string? 21:45:03 ja 21:45:28 did you write that "Text" type? 21:45:33 jup 21:45:36 maybe you could make it an applicative instance 21:45:39 and then use fmap 21:46:03 hm 21:46:53 parseAll = concatText <$> (descVal <|> Text `fmap` pure `fmap` anyChar) <*> (parseAll <|> return []) 21:46:57 works too 21:47:12 :) 21:48:08 already love those applicatives :> 21:48:33 kind of that.. 21:48:44 (++) <$> (Text "abc") <*> (Text "cde") 21:49:02 concatText a b = (++) <$> a <*> b 21:49:30 hmmm 21:49:31 well its 21:49:49 data DescVal = ID String | Username String | Tag String | Text String 21:50:04 hm I see 21:50:21 your concatText seems buggy 21:50:35 doesn't handle three or more Text in a row.. 21:50:50 it works fine stepcut 21:51:05 *Paste.Parser.Description> parseDesc "moep/aha /asd/ asdlkj#asd @user" 21:51:05 [Text "moep/aha ",ID "asd",Text " asdlkj",Tag "asd",Text " ",Username "user"] 21:52:44 McManiaC: oh, because you use it with foldr 21:53:00 or directly as a replacement of (:) as above 21:53:12 yeah 21:53:46 really cool stuff 21:53:47 :) 21:54:08 applicative functors are neat stuff 21:56:43 I love *> and <* 21:56:44 :D 22:02:08 putStr "Bitte irgendwas eingeben: " *> hFlush stdout *> getLine <* putStrLn "Danke und tschüss!" 22:02:11 thats cool too 22:02:14 :) 22:03:05 wee 23:45:07 hi 23:45:15 how do i set encoding in happstack ?