On Mon, Sep 1, 2008 at 1:30 AM, Bulat Ziganshin
<[EMAIL PROTECTED]> wrote:
> of course this may be done with code generation tools (such as TH).
> point of this research is to do this using type abilities of Haskell

Yes, I know.  My point was that TH could be used as a minimal "String
-> ExpQ" wrapper, where the ExpQ is the code used by this library, to
save keystrokes.

I'm all about writing 100 lines of code to save 10 keystrokes per use
of a function. :)

> Don, i think this should be impossible with IsString since the point
> is that Haskell compiler should know types at compile time. IsString
> can't convert "%d" into (X int) while converting "%s" into (X String)

Although of course you could use IsString to convert raw strings into
'lit "string"'; this would make the syntax slightly more palatable:

> printf ("hello" ^ char ^ "world" ^ char) ' ' '!'

  -- ryan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to