Comments (1)
@cyrus- the current behavior is due to the following:
Given the type definition:
type T = A(Int) + B(T) in ...
the type T
has internal representation:
(Sum [("A", (Some Int)); ("B", (Some (Rec ("α", (Sum [("A", (Some Int)); ("B", (Some (Var "α")))])))))])
and when we gather the constructor types, we unroll the type to stop the α from escaping, as commented here:
hazel/src/haz3lcore/statics/TypBase.re
Line 397 in e908f47
I don't remember the specific issue which inspired this addition; it may no longer be an issue since we have prohibited shadowing aliases. Since this is the case, perhaps we can just renaming the internal rec parameter to the type alias and forgo in the unrolling, though this seems like a hazard that would need to be warded in case we decided to change course on type shadowing.
from hazel.
Related Issues (20)
- IDE mode
- Linter
- Integrate live values into editor UI
- Code tour support
- Convert some Project Euler problems into Hazel exercises
- Line numbering
- Variable renaming UI
- Structured search
- Drag-and-drop blocks editing UI for Hazel
- cannot delete `=` when let type annotation trails with a hole HOT 1
- 1 @ 2 doesn't throw an error HOT 2
- Fixpoints in SynFun position create static errors HOT 2
- Structural copy/paste
- Relative precedence of ; and && HOT 1
- Add ability to decide on stepping strategy during stepping
- Think about how to update the stepper state when elaboration changes
- Make undo return you to previous stepper state HOT 1
- Constructors that require arguments shouldn't be in patterns without arguments HOT 4
- case checker on recursive types
- ADTs with hole type consistency have casting bug HOT 1
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 hazel.