wip type class reforms (the compiler bootstraps fine)

* replace tfAny and tfAll with tyAnd and tyOr
* integrate matchTypeClass into typeRel
* introduce tyBuiltInTypeClass to handle types such as tuple, object, proc, etc
This commit is contained in:
Zahary Karadjov 2013-12-25 19:25:04 +02:00
commit 1d02f2ea53
8 changed files with 94 additions and 99 deletions

View file

@ -643,6 +643,8 @@ proc toFileLine*(info: TLineInfo): string {.inline.} =
proc toFileLineCol*(info: TLineInfo): string {.inline.} =
result = info.toFilename & "(" & $info.line & "," & $info.col & ")"
template `$`*(info: TLineInfo): expr = toFileLineCol(info)
proc `??`* (info: TLineInfo, filename: string): bool =
# only for debugging purposes
result = filename in info.toFilename