File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,34 @@ instance ToDhall Int where
206
206
207
207
declared = Integer
208
208
209
+ instance ToDhall Int8 where
210
+ injectWith _ = Encoder {.. }
211
+ where
212
+ embed = IntegerLit . toInteger
213
+
214
+ declared = Integer
215
+
216
+ instance ToDhall Int16 where
217
+ injectWith _ = Encoder {.. }
218
+ where
219
+ embed = IntegerLit . toInteger
220
+
221
+ declared = Integer
222
+
223
+ instance ToDhall Int32 where
224
+ injectWith _ = Encoder {.. }
225
+ where
226
+ embed = IntegerLit . toInteger
227
+
228
+ declared = Integer
229
+
230
+ instance ToDhall Int64 where
231
+ injectWith _ = Encoder {.. }
232
+ where
233
+ embed = IntegerLit . toInteger
234
+
235
+ declared = Integer
236
+
209
237
{-| Encode a 'Word' to a Dhall @Natural@.
210
238
211
239
>>> embed inject (12 :: Word)
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ module Dhall.Marshal.Internal
27
27
-- * Re-exports
28
28
, Fix (.. )
29
29
, HashMap
30
+ , Int8
31
+ , Int16
32
+ , Int32
33
+ , Int64
30
34
, Map
31
35
, Natural
32
36
, Scientific
@@ -44,6 +48,7 @@ module Dhall.Marshal.Internal
44
48
import Control.Monad.Trans.State.Strict
45
49
import Data.Fix (Fix (.. ))
46
50
import Data.HashMap.Strict (HashMap )
51
+ import Data.Int (Int16 , Int32 , Int64 , Int8 )
47
52
import Data.Map (Map )
48
53
import Data.Scientific (Scientific )
49
54
import Data.Sequence (Seq )
You can’t perform that action at this time.
0 commit comments