Using elm-format for all files

This commit is contained in:
Eike Kettner
2019-12-29 21:55:12 +01:00
parent 546f1a6ee3
commit 2001cca88b
84 changed files with 7668 additions and 5079 deletions

View File

@ -1,24 +1,41 @@
module Data.UserState exposing (..)
module Data.UserState exposing
( UserState(..)
, all
, fromString
, toString
)
type UserState
= Active
| Disabled
fromString: String -> Maybe UserState
fromString : String -> Maybe UserState
fromString str =
case String.toLower str of
"active" -> Just Active
"disabled" -> Just Disabled
_ -> Nothing
"active" ->
Just Active
all: List UserState
"disabled" ->
Just Disabled
_ ->
Nothing
all : List UserState
all =
[ Active
, Disabled
]
toString: UserState -> String
toString : UserState -> String
toString dir =
case dir of
Active -> "Active"
Disabled -> "Disabled"
Active ->
"Active"
Disabled ->
"Disabled"