Comments (3)
Did you see #23? It's been a while since I looked at that discussion, but I think it covers similar territory.
from purescript-enums.
#23 is more about laws of pred
and succ
in BoundedEnum
context while this is about what values are allowed for fromEnum bottom
(currently any number, while only 0
work for some instances / functions)
from purescript-enums.
This will be somewhat resolved in the release for the 0.12 compiler - I've removed the offending instances for now (they are possible, but they're going to be kinda gnarly and probably slow), and added notes to the functions that make assumptions that fromEnum bottom = 0
.
Thanks!
from purescript-enums.
Related Issues (15)
- No separation between Enumerable and FinitelyEnumerable HOT 1
- BoundedOrd HOT 1
- Inconsistent behavior of enumFromTo for bounded enums HOT 2
- UnboundedEnum HOT 6
- BoundedEnum instance for Int has invalid cardinality HOT 2
- Why isn't BoundedEnum constraint used in defaultSucc and defaultPred? HOT 2
- upFromIncluding :: ∀ a u. Enum a => Unfoldable u => a -> NonEmpty u a HOT 2
- move Cardinality to type level HOT 3
- Consider a SmallBounded type
- `toEnum` modulo `Cardinality a`
- `charToEnum` implementation is wrong HOT 1
- Why succ returns Maybe? HOT 6
- Define BoundedEnum-like class using type-level Ints
- Overlapping instances found HOT 24
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 purescript-enums.