1{-# LANGUAGE CPP, DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
3{-# LANGUAGE DeriveGeneric, StandaloneDeriving #-}
8import qualified Data.Map as Map
18 , fooTuple :: (String, Text, Int)
19 -- This definition causes an infinite loop in genericTo and genericFrom!
20 -- , fooMap :: Map.Map String Foo
21 , fooMap :: Map.Map String (Text,Int)
22 } deriving (Show, Typeable, Data)
27 } deriving (Show, Eq, Data, Typeable)
29data OneConstructor = OneConstructor
30 deriving (Show, Eq, Typeable, Data)
32data Product2 a b = Product2 a b
33 deriving (Show, Eq, Typeable, Data)
35data Product6 a b c d e f = Product6 a b c d e f
36 deriving (Show, Eq, Typeable, Data)
38data Sum4 a b c d = Alt1 a | Alt2 b | Alt3 c | Alt4 d
39 deriving (Show, Eq, Typeable, Data)
42 (=~) :: a -> a -> Bool
44newtype Approx a = Approx { fromApprox :: a }
45 deriving (Show, Data, Typeable, ApproxEq, Num)
47instance (ApproxEq a) => Eq (Approx a) where
48 Approx a == Approx b = a =~ b
50data Nullary = C1 | C2 | C3 deriving (Eq, Show)
52data SomeType a = Nullary
54 | Product String (Maybe Char) a
55 | Record { testOne :: Double
56 , testTwo :: Maybe Bool
57 , testThree :: Maybe a
61deriving instance Generic Foo
62deriving instance Generic UFoo
63deriving instance Generic OneConstructor
64deriving instance Generic (Product2 a b)
65deriving instance Generic (Product6 a b c d e f)
66deriving instance Generic (Sum4 a b c d)
67deriving instance Generic (Approx a)
68deriving instance Generic Nullary
69deriving instance Generic (SomeType a)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list