Skip to content

Commit 17aced5

Browse files
authored
Merge pull request #13 from matthewleon/lazy
newtype derive Lazy instance
2 parents 91b2e2f + be66cf9 commit 17aced5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Data/Identity.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Prelude
55
import Control.Alt (class Alt)
66
import Control.Comonad (class Comonad)
77
import Control.Extend (class Extend)
8+
import Control.Lazy (class Lazy)
89

910
import Data.Foldable (class Foldable)
1011
import Data.Functor.Invariant (class Invariant, imapF)
@@ -40,6 +41,8 @@ derive newtype instance commutativeRingIdentity :: CommutativeRing a => Commutat
4041

4142
derive newtype instance fieldIdentity :: Field a => Field (Identity a)
4243

44+
derive newtype instance lazyIdentity :: Lazy a => Lazy (Identity a)
45+
4346
instance showIdentity :: Show a => Show (Identity a) where
4447
show (Identity x) = "(Identity " <> show x <> ")"
4548

0 commit comments

Comments
 (0)