git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Test for accidental renamer ident shadowing
58091f4Gary Burgess
examples/passing/ShadowedRename.pursnew file+19
@@ -0,0 +1,19 @@
1+module Main where
2+
3+import Control.Monad.Eff
4+import Debug.Trace
5+
6+foreign import f
7+ "function f(x) {\
8+ \ return function () {\
9+ \ if (x !== 2) throw new Error('x is not 2');\
10+ \ }\
11+ \}" :: forall e. Number -> Eff e Number
12+
13+foo foo = let foo_1 = \_ -> foo
14+ foo_2 = foo_1 unit + 1
15+ in foo_2
16+
17+main = do
18+ f (foo 1)
19+ trace "Done"