Constrain Symbol to contain only alphabetic characters

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, Alex

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.
Richard
On Sep 27, 2015, at 2:10 PM, Alexander Vieth
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,
Alex _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
participants (2)
-
Alexander Vieth
-
Richard Eisenberg