<div dir="ltr">PrintfArg does not have toUPrint. The functions in there are formatArg and parseFormat.<div><br></div><div>PrintfType is according to its documentation, an interface that you shall not implement yourself.</div></div><br><div class="gmail_quote"><div dir="ltr">Baa <<a href="mailto:aquagnu@gmail.com">aquagnu@gmail.com</a>> schrieb am Fr., 24. Nov. 2017 um 15:08 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I talked about PrintfType and its method `hspr`.<br>
<br>
With PrintfArgs the same problem:<br>
<br>
  instance PrintfArg JobEvent where<br>
    toUPrintf _ = UString "aaa"<br>
<br>
      ^^^ toUPrintf is not visible ERROR here...<br>
<br>
Header of this file looks like:<br>
<br>
  module Text.Printf(<br>
     printf, hPrintf,<br>
     PrintfType, HPrintfType, PrintfArg, IsChar<br>
  ) where<br>
<br>
so methods are not exported? And I don't see any Internal subpackage...<br>
OK, no problem, I switched already to very cool `formatting` library :)<br>
<br>
Thanks a lot!<br>
<br>
<br>
> It appears PrintfArg and its methods are fully exported.<br>
><br>
> On Fri, Nov 24, 2017 at 8:19 AM, Baa <<a href="mailto:aquagnu@gmail.com" target="_blank">aquagnu@gmail.com</a>> wrote:<br>
><br>
> > But how to do it if "methods" are not exporting?<br>
> ><br>
> > > According to<br>
> > > <a href="https://hackage.haskell.org/package/base-4.10.0.0/docs/" rel="noreferrer" target="_blank">https://hackage.haskell.org/package/base-4.10.0.0/docs/</a><br>
> > Text-Printf.html#g:2,<br>
> > > you only need to implement `PrintfArg`. There is also an example<br>
> > > for `()`.<br>
> > ><br>
> > > Baa <<a href="mailto:aquagnu@gmail.com" target="_blank">aquagnu@gmail.com</a>> schrieb am Fr., 24. Nov. 2017 um 13:33<br>
> > > Uhr:<br>
> > > > Hello All!<br>
> > > ><br>
> > > > As I understand to use Text.Printf.printf with custom types or<br>
> > > > to return result as Text instead of String I must implement some<br>
> > > > class instances: PrintfType, PrintfArg. But how to do this if<br>
> > > > they are exported from module as type-names only - without its<br>
> > > > methods (i.e. not "Printf (..)", but "Printf") ?<br>
> > > ><br>
> > > > I tried to import Text.Printf.Internal but seems that no such<br>
> > > > submodule...<br>
> > > ><br>
> > > > Any ideas?<br>
> > > ><br>
> > > > ===<br>
> > > > Best regards, Paul<br>
> > > > _______________________________________________<br>
> > > > Beginners mailing list<br>
> > > > <a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
> > > > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
> > > ><br>
> ><br>
> > _______________________________________________<br>
> > Beginners mailing list<br>
> > <a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
> > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
> ><br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>