@@ -279,7 +279,7 @@ buildDepMap ci ctx mainName = addPostulates $ dfs S.empty M.empty [mainName]
279 getDepsAlt fn es vs var (ConCase ctn@(SN (InstanceCtorN cln)) cnt ns sc) = getDepsSC fn es vs (renameIn sc)
279 getDepsAlt fn es vs var (ConCase ctn@(SN (InstanceCtorN cln)) cnt ns sc) = getDepsSC fn es vs (renameIn sc)
281 renameIn = foldr ((.) . rename) id $ zip [0..] ns
281 renameIn = foldr ((.) . rename) id $ zip [0..] ns
282− rename (i, n) = substSC n (SN (WhereN i ctn n))
282+ rename (i, n) = substSC n $ SN (WhereN i ctn $ sMN i "field")
284 -- data constructors
284 -- data constructors
285 getDepsAlt fn es vs var (ConCase n cnt ns sc)
285 getDepsAlt fn es vs var (ConCase n cnt ns sc)
@@ -407,7 +407,7 @@ buildDepMap ci ctx mainName = addPostulates $ dfs S.empty M.empty [mainName]
407 [TyDecl (DCon tag arity) _] -> arity
407 [TyDecl (DCon tag arity) _] -> arity
408 [TyDecl (Ref) ty] -> length $ getArgTys ty
408 [TyDecl (Ref) ty] -> length $ getArgTys ty
409 [Operator ty arity op] -> arity
409 [Operator ty arity op] -> arity
410− df -> error $ "unknown entity " ++ show n ++ ": " ++ show df
410+ df -> error $ "unknown entity '" ++ show n ++ "' with definition: " ++ show df
412 -- convert applications of lambdas to lets
412 -- convert applications of lambdas to lets
413 -- Note that this transformation preserves de bruijn numbering
413 -- Note that this transformation preserves de bruijn numbering