1-- Tests that instances for non-exported classes / types do not appear in the
2-- result of `exportedDeclarations`.
11import Control.Monad.Eff.Console (log)
13data Const a b = Const a
18data NonexportedType = NonexportedType
20class NonexportedClass a where
23-- There are three places that a nonexported type or type class can occur,
24-- leading an instance to count as non-exported:
26-- * The type class itself
27-- * The instance types
30instance nonExportedFoo :: (NonexportedClass a) => Foo a where
33-- Another instance of case 1:
34instance nonExportedFoo2 :: (Foo NonexportedType) => Foo (a -> a) where
38instance nonExportedNonexportedType :: NonexportedClass (Const Int a) where
41-- Case 3: instance types
42instance constFoo :: Foo (Const NonexportedType b) where
43 foo = Const NonexportedType
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list