-
Notifications
You must be signed in to change notification settings - Fork 14
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
Inline imports #10
Inline imports #10
Conversation
cc @rtfeldman since this was your idea. |
I changed my mind. I think this is better than having a special prefix for imports. I also think it's better than the current implementation. It's more obvious what modules are used for the examples and it allows to use special dev-modules. |
@eeue56 any thoughts about this? |
@stoeffel I think something that would be extra helpful would be the ability to define variables too in a let binding |
Will think about that, but I would open a new pr for that. Will create an issue for let binding. |
I opened an issue for that #11 |
I wonder if we should allow: {-|
>>> import MyModule exposing
... ( foo
... , bar
... )
-} |
I'd say default to no and see if people request it.
…On Wed, Nov 30, 2016, 11:01 AM Christoph Hermann ***@***.***> wrote:
I wonder if we should allow:
{-| >>> import MyModule exposing ... ( foo ... , bar ... )-}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABCxwMP2VsDUceNB-Qf11eY7idhbPuaSks5rDcgkgaJpZM4K-EjQ>
.
|
multiline for variables and the "test" is something I've needed - for
modules, probably will too. see here ->
https://github.com/eeue56/elm-lint/blob/master/src/Rules/Breakdown.elm#L14
On Wed, Nov 30, 2016 at 10:34 PM, Richard Feldman <notifications@github.com>
wrote:
… I'd say default to no and see if people request it.
On Wed, Nov 30, 2016, 11:01 AM Christoph Hermann ***@***.***
>
wrote:
> I wonder if we should allow:
>
> {-| >>> import MyModule exposing ... ( foo ... , bar ... )-}
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#10 (comment)
>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABCxwMP2VsDUceNB-
Qf11eY7idhbPuaSks5rDcgkgaJpZM4K-EjQ>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABFh_pq58mGbLD_15HSuE4XZyisKMYo0ks5rDfn2gaJpZM4K-EjQ>
.
--
Cheers,
Noah
noah@astraldynamics.co.uk
Astral Dynamics Cyf
Festri Cefn Y Waen, Deiniolen, Caernarfon, Gwynedd LL55 3NB
Company number 07726862
Registered in England and Wales
|
@eeue56 you can already do: {-|
>>> indexOfLineWithEquals
... <| Array.fromList
... <| String.lines "a\nb\nc = d\nf = d\n"
2
-}
see example here https://github.com/stoeffel/elm-doc-test/blob/master/example/Mock.elm#L59 |
The I get the argument for Compare: {-|
>>> indexOfLineWithEquals
... <| Array.fromList
... <| String.lines "a\nb\nc = d\nf = d\n"
2
-} {-|
> indexOfLineWithEquals
| <| Array.fromList
| <| String.lines "a\nb\nc = d\nf = d\n"
2
-} |
hmmm... will think about it. maybe we should do an other poll. |
it doesn't feel noisy to me though. it's how Python and elixir does it too |
I actually think |
Other alternatives: {-|
> indexOfLineWithEquals
# <| Array.fromList
# <| String.lines "a\nb\nc = d\nf = d\n"
2
-} {-|
> indexOfLineWithEquals
~ <| Array.fromList
~ <| String.lines "a\nb\nc = d\nf = d\n"
2
-} {-|
> indexOfLineWithEquals
\ <| Array.fromList
\ <| String.lines "a\nb\nc = d\nf = d\n"
2
-} |
Also reminded of this because I saw @ento use the |
@rtfeldman thanks for the input. I created an issue to discuss syntax changes there, because it's unrelated to wether or not we inline imports. #12 @eeue56 @rtfeldman are you okay with inlining imports or is anyone opposed? |
I definitely think sticking with seems good to me |
reminder for @stoeffel: merge this tomorrow and publish new version |
not sure if I'm happy with this yet, though. maybe it should have it's own prefix.
see
example/Mock.elm
closes #7 #1