Skip to content

Commit

Permalink
Support chords written in upper case
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed Nov 20, 2023
1 parent ea8eac4 commit c73c423
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import Protolude as P (

import Data.List.Index (imap, setAt)
import Data.Map.Strict as Map (Map, fromList, lookup)
import Data.Text as Text (Text, intercalate, pack)
import Data.Text as Text (Text, intercalate, pack, toLower)

import GeneralTypes (
Interval (..),
Expand Down Expand Up @@ -141,7 +141,7 @@ chordToPlayedInsts chord instrument =
maybeInst = do
frettings <-
archaicToFretting
& Map.lookup (mapChordToHarmonicEquivalent chord)
& Map.lookup (chord & toLower & mapChordToHarmonicEquivalent)
pure $ fmap instrument frettings
errorMessage =
"There is no fretting available for the specified chord"
Expand Down

0 comments on commit c73c423

Please sign in to comment.