type-checked quasiquoters

This commit is contained in:
crumbtoo
2023-12-29 13:47:42 -07:00
parent e80acbcd28
commit 35446533d7
3 changed files with 41 additions and 8 deletions

View File

@@ -13,10 +13,12 @@ errors and the family of RLPC monads.
{-# LANGUAGE DeriveGeneric, DerivingStrategies, DerivingVia #-}
module Compiler.RLPC
( RLPC
, RLPCT
, RLPCT(..)
, RLPCIO
, RLPCOptions(RLPCOptions)
, RlpcError(..)
, IsRlpcError(..)
, rlpc
, addFatal
, addWound
, MonadErrorful
@@ -135,6 +137,9 @@ addRlpcWound = addWound . liftRlpcErr
addRlpcFatal :: (IsRlpcError e, Monad m) => e -> RLPCT RlpcError m ()
addRlpcFatal = addWound . liftRlpcErr
rlpc :: (Monad m) => ErrorfulT e m a -> RLPCT e m a
rlpc = RLPCT . ReaderT . const
----------------------------------------------------------------------------------
instance Default RLPCOptions where