formatCompExpr :: HackComputation -> Text
formatCompExpr expr =
  T.pack $ case expr of
    ComputeZero   -> "101010"
    ComputeOne    -> "111111"
    ComputeNegOne -> "111010"
    ComputeD      -> "001100"
    ComputeR      -> "110000"
    NotD          -> "001101"
    NotR          -> "110001"
    NegD          -> "001111"
    NegR          -> "110011"
    DPlusOne      -> "011111"
    RPlusOne      -> "110111"
    DSubOne       -> "001110"
    RSubOne       -> "110010"
    DPlusR        -> "000010"
    DSubR         -> "010011"
    RSubD         -> "000111"
    DAndR         -> "000000"
    DOrR          -> "010101"
formatCompExpr :: HackComputation -> Text
formatCompExpr expr =
  T.pack $ case expr of
    ComputeZero   -> "101010"
    ComputeOne    -> "111111"
    ComputeNegOne -> "111010"
    ComputeD      -> "001100"
    ComputeR      -> "110000"
    NotD          -> "001101"
    NotR          -> "110001"
    NegD          -> "001111"
    NegR          -> "110011"
    DPlusOne      -> "011111"
    RPlusOne      -> "110111"
    DSubOne       -> "001110"
    RSubOne       -> "110010"
    DPlusR        -> "000010"
    DSubR         -> "010011"
    RSubD         -> "000111"
    DAndR         -> "000000"
    DOrR          -> "010101"
formatCompExpr expr =
  T.pack $ case expr of
    ComputeZero   -> "101010"
    ComputeOne    -> "111111"
    ComputeNegOne -> "111010"
    ComputeD      -> "001100"
    ComputeR      -> "110000"
    NotD          -> "001101"
    NotR          -> "110001"
    NegD          -> "001111"
    NegR          -> "110011"
    DPlusOne      -> "011111"
    RPlusOne      -> "110111"
    DSubOne       -> "001110"
    RSubOne       -> "110010"
    DPlusR        -> "000010"
    DSubR         -> "010011"
    RSubD         -> "000111"
    DAndR         -> "000000"
    DOrR          -> "010101"