--- /dev/null
+{-# OPTIONS_GHC -Wall #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+
+module Scrabble where
+
+import Data.Monoid
+
+newtype Score = Score Int
+ deriving (Eq, Ord, Show, Num)
+
+getScore :: Score -> Int
+getScore (Score i) = i
+
+instance Monoid Score where
+ mempty = Score 0
+ mappend = (+)
+
+-- tile scoring rules as in http://www.thepixiepit.co.uk/scrabble/rules.html
+score :: Char -> Score
+score c | c `elem` "aeilnorstuAEILNORSTU" = 1
+ | c `elem` "dgDG" = 2
+ | c `elem` "bcmpBCMP" = 3
+ | c `elem` "fhvwyFHVWY" = 4
+ | c `elem` "kK" = 5
+ | c `elem` "jJxX" = 8
+ | c `elem` "qQzZ" = 10
+ | otherwise = 0
+
+scoreString :: String -> Score
+scoreString s = foldr mappend mempty (map score s)