Commit 8163f871 authored by Björn Peemöller 's avatar Björn Peemöller

Added test cases for export check

parent e4dd0d3f
module ExportAmbiguousErrors (Bool, Prelude.Bool, not, Prelude.not) where
import Prelude
module Bool where
data Bool = False | True
......
module ExportError (module Foo) where
-- Should issue the following error:
--
-- test/exportcheck/AmbiguousName.curry, line 9.23:
-- Ambiguous name `not'
-- It could refer to:
-- `Prelude.not'
-- `Bool.not'
--
module AmbiguousName (not) where
import Bool
-- Should issue the following error:
--
-- test/exportcheck/AmbiguousType.curry, line 9.23:
-- Ambiguous type `Bool'
-- It could refer to:
-- `Prelude.Bool'
-- `Bool.Bool'
--
module AmbiguousType (Bool ()) where
import Bool
-- Should issue the following error:
--
-- test/exportcheck/ModuleNotImported.curry, line 6.34:
-- Module `Foo' not imported
--
module ModuleNotImported (module Foo) where
-- Should issue the following error:
--
-- test/exportcheck/MultipleName.curry, line 8.22:
-- Multiple exports of name `not' at:
-- line 8.22
-- line 8.32
--
module MultipleName (Bool.not, Prelude.not) where
import qualified Bool
-- Should issue the following error:
--
-- test/exportcheck/MultipleType.curry, line 8.22:
-- Multiple exports of type `Bool' at:
-- line 8.22
-- line 8.33
--
module MultipleType (Bool.Bool, Prelude.Bool) where
import qualified Bool
-- Should issue the following error:
--
-- test/exportcheck/NoDataType.curry, line 6.20:
-- `Foo' is not a data type
--
module NoDataType (Foo ()) where
type Foo a = a
-- Should issue the following error:
--
-- test/exportcheck/OutsideTypeConstructor.curry, line 7.32:
-- Data constructor `False' outside type export in export list
-- Use `Prelude.Bool (False)' instead
--
module OutsideTypeConstructor (False) where
-- Should issue the following error:
--
-- test/exportcheck/OutsideTypeLabel.curry, line 7.26:
-- Label `value' outside type export in export list
-- Use `OutsideTypeLabel.Id (value)' instead
--
module OutsideTypeLabel (value) where
data Id a = Id { value :: a }
-- Should issue the following error:
--
-- test/exportcheck/UndefinedElement.curry, line 6.32:
-- `foo' is not a constructor or label of type `Bool'
--
module UndefinedElement (Bool (foo)) where
-- Should issue the following error:
--
-- test/exportcheck/UndefinedName.curry, line 6.23:
-- Undefined name `foo' in export list
--
module UndefinedName (foo) where
-- Should issue the following error:
--
-- test/exportcheck/UndefinedType.curry, line 6.23:
-- Undefined Type `Foo' in export list
--
module UndefinedType (Foo ()) where
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment