Comments (10)
Original comment by inkytonik
on 5 Nov 2009 at 5:04
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from kiama.
Original comment by inkytonik
on 6 Nov 2009 at 1:29
- Added labels: Milestone-Release1.1
from kiama.
Original comment by inkytonik
on 10 Nov 2009 at 5:11
- Changed state: Accepted
from kiama.
Also, explore whether better typing information makes it possible to overload
things like strategy and strategyf,
rule and rulef.
Original comment by inkytonik
on 13 Nov 2009 at 3:08
from kiama.
Original comment by inkytonik
on 21 Oct 2010 at 3:24
- Added labels: Milestone-Unknown
- Removed labels: Milestone-Release1.1
from kiama.
Original comment by inkytonik
on 15 Jun 2012 at 9:29
- Added labels: Priority-Medium
- Removed labels: Priority-High
from kiama.
Original comment by inkytonik
on 4 Jul 2013 at 12:23
- Added labels: Milestone-1.6, Priority-High
- Removed labels: Milestone-Unknown, Priority-Medium
from kiama.
1.6 will change the rule combinator to take a T ==> T partial function instead
of an Any ==> Any. The semantics will be as before (fail where the function is
not applicable, succeed otherwise) but there are two ways to fail now: the
subject term is not a T, or it is a T but the function is not defined at it.
This change ensures that when you write a rule body you can't accidentally make
it change the type of the subject term. E.g., something like rule[Num] { case
Num (i) => Add (Num (i), Num (i) } won't compile now since it changes the type
from Num to Add. The same body with rule[Exp] { ... } will compile if Num and
Add are sub-types of Exp. Similarly, the following are ok: rule[Num] { case Num
(i) => Num (i + 1) } or rule[Num] { case _ => Num (1) }.
Use rule[Any] { ... } to get the same situation as in versions before 1.6 where
the type is not checked.
We don't believe it is possible (or desirable) to try for more checking that
strategies are applied correctly. Fundamentally, strategies have to be Any =>
Any since we can apply them anywhere in a generic traversal.
Original comment by inkytonik
on 20 Dec 2013 at 1:35
- Changed state: Resolved
from kiama.
Original comment by inkytonik
on 3 Feb 2014 at 4:24
- Added labels: Milestone-Release2.0.0
- Removed labels: Milestone-1.6
from kiama.
Original comment by inkytonik
on 9 May 2014 at 3:49
- Added labels: Milestone-Release1.6
- Removed labels: Milestone-Release2.0.0
from kiama.
Related Issues (20)
- Rewriting dup doesn't work if a case class has an implicit parameter HOT 10
- Terminal echo is lost after exiting a REPL back to sbt HOT 2
- initTree should be idempotent HOT 13
- Named attributes HOT 3
- Create an Attribution trait HOT 5
- Support truncation metrics in the pretty printer module HOT 3
- Allow the pretty printing newline replacement document to be customised HOT 2
- hasBeenComputedAt should be reset when resetMemo has been called HOT 4
- Control pretty-printer stack usage HOT 3
- Strange behavior of breadthfirst strategy in Rewriter trait HOT 1
- Substitution in the example implementation of the lambda-calculus is wrong HOT 3
- Have version 1.5.3 for Scala 2.10 in Maven Central HOT 5
- ScalaJS support HOT 14
- Typo in comment for ParenPrettyPrinter.scala HOT 1
- Improve error message when dup fails HOT 1
- Rewriting: Rename query to command? HOT 1
- Add better support for type-unifying strategies
- ASL 2.0 HOT 11
- deepclone fails on Seq[] for Kiama 2? HOT 6
- PrettyPrinter introduces empty space on list() with empty prefix HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiama.