Skip to content

Blog Post: Announcing Dotty 0.6.0 and 0.7.0-RC1 #4053

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

Merged
merged 23 commits into from
Mar 6, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Revise GADT text
  • Loading branch information
Blaisorblade committed Mar 5, 2018
commit 5d9440abfbea94401df1f43eaff954c95ca56f17
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ case class Fun[S, T](f: Exp[S] => Exp[T]) extends Exp[S => T]
case class App[T, U](f: Exp[T => U], e: Exp[T]) extends Exp[U]
```

where different constructors, such as `IntLit` and `Fun`, pass different type argument to the super trait. Hence, typechecking a pattern match on `v: Exp[T]` requires special care: for instance, if `v = IntLit(5)` then `T` must be `Int`. This enables writing a typed interpreter `eval[T](e: Exp[T]): T`. In each pattern matching branch
where different constructors, such as `IntLit` and `Fun`, pass different type argument to the super trait. Hence, typechecking a pattern match on `v: Exp[T]` requires special care: for instance, if `v = IntLit(5)` then the typechecker must realize that `T` must be `Int`. This enables writing a typed interpreter `eval[T](e: Exp[T]): T`, where say the `IntLit` branch can return an `Int`:

```scala
object Interpreter {
Expand Down Expand Up @@ -169,7 +169,6 @@ We have fixed multiple bugs about GADT type checking and exhaustiveness checking
[#3645](https://github.com/lampepfl/dotty/issues/3645),
and improved handling of matches using repeated type variables
[#4030](https://github.com/lampepfl/dotty/issues/4030).
More test cases appear in [#3999](https://github.com/lampepfl/dotty/pull/3999).
We have also made error messages more informative [#3990](https://github.com/lampepfl/dotty/pull/3990).
Fixes to covariant GADTs ([#3989](https://github.com/lampepfl/dotty/issues/3989)/
[#4013](https://github.com/lampepfl/dotty/pull/4013)) have been deferred to next release.
Expand Down