Hi,
In my code, I'm doing this:
## Elements Types
@docs Node
Which gets compiled to:
Elements Types
type alias Node
type alias Node msg =
Html msg
type FlexItem msg
= FlexItem (Node msg)
extractNodeInFlexItem : FlexItem msg -> Node msg
extractNodeInFlexItem (FlexItem item) =
item
type GridItem msg
= GridItem (Node msg)
extractNodeInGridItem : GridItem msg -> Node msg
extractNodeInGridItem (GridItem item) =
item
type Option msg
= Option (Html msg)
extractOption : Option msg -> Html msg
extractOption (Option option) =
option
text : String -> Node msg
text =
Html.text
none : Node msg
none =
text ""
br : Node msg
br =
Html.br [] []
program :
{ init : ( model, Cmd msg )
, subscriptions : model -> Sub msg
, update : msg -> model -> ( model, Cmd msg )
, view : model -> Html msg
}
The main type of BodyBuilder. It is an alias to Html, in order to keep
perfect backward compatibility.
That's weird because it shows every functions using it (I understand the design choice), but including the not exposed functions. To me, it adds useless informations to the user: i.e. in my example, as a user, I don't care about extractNodeInFlexItem, because it is an internal. It is the same in the FlexItem type: it is an opaque type, and the docs show the content. It is confusing because if I'm trying to use the inside type, I can't.
IMO, the docs should only generates the docs above the elm function by default, and allowing to include all exposed functions (or all functions) using it if needed, for internal docs for instance as an option.
What do you think?
Hi,
In my code, I'm doing this:
Which gets compiled to:
Elements Types
type alias Node
The main type of BodyBuilder. It is an alias to Html, in order to keep
perfect backward compatibility.
That's weird because it shows every functions using it (I understand the design choice), but including the not exposed functions. To me, it adds useless informations to the user: i.e. in my example, as a user, I don't care about
extractNodeInFlexItem, because it is an internal. It is the same in the FlexItem type: it is an opaque type, and the docs show the content. It is confusing because if I'm trying to use the inside type, I can't.IMO, the docs should only generates the docs above the elm function by default, and allowing to include all exposed functions (or all functions) using it if needed, for internal docs for instance as an option.
What do you think?