And in fact you can't even do:

    type JSON = Pipeline'Stage'Worker'Globl'Value'JSON

    case ... of
        JSON -> ...

Because you're giving an alias to the *type*, not the variant tag.
Haskell has a PatternSynonyms extension that I've not used heavily, but
Elm doesn't give you anything to work with here.

-Ian

Quoting 'Kenton Varda' via Cap'n Proto (2019-05-31 19:10:18)
>    On Fri, May 31, 2019 at 2:54 PM David Renshaw <[1][email protected]>
>    wrote:
>
>    Note that Prasanth's example aliases a module that's at an intermediate
>    point in the nested hierarchy. I doubt that Haskell would let you do
>    something like:
>    �  type Global = Pipeline'Stage'Worker'Global;
>    �  ...
>    �  case Global'Value'JSON: ...
>    �  case Global'Value'NUMBER: ...
>
>    Oh duh, good point... When the namespace is flattened, aliases only
>    shorten the specific declaration aliased and not all of its nested
>    declarations.
>    Yeah I guess that's tough...
>    -Kenton
>
>    --
>    You received this message because you are subscribed to the Google
>    Groups "Cap'n Proto" group.
>    To unsubscribe from this group and stop receiving emails from it, send
>    an email to [2][email protected].
>    Visit this group at [3]https://groups.google.com/group/capnproto.
>    To view this discussion on the web visit
>    [4]https://groups.google.com/d/msgid/capnproto/CAJouXQkbbtky0PLWJCc%3D3
>    GmjHvsxbZK9TtGAfBhCRxr%2BSyF%2B0Q%40mail.gmail.com.
>
> Verweise
>
>    1. mailto:[email protected]
>    2. mailto:[email protected]
>    3. https://groups.google.com/group/capnproto
>    4. 
> https://groups.google.com/d/msgid/capnproto/CAJouXQkbbtky0PLWJCc%3D3GmjHvsxbZK9TtGAfBhCRxr%2BSyF%2B0Q%40mail.gmail.com?utm_medium=email&utm_source=footer

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/155934622578.23582.8491772830784078977%40localhost.localdomain.

Reply via email to