Created
January 29, 2022 11:12
-
-
Save DigitalBrains1/b9ff10af0379f061d059e8c733b9e8e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DocTest where | |
-- | Problematic doctest example 1 | |
-- | |
-- >>> x = 1 | |
-- >>> :{ | |
-- x | |
-- :} | |
-- 1 | |
-- >>> x | |
-- 1 | |
f :: Int | |
f = 1 | |
-- | Problematic doctest example 2 | |
-- | |
-- >>> :{ | |
-- x = 1 | |
-- :} | |
-- >>> x | |
-- 1 | |
g :: Int | |
g = 1 | |
-- | Working doctest example 1 | |
-- | |
-- >>> x = 1 | |
-- >>> :{ | |
-- x | |
-- :} | |
-- 1 | |
-- | |
-- >>> x | |
-- 1 | |
h :: Int | |
h = 1 | |
-- | Working doctest example 2 | |
-- | |
-- >>> :{ | |
-- x = 1 | |
-- :} | |
-- | |
-- >>> x | |
-- 1 | |
j :: Int | |
j = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...]/DocTest.hs:6: failure in expression `:{ | |
x | |
:}' | |
expected: 1 | |
>>> x | |
1 | |
but got: 1 | |
^ | |
[...]/DocTest.hs:17: failure in expression `:{ | |
x = 1 | |
:}' | |
expected: >>> x | |
1 | |
but got: ^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment