Skip to content

Commit

Permalink
refactor: emptyModel, use explicit fields
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Dec 28, 2023
1 parent 9fafb00 commit f619f65
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion emanote/src/Emanote/Model/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,23 @@ withRoutePrism enc Model {..} =

emptyModel :: Set Loc -> Ema.CLI.Action -> EmanotePandocRenderers Model LMLRoute -> Bool -> UUID -> Stork.IndexVar -> ModelEma
emptyModel layers act ren ctw instanceId storkVar =
Model Status_Loading layers act (Const ()) ren ctw instanceId Ix.empty Ix.empty Ix.empty Ix.empty mempty def storkVar mempty
Model
{ _modelStatus = Status_Loading
, _modelLayers = layers
, _modelEmaCLIAction = act
, _modelRoutePrism = Const ()
, _modelPandocRenderers = ren
, _modelCompileTailwind = ctw
, _modelInstanceID = instanceId
, _modelNotes = Ix.empty
, _modelRels = Ix.empty
, _modelSData = Ix.empty
, _modelStaticFiles = Ix.empty
, _modelTasks = Ix.empty
, _modelHeistTemplate = def
, _modelStorkIndex = storkVar
, _modelFolgezettelTree = mempty
}

modelReadyForView :: ModelT f -> ModelT f
modelReadyForView =
Expand Down

0 comments on commit f619f65

Please sign in to comment.