git.iko.soy
/
rowtype-yoga/purescript-native
readme
files
commits
refs
on
golang
help
sign in
Minimal failure case for runtime scope issue involving type classes
473f116
Phil Freeman
13 years ago
examples/shouldpass/RuntimeScopeIssue.purs
new file
+25
compare with golang
unified
split
@@ -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
keys
esc to close
j k
move down, up
enter
open
esc
back, or up a level
1 2 3 4
readme, files, commits, refs
/
filter
y
copy the clone command
c
compare the chosen commit with another (or shift-click both)
?
show or hide this list