Created
January 29, 2022 11:12
-
-
Save DigitalBrains1/b9ff10af0379f061d059e8c733b9e8e5 to your computer and use it in GitHub Desktop.
Revisions
-
DigitalBrains1 created this gist
Jan 29, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ 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 hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ [...]/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: ^