Skip to content

Commit

Permalink
Remove more unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
miniBill committed May 11, 2024
1 parent 9e39456 commit d8a32b5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
1 change: 0 additions & 1 deletion src/Elm/Case.elm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ import Elm.Syntax.TypeAnnotation as Annotation
import Internal.Arg
import Internal.Branch as Branch exposing (Branch, Pattern(..))
import Internal.Compiler as Compiler
import Internal.Format as Format
import Internal.Index as Index


Expand Down
22 changes: 1 addition & 21 deletions src/Internal/Branch.elm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Internal.Branch exposing (Branch, Pattern(..), map, pattern)
module Internal.Branch exposing (Branch, Pattern(..))

import Elm exposing (Expression)
import Elm.Syntax.Pattern
Expand All @@ -12,23 +12,3 @@ type alias Branch =

type Pattern a
= Branch (Index.Index -> ( Index.Index, Elm.Syntax.Pattern.Pattern, a ))


pattern : Elm.Syntax.Pattern.Pattern -> a -> Pattern a
pattern patt val =
Branch
(\index ->
( index, patt, val )
)


map : (a -> b) -> Pattern a -> Pattern b
map fn (Branch branch) =
Branch
(\index ->
let
( newIndex, patt, val ) =
branch index
in
( newIndex, patt, fn val )
)

0 comments on commit d8a32b5

Please sign in to comment.