I was reading the Servant documentation and came across this line:
type UserAPI = \"users\" :> QueryParam \"sortby\" SortBy :> Get \'[JSON] [User]
Quotes are used to distinguish type-level constructors vs. term-level constructors of promoted types.
For instance:
{-# LANGUAGE DataKinds #-}
data Which = One | Two
myPick :: Which -- Type
myPick = One
type MyPick :: Which -- Kind
type MyPick = 'One
By the way, the kind annotation type MyPick :: Which is not valid Haskell but it gives you an idea of the correspondence between the term and the type level. The closest you can get to this requires turning on another extension:
{-# LANGUAGE TypeFamilies #-}
type family MyPick :: Which where
MyPick = 'One