I am studying Haskell in advance in the next semester, and I am delaying group testing . I tried directly in WinGHCi and wrote the function to a text file. Reading the documentation (haskell.org, zvon.org) I can see that the Data.List module is required , so I did the following in WinGHCi :
:l Data.List
But I get the error :: module 'Data.List is a batch module
Then I wrote a function using a text editor as follows:
import Data.List
group "aaaabbbbbbbccddd"
I get an error again when loading (compiling):
_Haskell.hs:2:1:
Parse error: naked expression at top level
Perhaps you intended to use TemplateHaskell_
I am a complete beginner in functional programming. I will be very grateful for your help in solving my problem.
Sincerely.