Skip to content

Instantly share code, notes, and snippets.

@benkolera
Last active January 3, 2016 20:09
Show Gist options
  • Save benkolera/8512776 to your computer and use it in GitHub Desktop.
Save benkolera/8512776 to your computer and use it in GitHub Desktop.
Two questions about GHC warnings
-- 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