google-code-export / omega

Automatically exported from code.google.com/p/omega
Other
2 stars 0 forks source link

variable of type "Code a" accepted in [| . |]-brackets, but causes trouble when executed #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. load URL =
<http://svn.berlios.de/svnroot/repos/al4nin/trunk/found-bugs/issue57-CatFak.omg>
2. Observe loading correctly. Now, on the prompt, run:
(a,b) <- usecase
(run (compile a)) (returnIO undefined)

3. Observe a strange error:
Executing IO action
omega.exe: Push not defined for: [| \ ei0 ->
     let (Monad return bind fail) = %ioM
...

What is the expected output? What do you see instead?
Yeah, I guess, that this construct is not legal:

foo (c :: Code Int) = [| run c |]

But at the moment no time to investigate.

Original issue reported on code.google.com by ggr...@gmail.com on 7 Mar 2008 at 11:51

GoogleCodeExporter commented 9 years ago
shorter testcase:

prompt> let foo (a :: Code Int) = [| run a |]
foo 
prompt> foo [|42|]
[| run (%a) |] : Code Int
prompt> run (foo [|42|])
omega.exe: Push not defined for: [| 42 |]

looks like an undetected cross-stage problem.

Also occurs in the Nov 8 snapshot.

Original comment by ggr...@gmail.com on 7 Mar 2008 at 11:55

GoogleCodeExporter commented 9 years ago
r575 should fix this, see commit text.

Original comment by ggr...@gmail.com on 11 Jan 2011 at 5:35