monadfix / named

Named parameters (keyword arguments) for Haskell
Other
91 stars 5 forks source link

Can import "Arg" only explicitly as a pattern #20

Closed Glidos closed 5 years ago

Glidos commented 5 years ago

Fairly unimportant, I should imagine, but perhaps worth mentioning...

I've been told it is good practice to import only the used values from a module, and read that patterns are better indistinguishable from data constructors, if possible. I was able to import ArgF with

import Named (NamedF(ArgF))

but for Arg, I had to add -XPatternSynonyms and use

import Named (pattern Arg)

Glidos commented 5 years ago

Yes, that's worked thank you.