Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case splitting stops working when using Effects #154

Closed
Termina1 opened this issue Feb 11, 2017 · 2 comments · Fixed by #176
Closed

Case splitting stops working when using Effects #154

Termina1 opened this issue Feb 11, 2017 · 2 comments · Fixed by #176

Comments

@Termina1
Copy link

Termina1 commented Feb 11, 2017

Hi, if I use Eff in type of function declaration case splitting stops working. I debugged and go the error message. I'm not sure it is a bug of package, but it least this error should appear somewhere:

"builtin:Elaborating {__infer0} arg {ival0}: 
CantUnify False (Effects.EffM {m508} Unit 
(Prelude.List.:: Effects.EFFECT Effect.StdIO.STDIO (Prelude.List.Nil Effects.EFFECT)) 
(\ v : Unit => Prelude.List.:: Effects.EFFECT Effect.StdIO.STDIO (Prelude.List.Nil Effects.EFFECT)),
Just (SourceTerm Main.test {__pi_arg507} {m508})) and ({__argTy103} -> {__retTy104},Just (TooManyArgs Main.test {__pi_arg507} {m508})) 
CantUnify False (Effects.EffM {m508} Unit (Prelude.List.:: Effects.EFFECT 
(Effects.MkEff Unit Effect.StdIO.StdIO) (Prelude.List.Nil Effects.EFFECT)),Nothing) and (\ {uv0} : Type .a => {__argTy103} -> {uv0},Nothing)  
in [({m508},Type 0 -> Type 0),({__pi_arg507},Main.Custom),
({__retTy104},Type 0),({__argTy103},Type 0),({iType101},Type 0)] 1 in [({m508},Type 0 -> Type 0),
({__pi_arg507},Main.Custom),({__retTy104},Type 0),({__argTy103},Type 0),({iType101},Type 0)] 1"

And this is the code that triggers the bug, if you try case-split on x:

import Effects
import Effect.StdIO

data Custom = First | Second

test : Custom -> Eff () [STDIO]
test x = ?test_rhs
@justjoheinz
Copy link
Contributor

I am currently not sure if we can get access to this error message. emacs does, so we should be able to do so as well.

Have you already filed a bug with Idiris-dev, as this seems to be an underlying problem?

@Termina1
Copy link
Author

Termina1 commented Apr 1, 2017

@justjoheinz no, I didn't just checked this bug using code from idris master, it still can be reproduced. I will create the issue soon.

justjoheinz pushed a commit to justjoheinz/atom-language-idris that referenced this issue Jul 18, 2017
Fixes idris-hackers#154: Display the general idris compiler error message

Use syntax highlighting in the error panel when idris reports source code snippets.

Relates idris-hackers#171: Improve literate idris support: When in literate mode prefix source code inserted by atom with `>` characters where appropriate

Fixes idris-hackers#131: Use syntax highlighting when using the doc command or `:doc` in the REPL.

Update message panel version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants