Apart from manpage and haddocks the best description of what wordexp
is doing is simple ghci session:
>>> import System.Wordexp.Simple
>>> wordexp "~"
["/home/maksenov"]
>>> wordexp "$SHELL"
["/usr/bin/zsh"]
>>> wordexp "~/[s-t]*"
["/home/maksenov/sandbox","/home/maksenov/svn","/home/maksenov/temp"]
>>> wordexp "~/<"
*** Exception: IllegalCharacterOccurence