{-# LANGUAGE MultiParamTypeClasses #-} module HaskellWorks.Data.Decode ( Decode(..) , DecodeError(..) ) where newtype DecodeError = DecodeError String deriving (DecodeError -> DecodeError -> Bool (DecodeError -> DecodeError -> Bool) -> (DecodeError -> DecodeError -> Bool) -> Eq DecodeError forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: DecodeError -> DecodeError -> Bool $c/= :: DecodeError -> DecodeError -> Bool == :: DecodeError -> DecodeError -> Bool $c== :: DecodeError -> DecodeError -> Bool Eq, Int -> DecodeError -> ShowS [DecodeError] -> ShowS DecodeError -> String (Int -> DecodeError -> ShowS) -> (DecodeError -> String) -> ([DecodeError] -> ShowS) -> Show DecodeError forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [DecodeError] -> ShowS $cshowList :: [DecodeError] -> ShowS show :: DecodeError -> String $cshow :: DecodeError -> String showsPrec :: Int -> DecodeError -> ShowS $cshowsPrec :: Int -> DecodeError -> ShowS Show) class Decode s t where decode :: s -> Either DecodeError t