From ae31090a466361f616ca78c685612853ea74d50b Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sun, 19 Apr 2020 19:02:25 +0100 Subject: [PATCH] Remove unused Msg's I'm sure this app contains more unused code. I would like to find some Elm tools for detecting and deleting dead code, but this isn't my current priority. My current priority is dogfooding this app until I find it genuinely useful for myself. --- .../sandbox/learnpianochords/src/State.elm | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/website/sandbox/learnpianochords/src/State.elm b/website/sandbox/learnpianochords/src/State.elm index 764c8b256..6cb89d8d1 100644 --- a/website/sandbox/learnpianochords/src/State.elm +++ b/website/sandbox/learnpianochords/src/State.elm @@ -12,8 +12,6 @@ type Msg | Pause | SetTempo String | ToggleInversion Theory.ChordInversion - | ToggleChordType Theory.ChordType - | TogglePitchClass Theory.PitchClass | ToggleKey Theory.Key | DoNothing | SetView View @@ -125,29 +123,6 @@ update msg model = , Cmd.none ) - ToggleChordType chordType -> - let - chordTypes = - if List.member chordType model.whitelistedChordTypes then - List.filter ((/=) chordType) model.whitelistedChordTypes - - else - chordType :: model.whitelistedChordTypes - in - ( { model - | whitelistedChordTypes = chordTypes - , whitelistedChords = - Theory.allChords - { start = model.firstNote - , end = model.lastNote - , inversions = model.whitelistedInversions - , chordTypes = chordTypes - , pitchClasses = model.whitelistedPitchClasses - } - } - , Cmd.none - ) - ToggleInversion inversion -> let inversions = @@ -167,29 +142,6 @@ update msg model = , Cmd.none ) - TogglePitchClass pitchClass -> - let - pitchClasses = - if List.member pitchClass model.whitelistedPitchClasses then - List.filter ((/=) pitchClass) model.whitelistedPitchClasses - - else - pitchClass :: model.whitelistedPitchClasses - in - ( { model - | whitelistedPitchClasses = pitchClasses - , whitelistedChords = - Theory.allChords - { start = model.firstNote - , end = model.lastNote - , inversions = model.whitelistedInversions - , chordTypes = model.whitelistedChordTypes - , pitchClasses = pitchClasses - } - } - , Cmd.none - ) - ToggleKey key -> let keys =