antc2 / ghc-proposals Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ghc-proposals/ghc-proposals
Proposed compiler and language changes for GHC and GHC/Haskell
Home Page: http://www.haskell.org/ghc
This project forked from ghc-proposals/ghc-proposals
Proposed compiler and language changes for GHC and GHC/Haskell
Home Page: http://www.haskell.org/ghc
I withdrew the 'Instance Apartness Guards' proposal, because it was getting no traction.
But the difficulties it was trying to address haven't gone away. Trac #15632, particularly this proposed rule is highlighting the nastiest of those difficulties.
@spj I have no idea what to do about (overlap + FDs).
The first thing to do is stop thinking about these as two extensions, somewhat orthogonal; instead see that FunDeps rely on overlaps. Because by all the theory these two instance are supposed to be equivalent, and they overlap
class C a b | a -> b
instance C Int Bool
instance (b ~ Bool) => C Int b
But GHC exhibits different behaviour for them, as Trac #15632 is demonstrating: the direct C Int Bool
can be 'fooled'/overridden into delivering C Int Char
, if that second instance is
instance (b ~ Char) => C Int b
Then my suggested rules are trying to catch/prevent that: for those two instances, although the head C Int Bool
is strictly more specific, the argument positions C Int ...
are not more specific (they're the same), so those instances fail on rule B) iii).
This github Issue is for more ruminations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.