Skip to content

Build infrastructure #6

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 5 commits into from
Jan 24, 2014
Merged

Build infrastructure #6

merged 5 commits into from
Jan 24, 2014

Conversation

VladUreche
Copy link
Contributor

Just enough to enable sbt eclipse to work and get a project file. Also an improved readme.

Tests don't work yet:

[error] Test dotc.tests.pos_Patterns failed: bad symbolic reference. A signature
[error] refers to scala$ in package <root> which is not available.
[error] It may be completely missing from the current classpath, or the version on
[error] the classpath might be incompatible with the version used when compiling the signature.
[error]     at dotty.tools.dotc.reporting.Reporter$.Diagnostic(Reporter.scala:42)
[error]     at dotty.tools.dotc.reporting.Reporting$class.error(Reporter.scala:103)
[error]     at dotty.tools.dotc.core.Contexts$Context.error(Contexts.scala:49)
[error]     at dotty.tools.dotc.core.SymDenotations$StubInfo.complete(SymDenotations.scala:1210)
[error]     at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:132)
[error]     at dotty.tools.dotc.core.SymDenotations$SymDenotation.decls(SymDenotations.scala:203)
[error]     at dotty.tools.dotc.core.SymDenotations$SymDenotation.preDecls(SymDenotations.scala:215)
[error]     at dotty.tools.dotc.core.Definitions.newAliasType(Definitions.scala:61)
[error]     at dotty.tools.dotc.core.Definitions.AnyRefAlias$lzycompute(Definitions.scala:99)
[error]     at dotty.tools.dotc.core.Definitions.AnyRefAlias(Definitions.scala:99)
[error]     at dotty.tools.dotc.core.Definitions.syntheticCoreClasses$lzycompute(Definitions.scala:457)
[error]     at dotty.tools.dotc.core.Definitions.syntheticCoreClasses(Definitions.scala:456)
[error]     at dotty.tools.dotc.core.Definitions.init(Definitions.scala:497)
[error]     at test.DottyTest.<init>(DottyTest.scala:32)
[error]     at test.CompilerTest.<init>(CompilerTest.scala:9)
[error]     at dotc.tests.<init>(tests.scala:6)

@VladUreche
Copy link
Contributor Author

Review by @DarkDimius.

import Keys._
import Process._

object MiniboxingBuild extends Build {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be named DottyBuild.
btw is there any reason to have a Scala build file? It seems that all settings here can be in .sbt.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, we could have build.sbt and it would suffice, but if we start preparing multiple projects, it will be easier to use an sbt project.

@VladUreche
Copy link
Contributor Author

@sjrd, all ok?

@sjrd
Copy link
Member

sjrd commented Jan 23, 2014

LGTM Yep :)

@VladUreche
Copy link
Contributor Author

Thanks @sjrd! I'll merge the patch tomorrow, to give @odersky a chance to chime in.

@VladUreche
Copy link
Contributor Author

Since nobody voiced any concerns I'm merging this.

VladUreche pushed a commit that referenced this pull request Jan 24, 2014
@VladUreche VladUreche merged commit aad81eb into scala:master Jan 24, 2014
smarter pushed a commit that referenced this pull request Mar 12, 2020
romanowski pushed a commit to romanowski/dotty that referenced this pull request Oct 23, 2020
Create Scala signature provider that renders methods and classes
szymon-rd added a commit that referenced this pull request Dec 9, 2022
WojciechMazur added a commit that referenced this pull request Nov 19, 2024
Implement the `#6` point form SIP-64 i.e.
---

### 6. Context Bounds for Polymorphic Functions

Currently, context bounds can be used in methods, but not in function
types or function literals. It would be nice propose to drop this
irregularity and allow context bounds also in these places. Example:

```scala
type Comparer = [X: Ord] => (x: X, y: X) => Boolean
val less: Comparer = [X: Ord as ord] => (x: X, y: X) =>
  ord.compare(x, y) < 0
```

The expansion of such context bounds is analogous to the expansion in
method types, except that instead of adding a using clause in a method,
we insert a context function type.

For instance, the `type` and `val` definitions above would expand to
```scala
type Comparer = [X] => (x: X, y: X) => Ord[X] ?=> Boolean
val less: Comparer = [X] => (x: X, y: X) => (ord: Ord[X]) ?=>
  ord.compare(x, y) < 0
```

The expansion of using clauses does look inside alias types. For
instance,
here is a variation of the previous example that uses a parameterized
type alias:
```scala
type Cmp[X] = (x: X, y: X) => Boolean
type Comparer2 = [X: Ord] => Cmp[X]
```
The expansion of the right hand side of `Comparer2` expands the `Cmp[X]`
alias
and then inserts the context function at the same place as what's done
for `Comparer`.
WojciechMazur added a commit to WojciechMazur/dotty that referenced this pull request Mar 19, 2025
Backport "Handle suspension due to macro call in arbitrary phases" to LTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants