aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Route.elm
blob: 8f8518f470a9d975f6b862198b2634c242e6c5d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module Route
  ( Route(..)
  , matchers
  , toPath
  ) where

import Effects exposing (Effects)

import RouteParser exposing (..)

type Route =
  Empty
  | Home
  | User

matchers : List (Matcher Route)
matchers =
  [ static Empty ""
  , static Home "/"
  , static User "/user"
  ]

toPath : Route -> String
toPath route =
  case route of
    Empty -> ""
    Home -> "/"
    User -> "/user"