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