-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLens.purs
30 lines (23 loc) · 855 Bytes
/
Lens.purs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module Snapshots.UseTypeAliases.Lens where
import Data.Lens (Lens')
import Data.Lens.Iso (Iso')
import Data.Lens.Record (prop)
import Prelude (identity)
import Snapshots.UseTypeAliases (TypeAlias_ArrayString, TypeAlias_Record, TypeAlias_String)
import Type.Proxy (Proxy(..))
_TypeAlias_Record :: Iso' TypeAlias_Record
{ foo :: Int
, bar :: String
, baz :: Boolean
}
_TypeAlias_Record = identity
_TypeAlias_String :: Iso' TypeAlias_String String
_TypeAlias_String = identity
_TypeAlias_ArrayString :: Iso' TypeAlias_ArrayString (Array String)
_TypeAlias_ArrayString = identity
_propBar :: forall r a. Lens' { bar :: a | r } a
_propBar = prop (Proxy :: Proxy "bar")
_propBaz :: forall r a. Lens' { baz :: a | r } a
_propBaz = prop (Proxy :: Proxy "baz")
_propFoo :: forall r a. Lens' { foo :: a | r } a
_propFoo = prop (Proxy :: Proxy "foo")