diff options
Diffstat (limited to 'src/Wordle.hs')
-rw-r--r-- | src/Wordle.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Wordle.hs b/src/Wordle.hs new file mode 100644 index 0000000..d722ffa --- /dev/null +++ b/src/Wordle.hs @@ -0,0 +1,21 @@ +{-# LANGUAGE ExistentialQuantification, RankNTypes, GADTs #-} +module Wordle where + +import Data.Set (Set) +import qualified Data.Set as Set + +data Environment = Environment { + wordLength :: Int, + wordList :: Set String +} + +newtype Hints = Hints [(Char, Hint)] + +data Hint = Correct | Contains | DoesNotContain + +data AI where + AI :: forall s. { + internalState :: s, + guessWord :: s -> Environment -> IO String, + updateHints :: s -> Hints -> IO s + } -> AI |