git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Use error instead of unit for temp types
commitb6b3d6b4a674ea09f67384a7f029b2d96a110b41 authorGary Burgess <garyb@users.noreply.github.com> dateSat 8 Feb 2014, 17:45 (13 years ago) parent2620fe0
1 file changed+2−2
src/Language/PureScript/CodeGen/JS.hs+2−2
src/Language/PureScript/CodeGen/JS.hs+2−2
@@ -142,10 +142,10 @@ valueToJs _ _ _ _ = error "Invalid argument to valueToJs"
142142
143143-- |
144144-- Temporarily extends the environment to include a local variable name introduced by a lambda
145−-- abstraction. The stored type is incorrect, but not used.
145+-- abstraction.
146146--
147147bindName :: ModuleName -> Ident -> Environment -> Environment
148−bindName m ident env = env { names = M.insert (m, ident) (unit, LocalVariable) $ names env }
148+bindName m ident env = env { names = M.insert (m, ident) (error "Temporary lambda variable type was read", LocalVariable) $ names env }
149149
150150-- |
151151-- Generate code in the simplified Javascript intermediate representation for runtime type checks.