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"