@@ -135,24 +135,22 @@ namespace purescript {
135135 return *static_cast<const T*>(b.get());
136136 }
137137
138− template <typename T,
139− typename = typename std::enable_if<!std::is_same<T, const boxed&>::value>::type>
138+ template <typename T>
139+ constexpr auto unbox(boxed& b) -> T& {
140+ return *static_cast<T*>(b.get());
141+ }
142+
143+ template <typename T>
140144 constexpr auto unbox(const T value) -> T {
141145 return value;
142146 }
143147
144148 template <typename T,
145− typename = typename std::enable_if<!std::is_same<T, const boxed&>::value &&
146− std::is_same<T, int>::value>::type>
149+ typename = typename std::enable_if<std::is_same<T, int>::value>::type>
147150 constexpr auto unbox(const std::size_t value) -> long long {
148151 return value;
149152 }
150153
151− template <typename T>
152− constexpr auto peek(boxed& b) -> T& {
153− return *static_cast<T*>(b.get());
154− }
155−
156154 inline auto array_length(const boxed& a) -> boxed::array_t::size_type {
157155 return unbox<boxed::array_t>(a).size();
158156 }