These are chat archives for typelevel/scala

25th
Mar 2017
m4dc4p
@m4dc4p
Mar 25 2017 01:53
So I'm trying to write a thing that will concatenate type-level string literals (e.g., for building URL paths). Should I just reach for macros?
So far failing badly :)
Seems like it would be similar to type-level lists ... except all elements would be singleton types
Rob Norris
@tpolecat
Mar 25 2017 10:48
@m4dc4p you want then catted at compile-time? you could certainly have type url = "foo" :: "bar" :: HNil and write a typeclass that can concatenate them at runtime.
Edmund Noble
@edmundnoble
Mar 25 2017 14:37
@m4dc4p Yes.
You need to either keep HLists of characters or use macros.
Very simple macros, but still.
Oron Port
@soronpo
Mar 25 2017 15:01
Maybe singleton-ops
It has a concatination option for string types
Edmund Noble
@edmundnoble
Mar 25 2017 16:22
Hey! There we go! :D
Sounds beautiful. I'd grab it.
m4dc4p
@m4dc4p
Mar 25 2017 18:16
thanks @tpolecat !!!