In Haskell, why does this compile:
splice :: String -> String -> String splice a b = a ++ b main = print (splice "hi" "ya") but this does not:
splice :: (String a) => a -> a -> a splice a b = a ++ b main = print (splice "hi" "ya") >> Type constructor `String' used as a class I would have thought these were the same thing. Is there a way to use the second style, which avoids repeating the type name 3 times?