“=~” raise “No instance for (RegexContext Regex [Char] [String])”
ghci> getAllTextMatches (“foo” =~ “o” :: AllTextMatches [] String) [“o”, “o”] I haven’t used regexes in Haskell much (which is I think Dan Burton’s answer is more idiomatic). So the way I figured this out is I looked at your type error No instance for (RegexContext Regex [Char] [String]), and popped into ghci: ghci> :t … Read more