feat(users/Profpatsch): init whatcd-resolver
Change-Id: Ieb377fb8caa60e716703153dfeca5173f9a6779d Reviewed-on: https://cl.tvl.fyi/c/depot/+/8830 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
5daa31db3b
commit
07b976ccd8
15 changed files with 1086 additions and 0 deletions
15
users/Profpatsch/whatcd-resolver/src/ValidationParseT.hs
Normal file
15
users/Profpatsch/whatcd-resolver/src/ValidationParseT.hs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
module ValidationParseT where
|
||||
|
||||
import Data.Functor.Compose (Compose (..))
|
||||
import PossehlAnalyticsPrelude
|
||||
|
||||
-- | A simple way to create an Applicative parser that parses from some environment.
|
||||
--
|
||||
-- Use with DerivingVia. Grep codebase for examples.
|
||||
newtype ValidationParseT env m a = ValidationParseT {unValidationParseT :: env -> m (Validation (NonEmpty Error) a)}
|
||||
deriving
|
||||
(Functor, Applicative)
|
||||
via ( Compose
|
||||
((->) env)
|
||||
(Compose m (Validation (NonEmpty Error)))
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue