git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Use error instead of unit for temp types
b6b3d6bGary Burgess
src/Language/PureScript/CodeGen/JS.hs+2−2
@@ -142,10 +142,10 @@ valueToJs _ _ _ _ = error "Invalid argument to valueToJs"
142
142
143-- |
143-- |
144-- Temporarily extends the environment to include a local variable name introduced by a lambda
144-- 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.
146--
146--
147bindName :: ModuleName -> Ident -> Environment -> Environment
147bindName :: 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 }
149
149
150-- |
150-- |
151-- Generate code in the simplified Javascript intermediate representation for runtime type checks.
151-- Generate code in the simplified Javascript intermediate representation for runtime type checks.