style: format code

This commit is contained in:
wi11-holdsworth 2025-09-24 12:17:28 +10:00
parent f49eba9676
commit 3654485f23
2 changed files with 23 additions and 22 deletions

View file

@ -1,26 +1,31 @@
--Implement your solution here
--SEE THE PROJECT CODING GUIDELINES ON THE LMS FOR DETAILS OF
--THE CRITERIA THAT WILL BE EMPLOYED IN ASSESSING YOUR CODE.
--Please DELETE THIS WHOLE COMMENT, and write your own.
--
module Proj2 (Pitch, toPitch, feedback,
GameState, initialGuess, nextGuess) where
module Proj2
( Pitch,
toPitch,
feedback,
GameState,
initialGuess,
nextGuess,
)
where
type GameState = ()
data Pitch = Pitch { note :: Char
, octave :: Int
} deriving (Eq)
data Pitch = Pitch
{ note :: Char,
octave :: Int
}
deriving (Eq)
instance Show Pitch where
show (Pitch note octave) = [note] ++ show octave
show (Pitch note octave) = note : show octave
toPitch :: String -> Maybe Pitch
toPitch _ = Just (Pitch 'A' 1)
feedback :: [Pitch] -> [Pitch] -> (Int, Int, Int)
feedback _ _ = (0,0,0)
feedback _ _ = (0, 0, 0)
initialGuess :: ([Pitch], GameState)
initialGuess = ([Pitch 'A' 1], ())