@@ -238,6 +238,7 @@ typeForBindingGroupElement moduleName e@(_, (val, _)) dict untypedDict = do
238238isFunction :: Value -> Bool
239239isFunction (Abs _ _) = True
240240isFunction (TypedValue _ val _) = isFunction val
241+isFunction (PositionedValue _ val) = isFunction val
241242isFunction _ = False
242243
243244-- |
@@ -594,7 +595,10 @@ inferLetBinding seen (BindingGroupDeclaration ds : rest) ret j = do
594595 (ident, (val', _)) <- typeForBindingGroupElement moduleName e dict untypedDict
595596 return $ (ident, LocalVariable, val')
596597 bindNames dict $ inferLetBinding (seen ++ [BindingGroupDeclaration ds']) rest ret j
597−inferLetBinding _ _ _ _ = error "Invalid argument to fromValueDeclaration"
598+inferLetBinding seen (PositionedDeclaration pos d : ds) ret j = do
599+ ((d' : ds'), val') <- inferLetBinding seen (d : ds) ret j
600+ return (PositionedDeclaration pos d' : ds', val')
601+inferLetBinding _ _ _ _ = error "Invalid argument to inferLetBinding"
598602
599603-- |
600604-- Infer the type of a property inside a record with a given type