File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 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
206206
207207 declared = Integer
208208
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+
209237{-| Encode a 'Word' to a Dhall @Natural@.
210238
211239>>> embed inject (12 :: Word)
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ module Dhall.Marshal.Internal
2727 -- * Re-exports
2828 , Fix (.. )
2929 , HashMap
30+ , Int8
31+ , Int16
32+ , Int32
33+ , Int64
3034 , Map
3135 , Natural
3236 , Scientific
@@ -44,6 +48,7 @@ module Dhall.Marshal.Internal
4448import Control.Monad.Trans.State.Strict
4549import Data.Fix (Fix (.. ))
4650import Data.HashMap.Strict (HashMap )
51+ import Data.Int (Int16 , Int32 , Int64 , Int8 )
4752import Data.Map (Map )
4853import Data.Scientific (Scientific )
4954import Data.Sequence (Seq )
You can’t perform that action at this time.
0 commit comments