I am getting type mismatch when I use traceIfFalse. What could be be reason? And how could I get this resolved. I also noticed that it didn't fail while I build lecture examples.

  • Couldn't match expected type PlutusTx.Builtins.Internal.BuiltinString' with actual type [ghc-prim-0.6.1:GHC.Types.Char]'
    • In the first argument of traceIfFalse', namely "expected boolean True"' In the first argument of ($)', namely traceIfFalse "expected boolean True"' In the expression: traceIfFalse "expected boolean True" $ (boolx == True && boolx == booly) | 19 | mkValidator _ (boolx, booly) _ = traceIfFalse "expected 42" $ (boolx == True && boolx == booly)

1 Answer 1


You need to use the OverloadedStrings Haskell extension.

Add {-# LANGUAGE OverloadedStrings #-} to the top of your file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.