From 9ae49ff3bd946a451a8c4db119d90abf7ef66b1b Mon Sep 17 00:00:00 2001 From: "P. Oscar Boykin" Date: Thu, 5 Dec 2024 09:15:19 -1000 Subject: [PATCH] removed unused generic in ident caching in C (#1297) --- .../scala/org/bykn/bosatsu/codegen/clang/ClangGen.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/org/bykn/bosatsu/codegen/clang/ClangGen.scala b/core/src/main/scala/org/bykn/bosatsu/codegen/clang/ClangGen.scala index 1e7f7c310..ede3802d4 100644 --- a/core/src/main/scala/org/bykn/bosatsu/codegen/clang/ClangGen.scala +++ b/core/src/main/scala/org/bykn/bosatsu/codegen/clang/ClangGen.scala @@ -235,7 +235,7 @@ object ClangGen { def staticValueName(p: PackageName, b: Bindable): T[Code.Ident] def constructorFn(p: PackageName, b: Bindable): T[Code.Ident] - def cachedIdent[A](key: A)(value: => T[Code.Ident]): T[Code.Ident] + def cachedIdent(key: Expr)(value: => T[Code.Ident]): T[Code.Ident] ///////////////////////////////////////// // the below are independent of the environment implementation @@ -1263,7 +1263,7 @@ object ClangGen { currentTop: Option[(PackageName, Bindable)], binds: Map[Bindable, NonEmptyList[Either[((Code.Ident, Boolean, Int), Int), Int]]], counter: Long, - identCache: Map[Any, Code.Ident] + identCache: Map[Expr, Code.Ident] ) { def finalFile: Doc = Doc.intercalate(Doc.hardLine, includes.iterator.map(Code.toDoc(_)).toList) + @@ -1519,7 +1519,7 @@ object ClangGen { } *> StateT(s => result(s.include(Code.Include.angle("stdlib.h")), ())) } - def cachedIdent[A](key: A)(value: => T[Code.Ident]): T[Code.Ident] = + def cachedIdent(key: Expr)(value: => T[Code.Ident]): T[Code.Ident] = StateT { s => s.identCache.get(key) match { case Some(ident) => result(s, ident)