Closed jvoigtlaender closed 3 months ago
Separately, it possibly makes sense to set some "output type parameters" to ()
, such as the b
in https://github.com/fmidue/output-monad/blob/5f494e2bd2b0835254529315bc5886932071c23f/output-monad/src/Control/Monad/Output.hs#L328-L332
In particular, it seems several types could be made more monomorphic by setting some type variable in part of the input, that is never used, to just
()
.Here is an example: https://github.com/fmidue/output-monad/blob/5f494e2bd2b0835254529315bc5886932071c23f/output-monad/src/Control/Monad/Output.hs#L211 This function allows usages like
translate (return 42)
.If instead the type would be specialized to
then
translate (return 42)
would not anymore be accepted, but legitimate uses likewould still be accepted.
By just syntactic inspection of the types, the following functions are candidates for such specialization: