globalDataConstructors ((TEData ty@(TRecInd _ (TVari constructors)) _):ds) =
  let name = fst
      parameterTypes = map (\t -> if t == ty then Recursive else NonRecursive)
  in map (\(name,params) -> Constructor name (parameterTypes params)) constructors
     ++ globalDataConstructors ds
globalDataConstructors ((TEData ty@(TRecInd _ (TVari constructors)) _):ds) =
  let name = fst
      parameterTypes = map (\t -> if t == ty then Recursive else NonRecursive)
  in map (\(name,params) -> Constructor name (parameterTypes params)) constructors
     ++ globalDataConstructors ds
globalDataConstructors ((TEData ty@(TRecInd _ (TVari constructors)) _):ds) =
  let name = fst
      parameterTypes = map (\t -> if t == ty then Recursive else NonRecursive)
  in map (\(name,params) -> Constructor name (parameterTypes params)) constructors
     ++ globalDataConstructors ds