Encoding and decoding in Haskell -- 99 Problems exercise 13, 14
The general idea, which is to use group and Data.List.group and replicate, is right.  Your implementation is a bit verbose, though.

The top-level functions (encode, decode, and main) should have type signatures.  You didn't write one for main :: IO ().  The inner functions, though, don't need type signatures, since the compiler can infer their types.

Avoid nesting parentheses.  All of your nested parentheses could be written with $ instead.  For example:

print $ decode $ encode "Mississippi"


I don't think you need so many helper functions.

Both encode and decode could be written in point-free style.

Writing decode = foldl (++) "" (map replicateChars (map fromEncoding encodings)) is too complicated.  concatMap would do the trick.

import Data.List (group)

data Encoding = Multiple Int Char | Single Char deriving (Show)

encode :: String -&gt; [Encoding]
encode = map toEncoding . group
  where
    toEncoding (c:[]) = Single c
    toEncoding group  = Multiple (length group) (head group)

decode :: [Encoding] -&gt; String
decode = concatMap fromEncoding
  where
    fromEncoding (Single char)       = [char]
    fromEncoding (Multiple num char) = replicate num char

main :: IO ()
main = do
    print $ decode $ encode "Mississippi"