I understand haskell's function type declaration like,
length :: String -> Int
prefix :: Int -> String -> String
But sometimes, the types on the right side are not simple types like String
, Integer
but it contains multiple literal words, and the words that look like custom defined etc.
For example, these types defined on this post,
withLocation :: Q Exp -> Q Exp
What does Q, Exp mean?
formatLoc :: Loc -> String
What does Loc mean? Is it part of haskell library?