mirror of
https://github.com/chrisdone/duet.git
synced 2025-01-08 23:18:45 +03:00
12 lines
252 B
Haskell
12 lines
252 B
Haskell
class Good a where
|
|
good :: a -> Bool
|
|
data Maybe a = Just a | Nothing
|
|
instance Good Bool where
|
|
good = \x -> x
|
|
instance Good a => Good (Maybe a) where
|
|
good = \x ->
|
|
case x of
|
|
Nothing -> False
|
|
Just a -> good a
|
|
main = good (Just True)
|