5d8890fe9da6860f1ef52bd80f23c57a9bc6c3494b9add5af485ec6f63e14563

Download raw

Created: 2023-12-19 03:40:10.302489 UTC

Size: 1344

Preview (limited to 512 bytes)

"{-# LANGUAGE DeriveGeneric #-}\nimport Data.Hashable\nimport Data.Hashable.Lifted\nimport GHC.Generics (Generic)\n\ndata Foo\n = Foo1 Int Char Bool\n | Foo2 String ()\n deriving (Generic)\n\ninstance Hashable Foo\n\ndata Bar = Bar Double Float\n deriving (Generic)\n\ninstance Hashable Bar\n\n-- printHash :: (Hashable a, Show a) => a -> IO ()\n-- printHash = print . hash\n\nmain :: IO ()\nmain = do\n putStrLn \"Hashing Foo1\"\n print . hash $ Foo1 22 'y' True\n putStrLn \"Hashing Foo2\"\n print . hash $ Foo2 \"hello\" ()\n putStrL"


Casa is a service provided by the Haskell Foundation │ Originally developed by FP Complete