decOp :: Integer -> STG.PrimOp
decOp n =
  case n of
    0 -> STG.Add
    1 -> STG.Sub
    2 -> STG.Mul
    3 -> STG.Div
    4 -> STG.Mod
    _ -> error "Error: primitive function not supported"

-- | encode a constructor into a number
decOp :: Integer -> STG.PrimOp
decOp n =
  case n of
    0 -> STG.Add
    1 -> STG.Sub
    2 -> STG.Mul
    3 -> STG.Div
    4 -> STG.Mod
    _ -> error "Error: primitive function not supported"

-- | encode a constructor into a number
decOp n =
  case n of
    0 -> STG.Add
    1 -> STG.Sub
    2 -> STG.Mul
    3 -> STG.Div
    4 -> STG.Mod
    _ -> error "Error: primitive function not supported"

-- | encode a constructor into a number