Comments (5)
I do, and this is the error:
src/Ivory/Language/Coroutine.hs:49:27:
Couldn't match type ‘s10’ with ‘s1’
‘s10’ is untouchable
inside the constraints (ClearBreak eff ~ ProcEffects s2 ())
bound by the type of the constructor ‘CoroutineBody’:
(ClearBreak eff ~ ProcEffects s2 ()) => Ivory eff (Ref s10 a)
at src/Ivory/Language/Coroutine.hs:49:27
‘s1’ is a rigid type variable bound by
the type of the constructor ‘CoroutineBody’:
(forall (eff :: Effects).
(ClearBreak eff ~ ProcEffects s2 ()) =>
Ivory eff (Ref s1 a))
-> Ivory (ProcEffects s2 ()) ()
at src/Ivory/Language/Coroutine.hs:49:27
Expected type: Ivory eff (Ref s10 a)
Actual type: Ivory eff (Ref s1 a)
In the ambiguity check for the type of the constructor ‘CoroutineBody’:
CoroutineBody :: forall (s1 :: Ivory.Language.Scope.RefScope) s2.
(forall (eff :: Effects).
(ClearBreak eff ~ ProcEffects s2 ()) =>
Ivory eff (Ref s1 a))
-> Ivory (ProcEffects s2 ()) ()
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the definition of data constructor ‘CoroutineBody’
In the newtype declaration for ‘CoroutineBody’
src/Ivory/Language/Coroutine.hs:49:27:
Couldn't match type ‘s10’ with ‘s1’
‘s10’ is untouchable
inside the constraints (ClearBreak eff ~ ProcEffects s2 ())
bound by the type of the constructor ‘CoroutineBody’:
(ClearBreak eff ~ ProcEffects s2 ()) => Ivory eff (Ref s10 a)
at src/Ivory/Language/Coroutine.hs:49:27
‘s1’ is a rigid type variable bound by
the type of the constructor ‘CoroutineBody’:
(forall (eff :: Effects).
(ClearBreak eff ~ ProcEffects s2 ()) =>
Ivory eff (Ref s1 a))
-> Ivory (ProcEffects s2 ()) ()
at src/Ivory/Language/Coroutine.hs:49:27
Expected type: Ivory eff (Ref s10 a)
Actual type: Ivory eff (Ref s1 a)
In the ambiguity check for the type of the constructor ‘CoroutineBody’:
CoroutineBody :: forall (a :: Area *).
(forall (s1 :: Ivory.Language.Scope.RefScope) s2.
(forall (eff :: Effects).
(ClearBreak eff ~ ProcEffects s2 ()) =>
Ivory eff (Ref s1 a))
-> Ivory (ProcEffects s2 ()) ())
-> CoroutineBody a
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the definition of data constructor ‘CoroutineBody’
In the newtype declaration for ‘CoroutineBody’
from ivory.
Oh, I think maybe I see it. Does it work without ambiguous types if CoroutineBody
looks something like this instead? (Not tested, just off the top of my head.)
newtype CoroutineBody a = CoroutineBody (forall s1 s2. (forall b. Ivory (Effects (Returns ()) b s2) (Ref s1 a)) -> Ivory (ProcEffects s2 ()) ())
That's supposed to say that the yield callback can be used whether break statements are allowed or not, but must be used in the same allocation scope as the current coroutine.
from ivory.
Okay. That built after I turned
(Effects (Returns ()) b s2)
to
('Effects (Returns ()) b (Scope s2))
I'll do a pull request on this.
from ivory.
Thanks very much for fixing this, Chris!
I'm a little embarrassed that everyone over here at Galois is too lazy to install GHC 7.10 and figure this out ourselves, but we're very heads down on other stuff for another month or two.
from ivory.
You're welcome @pchickey - and no problem. I figured I'd devote a few minutes to it since I'm already working with GHC 7.10 and Ivory nearly every day - and that's about all it took to fix it.
from ivory.
Related Issues (20)
- Invalid code generated: initialization discards ‘const’ qualifier from pointer target type HOT 9
- Hackage build failed HOT 4
- The documentation for the latest version of this package is missing on Hackage. HOT 2
- Question: Using "Simple" Sum Types in Ivory HOT 2
- Why `deref` is effectful? HOT 7
- Add support for template-haskell-2.12 HOT 1
- Constant assertions
- Remove `IvoryZero` constraint from `ifte` and `cond`
- Travis entry for 7.10 looks invalid
- http://ivorylang.org seems down HOT 1
- How to actually run the tutorial? HOT 1
- ivory-backend-acl2 can not work
- Incompatibility with newer versions of base-compat and monadLib HOT 1
- The documentation for the latest version of `ivory-backend-c` is missing on Hackage. HOT 3
- ProcPtrs and Refs in MemAreas
- Remove noop casts in the C code HOT 4
- Finish/integrate new model-checker
- Generalize Ivory memory model
- Ivory module system improvements
- cvc4 errors in local test HOT 4
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 ivory.