Generics / function overloading for imported function

2021-08-25 Thread ynfle
Try use mixin or define another version of quote with another type in moda

Generics / function overloading for imported function

2021-08-25 Thread trisub
I've done some more experiments and I have a follow up question. I changed my module A to include a somewhat less dummy implementation of `quote[T]` for `seq[T]`: # moda.nim import sequtils import strutils proc quote*(s: string): string = "`" & s & "`"

Generics / function overloading for imported function

2021-08-24 Thread trisub
Thank you very much, that was exactly the piece of information I was missing! Also, I see now that it's right in the documentation: On a sidenote: yeah, I know about `quote` from `std/macro`. I don't need a `quote` function like i

Generics / function overloading for imported function

2021-08-24 Thread xigoi
In addition to what @shirleyquirk said, if the function you're defining sees multiple implementations of `quote`, it automatically becomes an open symbol, so that's why the seemingly unrelated definition caused a difference. Also, be careful with the name because there's a `quote` macro in `std/

Generics / function overloading for imported function

2021-08-24 Thread shirleyquirk
[play](https://replit.com/@shirleyquirk/AgitatedWhirlwindPreprocessor) [mixin](https://nim-lang.org/docs/manual.html#generics-mixin-statement)

Generics / function overloading for imported function

2021-08-24 Thread trisub
Hello, I have a question concerning generics / function overloading. Say I have a (somewhat silly for demonstration purposes) "module A". The main function `quotedPair` takes an argument and returns a tuple containing the argument itself as well as some sort of "quoted" form of the argument whi