comp :: Bool -> Bool -> Bool -> Exp Int -> Exp Int -> Exp Bool
comp eq lt gt a b = do
    Value a <- a
    Value b <- b
    v <- mutable_ false
    yes <- newLabel
    end <- newLabel
    let f b = if b then yes else end
    emit $ IntCmp a b (f eq) (f lt) (f gt)
    label yes
    v @= true
    label end
    v


-- | Boolean constants corresponding to 'True' and 'False'
comp :: Bool -> Bool -> Bool -> Exp Int -> Exp Int -> Exp Bool
comp eq lt gt a b = do
    Value a <- a
    Value b <- b
    v <- mutable_ false
    yes <- newLabel
    end <- newLabel
    let f b = if b then yes else end
    emit $ IntCmp a b (f eq) (f lt) (f gt)
    label yes
    v @= true
    label end
    v


-- | Boolean constants corresponding to 'True' and 'False'
comp eq lt gt a b = do
    Value a <- a
    Value b <- b
    v <- mutable_ false
    yes <- newLabel
    end <- newLabel
    let f b = if b then yes else end
    emit $ IntCmp a b (f eq) (f lt) (f gt)
    label yes
    v @= true
    label end
    v


-- | Boolean constants corresponding to 'True' and 'False'