title: Haskell: 'No instance for' arising from a trivial usage of Regex library
body: <p>Following the (accepted) answer from <a href="https://stackoverflow.com/questions/1028764/multiline-matching-in-haskell-posix">this question</a>, I am expecting the following to work:</p>
  
  <pre><code>Prelude Text.Regex.Posix Text.Regex.Base.RegexLike Text.Regex.Posix.String&gt; makeRegex ".*"
  </code></pre>
  
  <p>(<code>makeRegex</code> is a shortcut for <code>makeRegexOpts</code> with predefined options)</p>
  
  <p>However, it doesn't:</p>
  
  <pre><code>&lt;interactive&gt;:1:0:
      No instance for (RegexMaker regex compOpt execOpt [Char])
        arising from a use of `makeRegex' at &lt;interactive&gt;:1:0-13
      Possible fix:
        add an instance declaration for
        (RegexMaker regex compOpt execOpt [Char])
      In the expression: makeRegex ".*"
      In the definition of `it': it = makeRegex ".*"
  Prelude Text.Regex.Posix Text.Regex.Base.RegexLike Text.Regex.Posix.String&gt; make
  Regex ".*"::Regex
  
  &lt;interactive&gt;:1:0:
      No instance for (RegexMaker Regex compOpt execOpt [Char])
        arising from a use of `makeRegex' at &lt;interactive&gt;:1:0-13
      Possible fix:
        add an instance declaration for
        (RegexMaker Regex compOpt execOpt [Char])
      In the expression: makeRegex ".*" :: Regex
      In the definition of `it': it = makeRegex ".*" :: Regex
  </code></pre>
  
  <p>And I really don't understand why.</p>
  
  <p><b>EDIT</b></p>
  
  <p>Haskell Platform 2009.02.02 (GHC 6.10.4) on Windows</p>
  
  <p><b>EDIT2</b></p>
  
  <pre><code>Prelude Text.Regex.Base.RegexLike Text.Regex.Posix.String&gt; :i RegexMaker
  class (RegexOptions regex compOpt execOpt) =&gt; RegexMaker regex compOpt execOpt source | regex -&gt; compOpt execOpt, compOpt -&gt; regex execOpt, execOpt -&gt; regex compOpt where
    makeRegex :: source -&gt; regex
    makeRegexOpts :: compOpt -&gt; execOpt -&gt; source -&gt; regex
    makeRegexM :: (Monad m) =&gt; source -&gt; m regex
    makeRegexOptsM ::
      (Monad m) =&gt; compOpt -&gt; execOpt -&gt; source -&gt; m regex
          -- Defined in Text.Regex.Base.RegexLike
  </code></pre>