-- | encode operations into numbers
encOp :: STG.PrimOp -> Integer
encOp p =
  case p of
    STG.Add -> 0
    STG.Sub -> 1
    STG.Mul -> 2
    STG.Div -> 3
    STG.Mod -> 4
    _ -> error "Error: primitive function not supported"

-- | decode operations from numbers
encOp :: STG.PrimOp -> Integer
encOp p =
  case p of
    STG.Add -> 0
    STG.Sub -> 1
    STG.Mul -> 2
    STG.Div -> 3
    STG.Mod -> 4
    _ -> error "Error: primitive function not supported"

-- | decode operations from numbers
encOp p =
  case p of
    STG.Add -> 0
    STG.Sub -> 1
    STG.Mul -> 2
    STG.Div -> 3
    STG.Mod -> 4
    _ -> error "Error: primitive function not supported"

-- | decode operations from numbers