Merge pull request #10 from rimmington/nfdata

Add NFData instance for Path
This commit is contained in:
Chris Done 2016-01-15 10:23:50 +00:00
commit 9af2a76b2e
2 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,7 @@ library
, exceptions
, filepath
, template-haskell
, deepseq
test-suite test
type: exitcode-stdio-1.0

View File

@ -6,6 +6,7 @@ module Path.Internal
(Path(..))
where
import Control.DeepSeq (NFData (..))
import Data.Data
-- | Path of some base and type.
@ -43,3 +44,6 @@ instance Ord (Path b t) where
-- @x == y ≡ show x == show y@
instance Show (Path b t) where
show (Path x) = show x
instance NFData (Path b t) where
rnf (Path x) = rnf x