alpaca-lang / alpaca

Functional programming inspired by ML for the Erlang VM
Other
1.44k stars 47 forks source link

alias module name #237

Open lpil opened 6 years ago

lpil commented 6 years ago

Hello!

When we've got lots of lovely Alpaca modules out in the world I could see it being handy to have a way of aliasing a module name so that it can used in a qualified sense without lots of typing.

alias my_cool_framework_special_set_type as cool_set

let x =
  cool_set.new [1, 2]

Carried over from : https://github.com/alpaca-lang/alpaca/issues/221#issuecomment-354863150

j14159 commented 6 years ago

I like it but it will be relatively low priority on my personal task list for the next little while (happy if someone else picks it up).

Is there a way we can make it more clear that a module is being aliased? Do we need/want the ability to do this for other things (like types) or would that get too messy? Some minor concerns with how we annotate compiled output/report on errors as well.