blob: 51b5fc67d42aa3e6e5629ce02c3c65392d175855 (
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 Persona
( Operation(..)
, operations
, fromString
, toString
) where
type Operation =
NoOp
| SignIn
| SignOut
operations : Signal.Mailbox Operation
operations = Signal.mailbox NoOp
fromString : String -> Operation
fromString str =
case str of
"SignIn" -> SignIn
"SignOut" -> SignOut
_ -> NoOp
toString : Operation -> String
toString operation =
case operation of
SignIn -> "SignIn"
SignOut -> "SignOut"
_ -> "NoOp"
|