git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Minimal failure case for runtime scope issue involving type classes
473f116Phil Freeman
examples/shouldpass/RuntimeScopeIssue.pursnew file+25
@@ -0,0 +1,25 @@
1+module RuntimeScopeIssue where
2+
3+import Prelude
4+
5+class A a where
6+ a :: a -> Boolean
7+
8+class B a where
9+ b :: a -> Boolean
10+
11+instance A Number where
12+ a 0 = true
13+ a n = b (n - 1)
14+
15+instance B Number where
16+ b 0 = false
17+ b n = a (n - 1)
18+
19+module Main where
20+
21+import RuntimeScopeIssue
22+
23+import Prelude
24+
25+main = Trace.print $ a 10