How to concat two (IO) Strings in Haskell?
concatenation, haskell, string
Solution
Using string concatenation:
do a <- entryGetText text_field
let b = "Text:" ++ a
return b
More simply:
do a <- entryGetText text_field
return $ "Text:" ++ a
You can play games too:
("Text:" ++) <$> (entryGetText text_field)
Problem
I know this sound very simple, but I failed to combine two strings into a new one. The IO String "a" from a gtk entry is fetched by ``` a <- (entryGetText text_field) ``` The goal is to combine it like: newstring = "Text: "+a Any ideas to accomplish that? Thanks!