[Haskell-cafe] Emacs: Haskell snippets for YASnippet
anotheraddress at gmx.de
Wed Nov 4 13:41:35 EST 2009
> Cool stuff, I will probably be using this!
> In my opinion, the naming convention is a bit inconsistent. Extension
> snippets all begin with "-x" but imports begin with "imp". I'd prefer
> seeing import snippets begin with "-i" and use names easier to
> remember, e.g. instead of "impcms", use "-istate" and instead of
> "impdm.Map" use "-imap", etc. At least consider it! :)
Ah, the rationale behind the "-x" was that these are also GHC command line
flags ;) But I also like "-i" better than "imp".
About the names: In one sense the current scheme is easier to remember because
the abbreviation can be deduced from the module name. But I suppose you're
right and "state" etc. are still easier to remember in practice, so feel free
to send in a patch.
> And about the "bot" -> "⊥" rule... Is ⊥ really valid Haskell?
Well yes, but it's an operator name token, so valid haskell would be:
x ⊥ y = x + y
(⊥) = undefined
with this use as a constant you'd have to use the parentheses every time, so
it probably isn't very useful indeed.
More information about the Haskell-Cafe