So I have two union types: JobStatus
and TaskStatus
.
module Data.Job exposing (..)
type JobStatus
= Submitted
| Started
| Finished
-
module Data.Task exposing (..)
type TaskStatus
= Created
| Running
| Finished
and I import them into a third module
module Home exposing (..)
import Data.Job as Job exposing (JobStatus(..))
import Data.Task as Task exposing (TaskStatus(..))
type alias Model =
{ jobStatus : JobStatus
, taskStatus : TaskStatus
}
model : Model
model =
{ jobStatus = Finished
, taskStatus = Finished
}
But Finished
is too confusing, I want to write it as JobStatus.Finished
or TaskStatus.Finished
how can I do that?
if you changed your import from this
import Data.Job as Job exposing (JobStatus(..))
import Data.Task as Task exposing (TaskStatus(..))
to this
import Data.Job as Job
import Data.Task as Task
you can use Job.Finished and Task.Finished.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With