if-instance
GHC plugin to branch on whether a constraint is satisfied (by sheaf)
ifcxt
constraint level if statements (by mikeizbicki)
if-instance | ifcxt | |
---|---|---|
4 | 4 | |
33 | 116 | |
- | 0.0% | |
3.6 | 0.0 | |
4 months ago | over 7 years ago | |
Haskell | Haskell | |
- | BSD 3-clause "New" or "Revised" License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
if-instance
Posts with mentions or reviews of if-instance.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-09-08.
-
Branching on constraints (if-instance), applications
Sam Derbyshire has a cool type-checking plugin called if-instance that lets you branch on whether a constraint is satisfied with the following interface:
- Different `Num` instances based on availability of another instance.
-
How do I define this super-unsafe type class (not internally consistent at all 😱)
/u/presheaf has a more modern version using a GHC plugin: https://github.com/sheaf/if-instance
-
Quantified, overlapping type family equations
I just put up a library that allows branching on whether a constraint is satisfied, using a type-checking plugin. There's also a type-family IsSat, which works as in the OP. Let me know what you think!
ifcxt
Posts with mentions or reviews of ifcxt.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-08-02.
-
Monthly Hask Anything (August 2022)
Even the IfCtx "tricks" and stuff like /u/Noughtmare's post don't resolve the constraints at runtime. The constraints are still resolved statically, you just carry around a (constant) token that indicates how compile-time resolution went.
- Different `Num` instances based on availability of another instance.
- How do I define this super-unsafe type class (not internally consistent at all 😱)
What are some alternatives?
When comparing if-instance and ifcxt you can also consider the following projects:
ghc-proposals - Proposed compiler and language changes for GHC and GHC/Haskell
auto - Haskell DSL and platform providing denotational, compositional api for discrete-step, locally stateful, interactive programs, games & automations. http://hackage.haskell.org/package/auto
safe-exceptions - Safe, consistent, and easy exception handling
transient-universe - A Cloud monad based on transient for the creation of Web and reactive distributed applications that are fully composable, where Web browsers are first class nodes in the cloud
capability - Extensional capabilities and deriving combinators
static-closure