[Haskell-cafe] Constrain Symbol to contain only alphabetic characters
eir at cis.upenn.edu
Sun Sep 27 19:03:17 UTC 2015
I don't believe so. I think there's lots of room for improvement over the current capabilities for Symbol -- it was originally designed, I think, to be useful for record labels, so it didn't need any ability to decompose.
In the meantime, you could probably get what you need by using a list of one-character symbols and treating the list as a string. Use a quasiquoter to make the surface syntax palatable. You may also want lots of type-level manipulation functions as provided by the singletons library, which includes almost all of Data.List at the type level in its Data.Promotion.Prelude.List module.
On Sep 27, 2015, at 2:10 PM, Alexander Vieth <aovieth at gmail.com> wrote:
> Hi Café,
> Is it possible to do this? I looked through the source for GHC.TypeLits on hackage but found no leads.
> Thanks for any help,
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe