mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
Using elm-format for all files
This commit is contained in:
@ -1,24 +1,41 @@
|
||||
module Data.SourceState exposing (..)
|
||||
module Data.SourceState exposing
|
||||
( SourceState(..)
|
||||
, all
|
||||
, fromString
|
||||
, toString
|
||||
)
|
||||
|
||||
|
||||
type SourceState
|
||||
= Active
|
||||
| Disabled
|
||||
|
||||
fromString: String -> Maybe SourceState
|
||||
|
||||
fromString : String -> Maybe SourceState
|
||||
fromString str =
|
||||
case String.toLower str of
|
||||
"active" -> Just Active
|
||||
"disabled" -> Just Disabled
|
||||
_ -> Nothing
|
||||
"active" ->
|
||||
Just Active
|
||||
|
||||
all: List SourceState
|
||||
"disabled" ->
|
||||
Just Disabled
|
||||
|
||||
_ ->
|
||||
Nothing
|
||||
|
||||
|
||||
all : List SourceState
|
||||
all =
|
||||
[ Active
|
||||
, Disabled
|
||||
]
|
||||
|
||||
toString: SourceState -> String
|
||||
|
||||
toString : SourceState -> String
|
||||
toString dir =
|
||||
case dir of
|
||||
Active -> "Active"
|
||||
Disabled -> "Disabled"
|
||||
Active ->
|
||||
"Active"
|
||||
|
||||
Disabled ->
|
||||
"Disabled"
|
||||
|
Reference in New Issue
Block a user