-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add variation on makeFree
without type signatures?
#77
Comments
This makes perfect sense to me, I'd be happy to update |
It's probably best not to change The issue with template haskell functions that take options is that in order to use them you have to apply them to their arguments in a separate module because of the stage restriction, so I wouldn't go down that route unless absolutely necessary. I'd be happy with just |
I think there might be one more nice command. We can introduce data LangF x
= Input (String -> x)
| Output String x
| Halt
deriving (Functor)
-- | Get string.
makeFreeCon 'Input
-- | Put string.
makeFreeCon 'Output
-- | Abort computation.
makeFreeCon 'Halt This way one does not need to write down type signatures (which I find long and boring).
makeFreeCon_ 'Output
-- | Output.
output :: MonadFree LangF m =>
String -- ^ String to output.
-> m () -- ^ No result. |
Yeah, I like that, too |
Merged |
The reason I'm interested in a version of
makeFree
without type signatures is:As far as I can tell, the only way to document commands in haddocks is to put a comment above the type signature, but if I add my own type signature it conflicts with the auto-generated type signature.
The text was updated successfully, but these errors were encountered: