1 package org.simantics.scl.compiler.internal.deriving;
3 import org.simantics.scl.compiler.common.names.Names;
4 import org.simantics.scl.compiler.types.TCon;
5 import org.simantics.scl.compiler.types.Types;
7 import gnu.trove.map.hash.THashMap;
9 public class InstanceDerivers {
10 private static final THashMap<TCon, InstanceDeriver> MAP =
11 new THashMap<TCon, InstanceDeriver>();
14 MAP.put(Types.IO, new IODeriver());
15 MAP.put(Types.ORD, new OrdDeriver());
16 MAP.put(Types.SHOW, new ShowDeriver());
17 MAP.put(Names.Json_Json, new JsonDeriver());
20 public static InstanceDeriver get(TCon typeClass) {
21 return MAP.get(typeClass);