A data constructor is not the same as a constuctor type
In your code, a constructor of type Subst data constructor S
Type constructors are used to create new types, for example. in data Foo = Foo (Maybe Int) Maybe is a type constructor, Foo is a data constructor (and also a type constructor, but they can be called differently, as you discovered). Data constructors are used to instantiate types (also not to be confused with instantiating a polymorphic type, for example, Int -> Int is an instance of a -> a ).
So you need to use S if you want to map the pattern in your single function. Not Subst .
Hope this makes sense, if not, tell me :)
PS data constructors are, in every sense and purpose, functions, which means that you can do the same with them as you usually do with functions. For instance. you can make map Bar [a,b,c] , and it will apply a data constructor to each element.
source share