# Polysemy: Higher-order effects with Final

Gautier DI FOLCO January 15, 2023 [Haskell] #haskell #polysemy #design #effects systemsIn a previous log, we introduced *Higher-order effects* definition and interpretation through tactics.

Some elements from tactics are already deprecated, and my guess is that it will spread until tactics will be completly removed.

According to the documentation strategies should be choosed if possible.

Let's review our effect:

```
data When (m :: Type -> Type) a where
WhenM :: m () -> When m ()
makeSem ''When
```

Now we can define the interpreter:

```
=
interpretFinal @IO $
\case
WhenM act -> runS act
interpretWhenFinal
```

Here are the key differences:

`interpretFinal`

required a`Final m`

to work`runS`

is a general function (while`runTSimple`

is a special case of`runT`

)

See the full the code here.