Permalink
Browse files

Add examples of recursive type aliases

  • Loading branch information...
1 parent 7c36113 commit e9b5223b6b62585198cedc0fefabffda86a50386 Evan Czaplicki committed Oct 27, 2015
Showing with 19 additions and 0 deletions.
  1. +13 −0 canonicalize/alias-mutually-recursive.elm
  2. +6 −0 canonicalize/alias-recursive.elm
@@ -0,0 +1,13 @@
+type alias Comment =
+ { message : String
+ , upvotes : Int
+ , downvotes : Int
+ , responses : Responses
+ }
+
+type alias Responses =
+ { sortBy : SortBy
+ , responses : List Comment
+ }
+
+type SortBy = Time | Score | MostResponses
@@ -0,0 +1,6 @@
+type alias Comment =
+ { message : String
+ , upvotes : Int
+ , downvotes : Int
+ , responses : List Comment
+ }

0 comments on commit e9b5223

Please sign in to comment.