fmidue / output-blocks

0 stars 0 forks source link

Names of package and types therein #12

Closed jvoigtlaender closed 2 months ago

jvoigtlaender commented 2 months ago

Is "monad" still the correct description around here?

How about output-blocks as name for the package, and suitable renamings of relevant types as well?

marcellussiegburg commented 2 months ago

I think the name output-monad is wrong!

I am not very opiniated for the package name output-blocks seems okay to me.

But in cases like this:

continueOrAbort :: OutputMonad m => Bool -> Bool -> LangM m -> LangM m

I think

continueOrAbort :: Outputable m => Bool -> Bool -> LangM m -> LangM m

would be more descriptive than:

continueOrAbort :: OutputBlocks m => Bool -> Bool -> LangM m -> LangM m

?

jvoigtlaender commented 2 months ago

Outputable exists as a class in some ghc related packages: https://hoogle.haskell.org/?hoogle=Outputable

The next best thing maybe OutputCapable?

jvoigtlaender commented 2 months ago

(And the meaning of Outputable in the ghc package seems to be different, which could create more confusion. There, a thing is outputable if that thing can be printed. Whereas the m above is not the thing to be printed.)

marcellussiegburg commented 2 months ago

Maybe the package should be named output-capable as well, then?

jvoigtlaender commented 2 months ago

I still like output-blocks, as it really says what all this is about, namely being able to write the output stuff in do-blocks in a reusable fashion. I don't think the package and the class need to be named the same.

marcellussiegburg commented 2 months ago

To reflect this in the import lists I suggest the following naming scheme for the modules:

output-blocks/src/Control/Functor/Trans.hs
output-blocks/src/Control/OutputCapable/Blocks/Debug.hs
output-blocks/src/Control/OutputCapable/Blocks/Report.hs
output-blocks/src/Control/OutputCapable/Blocks/Generic/Type.hs
output-blocks/src/Control/OutputCapable/Blocks/Report/Generic.hs
output-blocks/src/Control/OutputCapable/Blocks/Type.hs
output-blocks/src/Control/OutputCapable/Blocks/Generic.hs
output-blocks/src/Control/OutputCapable/Report.hs
output-blocks/src/Control/OutputCapable/Blocks.hs
jvoigtlaender commented 2 months ago

Looks reasonable.

marcellussiegburg commented 2 months ago

I would suggest moving this repository to fmidue/output-blocks and create a (temporary) copy of the repository at fmidue/output-monad (until it is replaced everywhere, including in the repository of Autotool in Leipzig).

jvoigtlaender commented 2 months ago

You have Admin rights on this repo, so should be able to do (most of?) that. If anything else is needed, let me know.

marcellussiegburg commented 2 months ago

It seems renaming is the recommended way and was enough https://docs.github.com/en/repositories/creating-and-managing-repositories/renaming-a-repository.