Skip to content

Instantly share code, notes, and snippets.

@paluh
Forked from anonymous/Main.purs
Last active December 9, 2021 19:50
Show Gist options
  • Save paluh/2dbdf649d3d4e39ccc2859bd935b9139 to your computer and use it in GitHub Desktop.
Save paluh/2dbdf649d3d4e39ccc2859bd935b9139 to your computer and use it in GitHub Desktop.
Published with try.purescript.org
module Main where
import TryPureScript (p, text, render)
import Prelude
import Data.Generic.Rep (class Generic)
import Data.Show.Generic (genericShow)
data Route = Home | Users String | User Int | NotFound String
derive instance genericRoute :: Generic Route _
instance showRoute :: Show Route where
show (Users u) = "CusomUsersShow " <> u
show r = genericShow r
main = render (p (text (show (User 8))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment