New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error when 'open'ing a module aliased to a functor #829

Merged
merged 2 commits into from Oct 7, 2016

Conversation

Projects
None yet
1 participant
@alainfrisch
Contributor

alainfrisch commented Sep 27, 2016

Consider:

    module F(X : sig end) = struct end
    module G = F
    open G

Before this PR:

Error: This module is not a structure; it has type (module F)

After:

Error: This module is not a structure; it has type
       functor (X : sig  end) -> sig  end

alainfrisch added some commits Sep 27, 2016

Better error when 'open'ing a module aliased to a functor.
Consider:

    module F(X : sig end) = struct end
    module G = F
    open G

Before this PR:

   Error: This module is not a structure; it has type (module F)

After:

   Error: This module is not a structure; it has type
          functor (X : sig  end) -> sig  end

@alainfrisch alainfrisch merged commit 9449316 into ocaml:trunk Oct 7, 2016

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

camlspotter pushed a commit to camlspotter/ocaml that referenced this pull request Oct 17, 2017

Better error when 'open'ing a module aliased to a functor (#829)
Better error when 'open'ing a module aliased to a functor.

Consider:

    module F(X : sig end) = struct end
    module G = F
    open G

Before this PR:

   Error: This module is not a structure; it has type (module F)

After:

   Error: This module is not a structure; it has type
          functor (X : sig  end) -> sig  end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment