From 84e2b6a96d1091891aa4c5c83f39401d79cfc0b4 Mon Sep 17 00:00:00 2001 From: Yamada Ryo Date: Fri, 11 Oct 2024 04:22:17 +0900 Subject: [PATCH] [fix] incorrect type signatures in documentation. --- heftia/src/Control/Monad/Hefty.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/heftia/src/Control/Monad/Hefty.hs b/heftia/src/Control/Monad/Hefty.hs index cd7197b..31ec511 100644 --- a/heftia/src/Control/Monad/Hefty.hs +++ b/heftia/src/Control/Monad/Hefty.hs @@ -20,6 +20,9 @@ effect @Log@ for logging and the higher-order effect @Span@ for representing named spans in a program. @ +{\-# LANGUAGE AllowAmbiguousTypes #-\} +{\-# LANGUAGE TemplateHaskell #-\} + import "Control.Monad.Hefty" import Prelude hiding (log, span) @@ -170,13 +173,13 @@ prog = 'runEff' . runLog . runSpan $ do * Non-recursive continuational stateful interpretation functions like 'interpretWith' cannot be used unless the higher-order effects are empty: @ - 'interpretWith' :: e ~> Eff '[] ef => 'Eff' '[] (e ': ef) ~> 'Eff' '[] ef + 'interpretWith' :: e t'Control.Effect.~>' 'Eff' '[] ef -> 'Eff' '[] (e ': ef) t'Control.Effect.~>' 'Eff' '[] ef @ * The @Rec@ versions can be used even when @eh@ is not empty. @ - 'interpretRecWith' :: e ~> 'Eff' eh (e ': ef) ~> 'Eff' eh ef + 'interpretRecWith' :: e t'Control.Effect.~>' 'Eff' eh ef -> 'Eff' eh (e ': ef) t'Control.Effect.~>' 'Eff' eh ef @ * When using this type of function, pay attention to their /reset semantics/. This is discussed later.