Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6619453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:58:13+00:00 2026-05-25T20:58:13+00:00

I am new to Haskell, so this may be a trivial problem. I am

  • 0

I am new to Haskell, so this may be a trivial problem. I am seeing an error message that says

Couldn't match expected type 'Data.Text.Lazy.Internal.Text'
with actual type 'Data.Text.Internal.Text'

and I think the problem is that the actual type is Data.Text.Text and it expects lazy text. How can I convert one to the other?

EDIT:

here is a simplified code that gives this error.

{-# LANGUAGE OverloadedStrings #-}
import Data.Text.Lazy.Encoding import Network.Mail.Mime import Yesod
data FormData = FormData { dataField :: Textarea } deriving Show
part d = Part { partType = "text/plain; charset=utf-8" , partEncoding = None , partFilename = Nothing , partContent = encodeUtf8 $ unTextarea $ dataField d , partHeaders = [] }
main = return ()


basically I have a yesod form with a textarea input element and I want to e-mail the contents of the textarea.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:58:14+00:00Added an answer on May 25, 2026 at 8:58 pm

    toStrict from Data.Text.Lazy would do what you ask for (convert lazy to strict).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Haskell and facing a "cannot construct infinite type" error that
I am new to Haskell and this mixture of Infix and Prefix notation is
I'm new to Haskell so I apologize if this is an easy question, but
Hello I am new at Haskell and i'm having problems trying to get this
I think I may have asked this on Haskell-Cafe at some point, but damned
I am new to Haskell and I wonder how/if I can make this code
I'm rather new to Haskell. The problem is to find the sum of all
This is my first posting on SO, and I'm relatively new to Haskell, so
I am new to Haskell and I have the following problem. I have to
I am new to haskell and I encountered a performance issue that is so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.