Skip to content

Commit

Permalink
Merge pull request #50 from KacperFKorban/update-docs
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
KacperFKorban authored Apr 15, 2024
2 parents b6736ba + 19209dc commit 0eb750e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,17 @@ def run =
## Demo

![GUInep_classes_demo](https://github.com/KacperFKorban/GUInep/assets/39772805/556b6c1b-ea72-4089-8cbd-16f680484177)

## Current limitations

Currently GUInep doesn't support:
- Functions with multiple parameter lists (and by extension - extension methods) - https://github.com/KacperFKorban/GUInep/issues/33
- Fancier GADTs with unobvious inheritance, type bounds and variance - https://github.com/KacperFKorban/GUInep/issues/30
- Union and intersection types - https://github.com/KacperFKorban/GUInep/issues/44
- Opaque types - https://github.com/KacperFKorban/GUInep/issues/49

## Contributing

If you have any ideas on how to improve GUInep, feel free to open an issue.

All bug reports and feature requests are highly appreciated.
10 changes: 4 additions & 6 deletions guinep/src/main/scala/macros.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ private[guinep] object macros {
}

private def wrongParamsListError(f: Expr[Any]): Nothing =
report.errorAndAbort(s"Wrong params list, expected a function reference, got: ${f.show}", f.asTerm.pos)
report.errorAndAbort(s"Wrong parameters list, expected a function reference, got: ${f.show}", f.asTerm.pos)

private def unsupportedFunctionParamType(t: TypeRepr, pos: Option[Position] = None): Nothing = pos match {
case Some(p) => report.errorAndAbort(s"Unsupported function param type: ${t.show}", p)
case None => report.errorAndAbort(s"Unsupported function param type: ${t.show}")
}
private def unsupportedFunctionParamType(t: TypeRepr): Nothing =
report.errorAndAbort(s"Unsupported function parameter type: ${t.show}")

extension (t: Term)
private def select(s: Term): Term = Select(t, s.symbol)
Expand Down Expand Up @@ -345,7 +343,7 @@ private[guinep] object macros {
)
}
case _ =>
unsupportedFunctionParamType(paramTpe, Some(param.pos))
unsupportedFunctionParamType(paramTpe)
}
}

Expand Down

0 comments on commit 0eb750e

Please sign in to comment.