Skip to content

Commit

Permalink
Clean up project representation
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Nov 14, 2023
1 parent 3b40089 commit 67488d2
Show file tree
Hide file tree
Showing 14 changed files with 272 additions and 812 deletions.
2 changes: 0 additions & 2 deletions elm-watch.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
"src/Code/Namespace.elm",
"src/Code/Namespace/NamespaceRef.elm",
"src/Code/Perspective.elm",
"src/Code/Project.elm",
"src/Code/Project/ProjectRef.elm",
"src/Code/BranchRef.elm",
"src/Code/ProjectListing.elm",
"src/Code/Syntax.elm",
Expand Down
8 changes: 3 additions & 5 deletions elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,16 @@
"Code.Finder",
"Code.FullyQualifiedName",
"Code.FullyQualifiedNameSet",
"Code.Project",
"Code.ProjectListing",
"Code.Project.Release",
"Code.Version",
"Code.Project.ProjectRef",
"Code.ProjectListing",
"Code.Project.ProjectName",
"Code.Project.ProjectSlug",
"Code.Hash",
"Code.HashQualified",
"Code.Hashvatar",
"Code.EmptyState",
"Code.Namespace",
"Code.Perspective",
"Code.Project",
"Code.ReadmeCard",
"Code.Syntax",
"Code.UrlParsers",
Expand Down
11 changes: 5 additions & 6 deletions src/Code/Branch.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module Code.Branch exposing (..)

import Code.BranchRef as BranchRef exposing (BranchRef)
import Code.Hash as Hash exposing (Hash)
import Code.Project as Project exposing (Project)
import Json.Decode as Decode
import Json.Decode.Pipeline exposing (required)
import UI.DateTime as DateTime exposing (DateTime)
Expand All @@ -17,12 +16,12 @@ type alias Branch b =
}


type alias BranchSummary =
Branch { project : Project {} }
type alias BranchSummary p =
Branch { project : p }


decodeSummary : Decode.Decoder BranchSummary
decodeSummary =
decodeSummary : Decode.Decoder p -> Decode.Decoder (BranchSummary p)
decodeSummary projectDecoder =
let
makeBranch branchRef project createdAt updatedAt causalHash =
{ ref = branchRef
Expand All @@ -34,7 +33,7 @@ decodeSummary =
in
Decode.succeed makeBranch
|> required "branchRef" BranchRef.decode
|> required "project" Project.decode
|> required "project" projectDecoder
|> required "createdAt" DateTime.decode
|> required "updatedAt" DateTime.decode
|> required "causalHash" Hash.decode
240 changes: 0 additions & 240 deletions src/Code/Project.elm

This file was deleted.

Loading

0 comments on commit 67488d2

Please sign in to comment.