Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ByteString quasiquoter truncates like Char8 #2

Open
hasufell opened this issue Jan 13, 2020 · 0 comments
Open

ByteString quasiquoter truncates like Char8 #2

hasufell opened this issue Jan 13, 2020 · 0 comments

Comments

@hasufell
Copy link

See haskell/bytestring#140

I don't think this is expected behavior for a bytestring quasiquoter, because haskell source files are valid UTF-8.

{-# LANGUAGE QuasiQuotes #-}

module Foo where

import Data.ByteString
import Data.String.QQ
import Data.ByteString.UTF8

x :: String
x = [s|foo|]

y :: ByteString
y = [s|foo|]

equal :: Bool -- False
equal = x == (toString y)


---


z :: String
z = [s|foo|]

k :: ByteString
k = [s|foo|]

equal' :: Bool -- True
equal' = z == (toString k)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant