Closed yigitozkavci closed 6 years ago
@yigitozkavci Thanks for working on this.
There is a warning introduced with this PR:
warning: [-Wunused-imports] The qualified import of ‘Data.Map’ is redundant except perhaps to import instances from ‘Data.Map’ To import instances alone, use: import Data.Map()
Even though I use it for Doctest, I get this warning. I see we didn't use a non-prelude library for our doctests before, but I want to handle a case with Map since @igrep noticed the bug with that data structure.
We can overcome this warning with {-# OPTIONS_GHC -fno-warn-unused-imports #-} pragma on this module. What do you think?
You should be able to import modules within the doctests.
Here's an example doctest showing this:
>>> import Data.List (nub)
>>> nub [1,2,3,1,1,1]
>>> [1,2,3]
Although, I don't necessarily think it is that important to use Data.Map
. If you just want to use something like a list to write the tests, I think that should be fine as well.
That's perfect, first time using doctest, that's why :) Did the necessary changes 👍
Okay, thanks. I'll merge this when the tests pass.
Also, I didn't add the @since
annotations since I don't know the next release version. Can you add those? @cdepillabout
Fixes #19
Summary
This PR adds
NoColor
counterparts of trace functions, and implement tests on them (because testing colored output is awkward).Notes
@cdepillabout There is a warning introduced with this PR:
Even though I use it for Doctest, I get this warning. I see we didn't use a non-prelude library for our doctests before, but I want to handle a case with
Map
since @igrep noticed the bug with that data structure.We can overcome this warning with
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
pragma on this module. What do you think?