Skip to content
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

module system #3

Open
mizunashi-mana opened this issue Jan 24, 2020 · 2 comments
Open

module system #3

mizunashi-mana opened this issue Jan 24, 2020 · 2 comments

Comments

@mizunashi-mana
Copy link
Owner

  • hierarchical module
  • internal module
  • module alias
import Data.Text as Text

is an alias of

import Data.Text
module Text = Data.Text
@mizunashi-mana
Copy link
Owner Author

mizunashi-mana commented Jan 28, 2020

  • nominal subtyping and structural type checking
  • support inheritance
record C1 a = {
  method1: a -> a,
}
module A1: C1 Int begin
  method1: Int -> Int
  method1 x = x
end

record C2 a = {
  method2: a -> a
} with (
  C1 a,
)
module A2
with A1
begin
  method2 x = method1 x
end

@mizunashi-mana
Copy link
Owner Author

type family may be replaced by first class (higher-order) module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant