Removed redundant instances; adapted to new signature of TyVarBndr
This commit is contained in:
parent
ca7ff4aafc
commit
b054d3cbdd
@ -8,7 +8,7 @@ module Language.Haskell.TH.Instances
|
|||||||
(
|
(
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import ClassyPrelude
|
--import ClassyPrelude
|
||||||
|
|
||||||
import Language.Haskell.TH
|
import Language.Haskell.TH
|
||||||
import Language.Haskell.TH.Syntax
|
import Language.Haskell.TH.Syntax
|
||||||
|
|||||||
@ -17,8 +17,8 @@ import Data.Fixed
|
|||||||
import Control.Lens
|
import Control.Lens
|
||||||
|
|
||||||
|
|
||||||
instance Real TimeSpec where
|
--instance Real TimeSpec where
|
||||||
toRational TimeSpec{..} = fromIntegral sec + fromIntegral nsec % 1e9
|
-- toRational TimeSpec{..} = fromIntegral sec + fromIntegral nsec % 1e9
|
||||||
|
|
||||||
instance Fractional TimeSpec where
|
instance Fractional TimeSpec where
|
||||||
a / b = fromRational $ toRational a / toRational b
|
a / b = fromRational $ toRational a / toRational b
|
||||||
|
|||||||
@ -186,8 +186,8 @@ derivePathPiece adt mangle joinPP = do
|
|||||||
| n `elem` map tvarName constructorVars = False
|
| n `elem` map tvarName constructorVars = False
|
||||||
| otherwise = any (elemOf types n) constructorFields
|
| otherwise = any (elemOf types n) constructorFields
|
||||||
fieldTypes = nubOrd $ concatMap constructorFields datatypeCons
|
fieldTypes = nubOrd $ concatMap constructorFields datatypeCons
|
||||||
tvarName (PlainTV n) = n
|
tvarName (PlainTV n _) = n
|
||||||
tvarName (KindedTV n _) = n
|
tvarName (KindedTV n _ _) = n
|
||||||
sequence . (finDecs ++ ) . pure $
|
sequence . (finDecs ++ ) . pure $
|
||||||
instanceD (cxt iCxt) [t|PathPiece $typ|]
|
instanceD (cxt iCxt) [t|PathPiece $typ|]
|
||||||
[ funD 'toPathPiece
|
[ funD 'toPathPiece
|
||||||
|
|||||||
Reference in New Issue
Block a user