Hi,
I am bit struggling with understanding the typeclasses usage in Text.Regex.Posix (=~) while reading Real world haskell.
The type of (=~) is (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target) => source1 -> source -> target
I am from Java world. My question is that can I understand source1 in the way which is a value has type of RegexMaker, Regex, CompOption and ExecOption?
And the definiton of instance RegexMaker Regex CompOption ExecOption String makes it possible for us to pass a String as the parameter of =~?
Where can I find some good metarials about GHC's type classes? I googled a lot but can not find something mentioned above usage.
--
Cheers,
Keke
-----------------
We paranoid love life