Alex,  your use-case is way more interesting and useful than mine.

What I was trying to do was more like a simple rename.
I put the MainModel in a different file because it needed to be imported in
different places and I ended up with a circular dependency but I wanted to
keep referring to it as Model in the original location.



On Wed, Jun 22, 2016 at 11:57 PM, Alex Lew <[email protected]> wrote:

> This would be useful to have, especially if it worked on type aliases with
> type arguments:
>
> type alias Container a = { contents : a }
> type alias IntContainer = Container Int
>
> myContainer = IntContainer 3
>
> -- Or even this, which would require some decisions about how what order
> the
> -- record fields of `Managed Book` would be in.
> type alias Managed a = { a | managerId : Int }
> type alias Book = { title : String, author : String }
> type alias ManagedBook = Managed Book
>
> harryPotter = ManagedBook 50321 "Harry Potter" "JK Rowling"
>
>
> On Wednesday, June 22, 2016 at 4:05:04 AM UTC-4, Peter Damoc wrote:
>>
>> This does not work:
>>
>> type alias MainModel = { int : Int}
>>
>> type alias Model = MainModel
>>
>> init = Model 1
>>
>> and I'm wondering if this is a bug or the expected behavior.
>>
>>
>>
>>
>>
>>
>> --
>> There is NO FATE, we are the creators.
>> blog: http://damoc.ro/
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
There is NO FATE, we are the creators.
blog: http://damoc.ro/

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to