Skip to content

Instantly share code, notes, and snippets.

@nwolverson
Forked from hdgarrood/DataTypes.purs
Created December 17, 2017 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwolverson/f94772a141c68178acb09b68f4d41cbd to your computer and use it in GitHub Desktop.
Save nwolverson/f94772a141c68178acb09b68f4d41cbd to your computer and use it in GitHub Desktop.
.
module DataTypes where
data Foo = Foo
mkFoo = Foo
data Bar = Bar
data Baz = Baz1 | Baz2
module HidingImport where
import Prelude
import Data.Maybe hiding (fromMaybe)
foo :: Maybe Unit
foo = Just unit
module ImplicitImport where
import Prelude
import Data.Maybe
foo :: Maybe Unit
foo = Just unit
module ImplicitQualifiedImport where
import Prelude
import Data.Array as M
import Data.Maybe as M
foo :: M.Maybe Unit
foo = M.Just unit
module UnusedDctorExplicitImport where
import Prelude
import DataTypes (Foo(..), Baz(Baz1, Baz2))
myfoo :: Foo
myfoo = Foo
mybaz :: Baz
mybaz = Baz2
module UnusedDctorExplicitImportRetainsDctor where
import Prelude
import DataTypes (Foo(Foo), Baz(Baz1, Baz2))
myfoo :: Foo
myfoo = Foo
mybaz :: Baz
mybaz = Baz2
module UnusedDctorImport where
import Prelude
import DataTypes (Foo(..), mkFoo, Bar(..))
foo :: Foo
foo = mkFoo
bar :: Bar
bar = Bar
module UnusedDctorImportRetainsDctor where
import Prelude
import DataTypes (Foo(..), mkFoo, Bar(Bar))
foo :: Foo
foo = mkFoo
bar :: Bar
bar = Bar
module UnusedExplicitImport where
import Data.Maybe (Maybe(..), fromMaybe)
foo :: Maybe Int
foo = Just 3
module UnusedExplicitImportRetainsDctor where
import Data.Maybe (Maybe(Just), fromMaybe)
foo :: Maybe Int
foo = Just 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment