Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
haskell
forks
composite
Commits
ef593de4
Commit
ef593de4
authored
7 years ago
by
Ross MacLeod
Browse files
Options
Download
Email Patches
Plain Diff
make TH generated things Inlinable
parent
d2bfa2a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
composite-base/src/Composite/TH.hs
composite-base/src/Composite/TH.hs
+8
-4
No files found.
composite-base/src/Composite/TH.hs
View file @
ef593de4
...
...
@@ -53,7 +53,8 @@ withProxies qDecs = do
proxyType
<-
[
t
|
Proxy $tySynType
|]
proxyVal
<-
[
|
Proxy
|
]
pure
[
SigD
proxyName
proxyType
[
PragmaD
(
InlineP
proxyName
Inlinable
FunLike
AllPhases
)
,
SigD
proxyName
proxyType
,
ValD
(
VarP
proxyName
)
(
NormalB
proxyVal
)
[]
]
...
...
@@ -181,7 +182,8 @@ proxyDecFor (FieldDec { fieldName, fieldTypeApplied }) = do
proxyType
<-
[
t
|
Proxy $(pure fieldTypeApplied)
|]
proxyVal
<-
[
|
Proxy
|
]
pure
[
SigD
proxyName
proxyType
[
PragmaD
(
InlineP
proxyName
Inlinable
FunLike
AllPhases
)
,
SigD
proxyName
proxyType
,
ValD
(
VarP
proxyName
)
(
NormalB
proxyVal
)
[]
]
...
...
@@ -202,7 +204,8 @@ lensDecFor (FieldDec {..}) = do
rlensVal
<-
[
|
rlens
$
(
pure
proxyVal
)
|
]
pure
[
SigD
lensName
(
ForallT
lensBinders
lensContext
lensType
)
[
PragmaD
(
InlineP
lensName
Inlinable
FunLike
AllPhases
)
,
SigD
lensName
(
ForallT
lensBinders
lensContext
lensType
)
,
ValD
(
VarP
lensName
)
(
NormalB
rlensVal
)
[]
]
...
...
@@ -221,6 +224,7 @@ prismDecFor (FieldDec {..}) = do
fieldPrismVal
<-
[
|
fieldPrism
$
(
pure
proxyVal
)
.
_Wrapped
|
]
pure
[
SigD
prismName
(
ForallT
prismBinders
prismContext
prismType
)
[
PragmaD
(
InlineP
prismName
Inlinable
FunLike
AllPhases
)
,
SigD
prismName
(
ForallT
prismBinders
prismContext
prismType
)
,
ValD
(
VarP
prismName
)
(
NormalB
fieldPrismVal
)
[]
]
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment