on master help sign in
Use StandaloneDeriving
commitdf10d4a98eb36e95352bd5b6d572c3161db524c4 authorCsongor Kiss <kiss.csongor.kiss@gmail.com> dateTue 27 Feb 2018, 21:45 (9 years ago) parentb16240b
2 files changed+12−9
generic-lens.cabal+1−1 test/Bifunctor.hs+11−8
generic-lens.cabal+1−1
@@ -150,7 +150,7 @@ benchmark generic-lens-bench
150150
151151 , base >= 4.9 && <= 5.0
152152 , QuickCheck
153− , criterion
153+ , criterion < 1.3.0.0 && >= 1.2.0.0
154154 , deepseq
155155 , lens
156156
test/Bifunctor.hs+11−8
@@ -1,10 +1,11 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE DefaultSignatures #-}
3−{-# LANGUAGE DeriveAnyClass #-}
4−{-# LANGUAGE DeriveGeneric #-}
5−{-# LANGUAGE FlexibleContexts #-}
6−{-# LANGUAGE MonoLocalBinds #-}
7−{-# LANGUAGE TypeApplications #-}
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DefaultSignatures #-}
3+{-# LANGUAGE DeriveAnyClass #-}
4+{-# LANGUAGE DeriveGeneric #-}
5+{-# LANGUAGE FlexibleContexts #-}
6+{-# LANGUAGE MonoLocalBinds #-}
7+{-# LANGUAGE StandaloneDeriving #-}
8+{-# LANGUAGE TypeApplications #-}
89
910module Main (main) where
1011
@@ -21,7 +22,9 @@ main = void $ runTestTT $
2122data Tree a w = Leaf a
2223 | Fork (Tree a w) (Tree a w)
2324 | WithWeight (Tree a w) w
24− deriving (Show, Eq, Generic, Bifunctor)
25+ deriving (Show, Eq, Generic)
26+
27+deriving instance Bifunctor (Tree a w)
2528
2629mytree :: Tree Int Int
2730mytree = Fork (WithWeight (Leaf 42) 1)