fork download
  1. {-# LANGUAGE DeriveFoldable #-}
  2.  
  3. import Prelude hiding (foldr)
  4. import Data.Foldable (Foldable, foldr, toList)
  5. import Data.Function (on)
  6.  
  7. data BB a = L | K (BB a) a (BB a) deriving (Show, Foldable)
  8.  
  9. instance Eq a => Eq (BB a) where
  10. (==) = (==) `on` toList
  11.  
  12. main::IO()
  13. main = print 0.7
  14.  
Success #stdin #stdout 0s 4336KB
stdin
Standard input is empty
stdout
0.7