Comments (2)
Another workaround is to use the ifThenElse
function.
I believe this issue stems from the if ... then ... else
essentially being a case statement, which gets lifted to a new top level function in Idris. So It's trying two unify two different generated functions (one for each if ... then ... else ...
) and getting stuck because it doesn't know which way the argument idYes (decEq n a)
goes.
When ifThenElse
is used, they're calling the same function and they can be compared as terms, despite the first argument being stuck. And with your workaround, each branch of the with
unsticks the reduction of the generated functions.
I think the new core being developed for Idris will help with this by including case in the core language.
from idris2.
Thank you for this explanation. I'll keep this in mind.
from idris2.
Related Issues (20)
- Inconsistency in totality checker with different constants values and representations
- A proof of Void HOT 1
- Compiler runs indefinitely for namespaced functions if named arguments are wrong
- Bad semantic highlighting on lambda with parenthesis
- [ preformance ] implementation of `unpack` is inefficient
- Open `Data.Vect.nubBy` for compile-time proofs HOT 1
- [ perf ] type-level evalutaion of `Prelude.elem` is slow compared to the naïve implementation
- Loss of Linearity in Interaction of Abstract Interfaces and Linear State Transformer Monad HOT 5
- Is it safe to pass a GC'ed pointer to C?
- Underscore name of an implicit argument in a signature of an interface function does not work
- Chez backend is too naive on the value of `CHEZ` environment variable
- Add error message with missing fixity namespace
- Execution and compilation hangs indefintely HOT 3
- Loading file in ide-mode changes working directory and causes errors on later actions
- Make output of ide-mode `:interpret` consistent to always return consistent datatype (String)
- Inconsistent error message when finding more than one implementation of an interface
- Reconstructing a (structurally smaller) aggregate from pattern-matched components trips up the totality checker HOT 8
- Support type annotations on LHS of a monadic bind `<-` HOT 9
- Incremental compilation includes some but not all metas
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 idris2.