tracks/haskell/exercises/alphametics/examples/success-standard/src/Alphametics.hs in trackler-2.2.1.59 vs tracks/haskell/exercises/alphametics/examples/success-standard/src/Alphametics.hs in trackler-2.2.1.60

- old
+ new

@@ -1,9 +1,10 @@ {-# LANGUAGE GADTs #-} module Alphametics (solve) where import Control.Monad (guard) +import Data.Functor (($>)) import Data.List (foldl', find, union) import Data.Maybe (fromJust, isJust, listToMaybe) import Prelude hiding (Word) import Text.Parsec import Text.Parsec.String @@ -107,10 +108,10 @@ word :: Parser (Term Integer) word = Word <$> many1 upper plus :: Parser (Term Integer -> Term Integer -> Term Integer) -plus = trimmed (char '+') *> pure Plus +plus = trimmed (char '+') $> Plus trimmed :: Parser a -> Parser a trimmed p = spaces *> p <* spaces