Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
switch (language$1) {
case "js" :
return /* JS */16585;
case "ml" :
return /* ML */17247;
case "re" :
return /* RE */18355;
default:
throw [
Json_decode.DecodeError,
"Unknown language: " + (String(language$1) + "")
];
}
}
var test = Json_decode.either((function (param) {
return Json_decode.map((function (param) {
return /* record */[
/* id */param[0],
/* language */param[1],
/* code */param[2]
];
}), (function (param) {
return Json_decode.tuple3(id, language, Json_decode.string, param);
}), param);
}), (function (param) {
return Json_decode.map((function (param) {
return /* record */[
/* id */param[0],
/* language : RE */18355,
/* code */param[1]
];