{-# LANGUAGE OverloadedStrings #-} myText = "hello world" :: TextInternally, the extension will convert this to the equivalent of
myText = fromString @Text ("hello world" :: String)Note: You can use fromString in normal code as well, but the usual performance/memory efficiency problems with String apply.
{-# LANGUAGE OverloadedStrings #-} myText = "hello world" :: TextInternally, the extension will convert this to the equivalent of
myText = fromString @Text ("hello world" :: String)Note: You can use fromString in normal code as well, but the usual performance/memory efficiency problems with String apply.