strLength :: Exp String -> Exp Int
strLength a = do Value a <- a; v <- var; emit $ StrLen v a; return $ Value $ val v

-- | Take the first @n@ characters from a string, @strTake 2 \"test\" '%==' \"te\"@.
strLength :: Exp String -> Exp Int
strLength a = do Value a <- a; v <- var; emit $ StrLen v a; return $ Value $ val v

-- | Take the first @n@ characters from a string, @strTake 2 \"test\" '%==' \"te\"@.
strLength a = do Value a <- a; v <- var; emit $ StrLen v a; return $ Value $ val v

-- | Take the first @n@ characters from a string, @strTake 2 \"test\" '%==' \"te\"@.