Add NFData instance for Path
This commit is contained in:
parent
28c4f7fe21
commit
cd470f2d11
@ -20,6 +20,7 @@ library
|
|||||||
, exceptions
|
, exceptions
|
||||||
, filepath
|
, filepath
|
||||||
, template-haskell
|
, template-haskell
|
||||||
|
, deepseq
|
||||||
|
|
||||||
test-suite test
|
test-suite test
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
|
@ -6,6 +6,7 @@ module Path.Internal
|
|||||||
(Path(..))
|
(Path(..))
|
||||||
where
|
where
|
||||||
|
|
||||||
|
import Control.DeepSeq (NFData (..))
|
||||||
import Data.Data
|
import Data.Data
|
||||||
|
|
||||||
-- | Path of some base and type.
|
-- | Path of some base and type.
|
||||||
@ -43,3 +44,6 @@ instance Ord (Path b t) where
|
|||||||
-- @x == y ≡ show x == show y@
|
-- @x == y ≡ show x == show y@
|
||||||
instance Show (Path b t) where
|
instance Show (Path b t) where
|
||||||
show (Path x) = show x
|
show (Path x) = show x
|
||||||
|
|
||||||
|
instance NFData (Path b t) where
|
||||||
|
rnf (Path x) = rnf x
|
||||||
|
Loading…
Reference in New Issue
Block a user