-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Description
The type Copilot.Core.Expr.Tag was deprecated in Copilot 3.6 because it was not used and therefore did not belong in the program.
As per our internal policy of waiting 3 versions from deprecation until a public interface declaration can be removed, this type can now be removed completely.
Type
- Bug: unused code included in the implementation; a type declared does not have a complete API.
Additional context
Requester
- Ivan Perez
Method to check presence of bug
The following expression finds uses of Tag, ignoring appearances in comments or strings.
$ grep -nHre '\<Tag\>' --include='*.hs' | grep -ve '^{-#' | grep -ve '--.*Tag' | grep -ve '"[^"]*Tag[^"]*"'
copilot-core/src/Copilot/Core/Expr.hs:15: , Tag
copilot-core/src/Copilot/Core/Expr.hs:43:type Tag = IntThe result obtained are two lines: the definition, and it being exported. Tags are not required by Copilot's requirements, and therefore should not be published.
Expected result
The string should be either empty (no type exists) or list further uses.
Desired result
The string returned by the command above should be empty.
Proposed solution
Removing the type declaration from the module Copilot.Core.Expr, as well as its export from the module's export list.
Further notes
See 0f536ec for a confirmation of when the type was deprecated.