Commit fbe9d59
committed
Merge branch 'develop-remove-deprecatedType'. Close #500.
**Description**
The functions `Copilot.Core.Type.typename`,
`Copilot.Core.Type.tylength`, `Copilot.Core.Type.tysize`,
`Copilot.Core.Type.fieldname`, `Copilot.Core.Type.accessorname` and
`Copilot.Core.Type.Array.arrayelems` are not being used by any other
part of Copilot.
They were replaced by functions with similar names in lowerCamelCase
format. The original functions were deprecated in Copilot 3.17 and no
messages have been received requesting that they be kept in this
library.
As per our internal policy of waiting 3 versions from deprecation until
a public interface declaration can be removed, these functions can now
be removed.
**Type**
- Bug: unused code included in the implementation.
**Additional context**
- Issue #457, addressed in Copilot 3.17, deprecated the functions.
**Requester**
- Ivan Perez
**Method to check presence of bug**
There is no easy, forward-compatible, automated way of detecting that
the functions are present and also deprecated. Manual inspection is
recommended. At present, they are the only deprecated functions in
`copilot-core`, so their presence can be found with:
```sh
$ grep -nHre 'DEPRECATED' src/
src/Copilot/Core/Type.hs:58:-- {-# DEPRECATED typename "Use typeName instead." #-}
src/Copilot/Core/Type.hs:85:-- {-# DEPRECATED fieldname "Use fieldName instead." #-}
src/Copilot/Core/Type.hs:96:-- {-# DEPRECATED accessorname "Use accessorName instead." #-}
src/Copilot/Core/Type.hs:139:-- {-# DEPRECATED tylength "Use typeLength instead." #-}
src/Copilot/Core/Type.hs:149:-- {-# DEPRECATED tysize "Use typeSize instead." #-}
src/Copilot/Core/Type/Array.hs:47:{-# DEPRECATED arrayelems "Use ArrayElems instead." #-}
```
**Expected result**
The strings returned by the command above should be empty (nothing is
deprecated).
**Solution implemented**
Remove the deprecated functions from `Copilot.Core.Type` and
`Copilot.Core.Type.Array`.
**Further notes**
None.3 files changed
+4
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
35 | | - | |
36 | 33 | | |
37 | 34 | | |
38 | 35 | | |
39 | | - | |
40 | 36 | | |
41 | | - | |
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
| |||
55 | 50 | | |
56 | 51 | | |
57 | 52 | | |
58 | | - | |
59 | | - | |
60 | 53 | | |
61 | 54 | | |
62 | 55 | | |
63 | 56 | | |
64 | 57 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 58 | | |
71 | 59 | | |
72 | 60 | | |
| |||
83 | 71 | | |
84 | 72 | | |
85 | 73 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | 74 | | |
92 | 75 | | |
93 | 76 | | |
94 | 77 | | |
95 | 78 | | |
96 | 79 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 80 | | |
105 | 81 | | |
106 | 82 | | |
| |||
137 | 113 | | |
138 | 114 | | |
139 | 115 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 116 | | |
146 | 117 | | |
147 | 118 | | |
148 | 119 | | |
149 | 120 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 121 | | |
156 | 122 | | |
157 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
0 commit comments