Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
(for documentation)
demonstrates: empty type, unit type, product type, sum type, type variable.
with {-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}
, the derivation is a one-liner:
data Demo a = ... deriving (Show,Generic,Enumerable)
demoEnumerated :: [Demo Bool] Source
(for documentation)
demoEnumerated = enumerated
>>>
traverse print demoEnumerated
Demo1 Demo2 False Nothing Demo2 False (Just False) Demo2 False (Just True) Demo2 True Nothing Demo2 True (Just False) Demo2 True (Just True) Demo3 False Demo3 True