1 package org.simantics.scl.compiler.internal.deriving;
\r
3 import gnu.trove.map.hash.THashMap;
\r
5 import org.simantics.scl.compiler.types.TCon;
\r
6 import org.simantics.scl.compiler.types.Types;
\r
8 public class InstanceDerivers {
\r
9 private static final THashMap<TCon, InstanceDeriver> MAP =
\r
10 new THashMap<TCon, InstanceDeriver>();
\r
13 MAP.put(Types.EQ, new EqDeriver());
\r
14 MAP.put(Types.HASHABLE, new HashableDeriver());
\r
15 MAP.put(Types.IO, new IODeriver());
\r
16 MAP.put(Types.ORD, new OrdDeriver());
\r
17 MAP.put(Types.SHOW, new ShowDeriver());
\r
20 public static InstanceDeriver get(TCon typeClass) {
\r
21 return MAP.get(typeClass);
\r