Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nim devel branch compat #59

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions src/datamancer/formula.nim
Original file line number Diff line number Diff line change
Expand Up @@ -615,13 +615,23 @@

proc maybeAddSpecialTypes(possibleTypes: var PossibleTypes, n: NimNode) =
## These don't appear as overloads sometimes?
if n.kind in {nnkSym, nnkIdent}:
if n.strVal in ["<", ">", ">=", "<=", "==", "!="]:
for dtype in Dtypes:
possibleTypes.add ProcType(inputTypes: @[ident(dtype),
ident(dtype)],
isGeneric: false,
resType: some(ident("bool")))
var strVal: string
case n.kind:
of nnkSym, nnkIdent:
strVal = n.strVal
of nnkClosedSymChoice:
if len(n) > 0:
strVal = n[0].strVal
else:
return
else:
return
if strVal in ["<", ">", ">=", "<=", "==", "!="]:
for dtype in Dtypes:
possibleTypes.add ProcType(inputTypes: @[ident(dtype),
ident(dtype)],
isGeneric: false,
resType: some(ident("bool")))

proc findType(n: NimNode, numArgs: int): PossibleTypes =
## This procedure tries to find type information about a given NimNode.
Expand Down Expand Up @@ -1198,7 +1208,7 @@
if funcKind != fkNone:
## raise error in case given function kind does not match what we expect
if allScalar and funcKind != fkScalar:
warning("Formula " & $fct.rawName & " has a mismatch between given formula " &

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (version-1-4)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (version-1-4)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (version-1-4)

Formula (~ baz 2) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (version-1-4)

Formula (~ μ (el.attenuationCoefficient (col x))) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (version-1-4)

Formula (~ from 0) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (version-1-4)

Formula (+ (~ subMeanHwy 0.0) (mean (col hwy))) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (version-1-4)

Formula (~ countCol 0) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (devel)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (devel)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (devel)

Formula (~ baz 2) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (devel)

Formula (~ μ (el.attenuationCoefficient (col x))) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / linux (devel)

Formula (~ from 0) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (version-1-4)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (version-1-4)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (version-1-4)

Formula (~ baz 2) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (version-1-4)

Formula (~ μ (el.attenuationCoefficient (col x))) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (version-1-4)

Formula (~ from 0) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (version-1-4)

Formula (+ (~ subMeanHwy 0.0) (mean (col hwy))) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (version-1-4)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (version-1-4)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (version-1-4)

Formula (~ baz 2) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (version-1-4)

Formula (~ μ (el.attenuationCoefficient (col x))) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (version-1-4)

Formula (~ from 0) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (version-1-4)

Formula (+ (~ subMeanHwy 0.0) (mean (col hwy))) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (devel)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (devel)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (devel)

Formula (~ baz 2) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (devel)

Formula (~ μ (el.attenuationCoefficient (col x))) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / macos (devel)

Formula (~ from 0) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (devel)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (devel)

Formula (+ (~ subMeanHwy 0.0) (mean df["hwy"])) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (devel)

Formula (~ baz 2) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (devel)

Formula (~ μ (el.attenuationCoefficient (col x))) has a mismatch between given formula kind:

Check warning on line 1211 in src/datamancer/formula.nim

View workflow job for this annotation

GitHub Actions / windows (devel)

Formula (~ from 0) has a mismatch between given formula kind:
"kind:\n\t`" & $funcKind & "` (mapping)\nand automatically determined formula kind:\n\t" &
"<< (reducing)\nPlease adjust the given kind to `<<`.")
elif not allScalar and funcKind == fkScalar:
Expand Down
Loading