Last active
January 3, 2016 20:09
-
-
Save benkolera/8512776 to your computer and use it in GitHub Desktop.
Two questions about GHC warnings
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
-- 1) Is there way to get a warning if you aren't being explicit with your imports and exports? | |
-- OK: | |
module Foo (bar) where | |
import Foo (bar) | |
import qualified Foo as F | |
-- Warnings: | |
module Foo where | |
import Foo | |
--------------------------------------------------------------------------------------------- | |
-- 2) Is there a way to loosen -fwarn-missing-signatures so it'd only warn if the function | |
-- was exported from a module? | |
module Foo (bar) where | |
-- OK: | |
internalFunc = 1 + | |
bar :: Num a => [a] -> [a] | |
bar = map internalFunc | |
-- Warning: | |
bar = map (1+) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment