Should liftT be exposed "officially"? I found it useful here:
dataAuthoriseusermawhereAuthorise::user->ma->ma->AuthoriseusermamakeSem''AuthoriserunAuthoriseSem::(user->SemrBool)->Sem(Authoriseuser': r) a -> Sem r arunAuthoriseSemauth=interpretH\caseAuthoriseuserferr->dob<-liftT$authuserg<-bindT\b'->ifb'thenfelseerrraise$runAuthoriseSemauth$gb
Although to be honest I'm not sure if I'm doing something wrong (the Tactics stuff is hard to follow), but liftT (or equivalently reimplementing it) was the way I found to "inject" a Sem r from the outside into a context inside an interpretH
Also the docs on it seem weird to me (I'm definitely missing something here): Internal function to create first-order interpreter combinators out of higher-order ones.
Which one is the "first-order interpreter", and which one is the "higher-order one"?
@Georgi Lyubenov // googleson78 First-order one is defined in terms of interpret, higher-order in terms of interpretH
I guess liftT is fine here - maybe @Love Waern (King of the Homeless) can point out something interesting
Should liftT be exposed "officially"? I found it useful here:
Although to be honest I'm not sure if I'm doing something wrong (the
Tactics
stuff is hard to follow), butliftT
(or equivalently reimplementing it) was the way I found to "inject" aSem r
from the outside into a context inside aninterpretH
Also the docs on it seem weird to me (I'm definitely missing something here):
Internal function to create first-order interpreter combinators out of higher-order ones.
Which one is the "first-order interpreter", and which one is the "higher-order one"?
@Georgi Lyubenov // googleson78 First-order one is defined in terms of
interpret
, higher-order in terms ofinterpretH
I guess
liftT
is fine here - maybe @Love Waern (King of the Homeless) can point out something interestingUse
raise
instead.WithTactics e f m r = Tactics f m (e ': r) ': r
, so you can useraise
to transformSem r a
toSem (WithTactics e f m r) a
.Oh - we should at least put it into docs, because that's easy to miss :big_smile:
True!
What does the
pureT
inliftT
do? I originally went withliftT
instead ofraise
, because I assumed there was some reason to be doing thepureT
?