mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 10:58:26 +00:00
Using elm-format for all files
This commit is contained in:
@ -1,25 +1,43 @@
|
||||
module Data.Priority exposing (..)
|
||||
module Data.Priority exposing
|
||||
( Priority(..)
|
||||
, all
|
||||
, fromString
|
||||
, toName
|
||||
)
|
||||
|
||||
|
||||
type Priority
|
||||
= High
|
||||
| Low
|
||||
|
||||
fromString: String -> Maybe Priority
|
||||
|
||||
fromString : String -> Maybe Priority
|
||||
fromString str =
|
||||
let
|
||||
s = String.toLower str
|
||||
s =
|
||||
String.toLower str
|
||||
in
|
||||
case s of
|
||||
"low" -> Just Low
|
||||
"high" -> Just High
|
||||
_ -> Nothing
|
||||
case s of
|
||||
"low" ->
|
||||
Just Low
|
||||
|
||||
toName: Priority -> String
|
||||
"high" ->
|
||||
Just High
|
||||
|
||||
_ ->
|
||||
Nothing
|
||||
|
||||
|
||||
toName : Priority -> String
|
||||
toName lang =
|
||||
case lang of
|
||||
Low -> "Low"
|
||||
High-> "High"
|
||||
Low ->
|
||||
"Low"
|
||||
|
||||
all: List Priority
|
||||
High ->
|
||||
"High"
|
||||
|
||||
|
||||
all : List Priority
|
||||
all =
|
||||
[ Low, High ]
|
||||
|
Reference in New Issue
Block a user