-- | Conversion between SIGNED and SIZED integral types with bounds checking. -- Types are aliased as Ux and Ix. -- Includes sizes 4 (MIDI), 7 (ASCII,MIDI), 12 (SND,AKAI), 14 (MIDI) and 24 (SND). -- AUTOGENERATED: SEE mk/mk-convert.hs. module Music.Theory.Math.Convert.FX where import Data.Int {- base -} import Data.Word {- base -} -- AUTOGEN -- | Alias type U4 = Word8 -- | Alias type U7 = Word8 -- | Alias type U8 = Word8 -- | Alias type U12 = Word16 -- | Alias type U14 = Word16 -- | Alias type U16 = Word16 -- | Alias type U24 = Word32 -- | Alias type U32 = Word32 -- | Alias type U64 = Word64 -- | Alias type I4 = Int8 -- | Alias type I7 = Int8 -- | Alias type I8 = Int8 -- | Alias type I12 = Int16 -- | Alias type I14 = Int16 -- | Alias type I16 = Int16 -- | Alias type I24 = Int32 -- | Alias type I32 = Int32 -- | Alias type I64 = Int64 -- | Type specialised 'fromIntegral' u4_to_u7 :: U4 -> U7 u4_to_u7 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_u8 :: U4 -> U8 u4_to_u8 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_u12 :: U4 -> U12 u4_to_u12 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_u14 :: U4 -> U14 u4_to_u14 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_u16 :: U4 -> U16 u4_to_u16 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_u24 :: U4 -> U24 u4_to_u24 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_u32 :: U4 -> U32 u4_to_u32 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_u64 :: U4 -> U64 u4_to_u64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u4_to_i4 :: U4 -> I4 u4_to_i4 x = if x < 0 || x > 7 then error "u4_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u4_to_i7 :: U4 -> I7 u4_to_i7 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_i8 :: U4 -> I8 u4_to_i8 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_i12 :: U4 -> I12 u4_to_i12 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_i14 :: U4 -> I14 u4_to_i14 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_i16 :: U4 -> I16 u4_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_i24 :: U4 -> I24 u4_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_i32 :: U4 -> I32 u4_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' u4_to_i64 :: U4 -> I64 u4_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u7_to_u4 :: U7 -> U4 u7_to_u4 x = if x < 0 || x > 15 then error "u7_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u7_to_u8 :: U7 -> U8 u7_to_u8 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_u12 :: U7 -> U12 u7_to_u12 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_u14 :: U7 -> U14 u7_to_u14 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_u16 :: U7 -> U16 u7_to_u16 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_u24 :: U7 -> U24 u7_to_u24 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_u32 :: U7 -> U32 u7_to_u32 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_u64 :: U7 -> U64 u7_to_u64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u7_to_i4 :: U7 -> I4 u7_to_i4 x = if x < 0 || x > 7 then error "u7_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u7_to_i7 :: U7 -> I7 u7_to_i7 x = if x < 0 || x > 63 then error "u7_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u7_to_i8 :: U7 -> I8 u7_to_i8 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_i12 :: U7 -> I12 u7_to_i12 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_i14 :: U7 -> I14 u7_to_i14 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_i16 :: U7 -> I16 u7_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_i24 :: U7 -> I24 u7_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_i32 :: U7 -> I32 u7_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' u7_to_i64 :: U7 -> I64 u7_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u8_to_u4 :: U8 -> U4 u8_to_u4 x = if x < 0 || x > 15 then error "u8_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u8_to_u7 :: U8 -> U7 u8_to_u7 x = if x < 0 || x > 127 then error "u8_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u8_to_u12 :: U8 -> U12 u8_to_u12 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_u14 :: U8 -> U14 u8_to_u14 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_u16 :: U8 -> U16 u8_to_u16 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_u24 :: U8 -> U24 u8_to_u24 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_u32 :: U8 -> U32 u8_to_u32 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_u64 :: U8 -> U64 u8_to_u64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u8_to_i4 :: U8 -> I4 u8_to_i4 x = if x < 0 || x > 7 then error "u8_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u8_to_i7 :: U8 -> I7 u8_to_i7 x = if x < 0 || x > 63 then error "u8_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u8_to_i8 :: U8 -> I8 u8_to_i8 x = if x < 0 || x > 127 then error "u8_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u8_to_i12 :: U8 -> I12 u8_to_i12 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_i14 :: U8 -> I14 u8_to_i14 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_i16 :: U8 -> I16 u8_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_i24 :: U8 -> I24 u8_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_i32 :: U8 -> I32 u8_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' u8_to_i64 :: U8 -> I64 u8_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u12_to_u4 :: U12 -> U4 u12_to_u4 x = if x < 0 || x > 15 then error "u12_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u12_to_u7 :: U12 -> U7 u12_to_u7 x = if x < 0 || x > 127 then error "u12_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u12_to_u8 :: U12 -> U8 u12_to_u8 x = if x < 0 || x > 255 then error "u12_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u12_to_u14 :: U12 -> U14 u12_to_u14 = fromIntegral -- | Type specialised 'fromIntegral' u12_to_u16 :: U12 -> U16 u12_to_u16 = fromIntegral -- | Type specialised 'fromIntegral' u12_to_u24 :: U12 -> U24 u12_to_u24 = fromIntegral -- | Type specialised 'fromIntegral' u12_to_u32 :: U12 -> U32 u12_to_u32 = fromIntegral -- | Type specialised 'fromIntegral' u12_to_u64 :: U12 -> U64 u12_to_u64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u12_to_i4 :: U12 -> I4 u12_to_i4 x = if x < 0 || x > 7 then error "u12_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u12_to_i7 :: U12 -> I7 u12_to_i7 x = if x < 0 || x > 63 then error "u12_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u12_to_i8 :: U12 -> I8 u12_to_i8 x = if x < 0 || x > 127 then error "u12_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u12_to_i12 :: U12 -> I12 u12_to_i12 x = if x < 0 || x > 2047 then error "u12_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u12_to_i14 :: U12 -> I14 u12_to_i14 = fromIntegral -- | Type specialised 'fromIntegral' u12_to_i16 :: U12 -> I16 u12_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' u12_to_i24 :: U12 -> I24 u12_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' u12_to_i32 :: U12 -> I32 u12_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' u12_to_i64 :: U12 -> I64 u12_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u14_to_u4 :: U14 -> U4 u14_to_u4 x = if x < 0 || x > 15 then error "u14_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u14_to_u7 :: U14 -> U7 u14_to_u7 x = if x < 0 || x > 127 then error "u14_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u14_to_u8 :: U14 -> U8 u14_to_u8 x = if x < 0 || x > 255 then error "u14_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u14_to_u12 :: U14 -> U12 u14_to_u12 x = if x < 0 || x > 4095 then error "u14_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u14_to_u16 :: U14 -> U16 u14_to_u16 = fromIntegral -- | Type specialised 'fromIntegral' u14_to_u24 :: U14 -> U24 u14_to_u24 = fromIntegral -- | Type specialised 'fromIntegral' u14_to_u32 :: U14 -> U32 u14_to_u32 = fromIntegral -- | Type specialised 'fromIntegral' u14_to_u64 :: U14 -> U64 u14_to_u64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u14_to_i4 :: U14 -> I4 u14_to_i4 x = if x < 0 || x > 7 then error "u14_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u14_to_i7 :: U14 -> I7 u14_to_i7 x = if x < 0 || x > 63 then error "u14_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u14_to_i8 :: U14 -> I8 u14_to_i8 x = if x < 0 || x > 127 then error "u14_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u14_to_i12 :: U14 -> I12 u14_to_i12 x = if x < 0 || x > 2047 then error "u14_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u14_to_i14 :: U14 -> I14 u14_to_i14 x = if x < 0 || x > 8191 then error "u14_to_i14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u14_to_i16 :: U14 -> I16 u14_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' u14_to_i24 :: U14 -> I24 u14_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' u14_to_i32 :: U14 -> I32 u14_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' u14_to_i64 :: U14 -> I64 u14_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_u4 :: U16 -> U4 u16_to_u4 x = if x < 0 || x > 15 then error "u16_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_u7 :: U16 -> U7 u16_to_u7 x = if x < 0 || x > 127 then error "u16_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_u8 :: U16 -> U8 u16_to_u8 x = if x < 0 || x > 255 then error "u16_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_u12 :: U16 -> U12 u16_to_u12 x = if x < 0 || x > 4095 then error "u16_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_u14 :: U16 -> U14 u16_to_u14 x = if x < 0 || x > 16383 then error "u16_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u16_to_u24 :: U16 -> U24 u16_to_u24 = fromIntegral -- | Type specialised 'fromIntegral' u16_to_u32 :: U16 -> U32 u16_to_u32 = fromIntegral -- | Type specialised 'fromIntegral' u16_to_u64 :: U16 -> U64 u16_to_u64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_i4 :: U16 -> I4 u16_to_i4 x = if x < 0 || x > 7 then error "u16_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_i7 :: U16 -> I7 u16_to_i7 x = if x < 0 || x > 63 then error "u16_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_i8 :: U16 -> I8 u16_to_i8 x = if x < 0 || x > 127 then error "u16_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_i12 :: U16 -> I12 u16_to_i12 x = if x < 0 || x > 2047 then error "u16_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_i14 :: U16 -> I14 u16_to_i14 x = if x < 0 || x > 8191 then error "u16_to_i14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u16_to_i16 :: U16 -> I16 u16_to_i16 x = if x < 0 || x > 32767 then error "u16_to_i16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u16_to_i24 :: U16 -> I24 u16_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' u16_to_i32 :: U16 -> I32 u16_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' u16_to_i64 :: U16 -> I64 u16_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_u4 :: U24 -> U4 u24_to_u4 x = if x < 0 || x > 15 then error "u24_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_u7 :: U24 -> U7 u24_to_u7 x = if x < 0 || x > 127 then error "u24_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_u8 :: U24 -> U8 u24_to_u8 x = if x < 0 || x > 255 then error "u24_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_u12 :: U24 -> U12 u24_to_u12 x = if x < 0 || x > 4095 then error "u24_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_u14 :: U24 -> U14 u24_to_u14 x = if x < 0 || x > 16383 then error "u24_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_u16 :: U24 -> U16 u24_to_u16 x = if x < 0 || x > 65535 then error "u24_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u24_to_u32 :: U24 -> U32 u24_to_u32 = fromIntegral -- | Type specialised 'fromIntegral' u24_to_u64 :: U24 -> U64 u24_to_u64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_i4 :: U24 -> I4 u24_to_i4 x = if x < 0 || x > 7 then error "u24_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_i7 :: U24 -> I7 u24_to_i7 x = if x < 0 || x > 63 then error "u24_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_i8 :: U24 -> I8 u24_to_i8 x = if x < 0 || x > 127 then error "u24_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_i12 :: U24 -> I12 u24_to_i12 x = if x < 0 || x > 2047 then error "u24_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_i14 :: U24 -> I14 u24_to_i14 x = if x < 0 || x > 8191 then error "u24_to_i14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_i16 :: U24 -> I16 u24_to_i16 x = if x < 0 || x > 32767 then error "u24_to_i16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u24_to_i24 :: U24 -> I24 u24_to_i24 x = if x < 0 || x > 8388607 then error "u24_to_i24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u24_to_i32 :: U24 -> I32 u24_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' u24_to_i64 :: U24 -> I64 u24_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_u4 :: U32 -> U4 u32_to_u4 x = if x < 0 || x > 15 then error "u32_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_u7 :: U32 -> U7 u32_to_u7 x = if x < 0 || x > 127 then error "u32_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_u8 :: U32 -> U8 u32_to_u8 x = if x < 0 || x > 255 then error "u32_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_u12 :: U32 -> U12 u32_to_u12 x = if x < 0 || x > 4095 then error "u32_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_u14 :: U32 -> U14 u32_to_u14 x = if x < 0 || x > 16383 then error "u32_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_u16 :: U32 -> U16 u32_to_u16 x = if x < 0 || x > 65535 then error "u32_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_u24 :: U32 -> U24 u32_to_u24 x = if x < 0 || x > 16777215 then error "u32_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u32_to_u64 :: U32 -> U64 u32_to_u64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_i4 :: U32 -> I4 u32_to_i4 x = if x < 0 || x > 7 then error "u32_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_i7 :: U32 -> I7 u32_to_i7 x = if x < 0 || x > 63 then error "u32_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_i8 :: U32 -> I8 u32_to_i8 x = if x < 0 || x > 127 then error "u32_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_i12 :: U32 -> I12 u32_to_i12 x = if x < 0 || x > 2047 then error "u32_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_i14 :: U32 -> I14 u32_to_i14 x = if x < 0 || x > 8191 then error "u32_to_i14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_i16 :: U32 -> I16 u32_to_i16 x = if x < 0 || x > 32767 then error "u32_to_i16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_i24 :: U32 -> I24 u32_to_i24 x = if x < 0 || x > 8388607 then error "u32_to_i24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u32_to_i32 :: U32 -> I32 u32_to_i32 x = if x < 0 || x > 2147483647 then error "u32_to_i32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' u32_to_i64 :: U32 -> I64 u32_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_u4 :: U64 -> U4 u64_to_u4 x = if x < 0 || x > 15 then error "u64_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_u7 :: U64 -> U7 u64_to_u7 x = if x < 0 || x > 127 then error "u64_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_u8 :: U64 -> U8 u64_to_u8 x = if x < 0 || x > 255 then error "u64_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_u12 :: U64 -> U12 u64_to_u12 x = if x < 0 || x > 4095 then error "u64_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_u14 :: U64 -> U14 u64_to_u14 x = if x < 0 || x > 16383 then error "u64_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_u16 :: U64 -> U16 u64_to_u16 x = if x < 0 || x > 65535 then error "u64_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_u24 :: U64 -> U24 u64_to_u24 x = if x < 0 || x > 16777215 then error "u64_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_u32 :: U64 -> U32 u64_to_u32 x = if x < 0 || x > 4294967295 then error "u64_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_i4 :: U64 -> I4 u64_to_i4 x = if x < 0 || x > 7 then error "u64_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_i7 :: U64 -> I7 u64_to_i7 x = if x < 0 || x > 63 then error "u64_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_i8 :: U64 -> I8 u64_to_i8 x = if x < 0 || x > 127 then error "u64_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_i12 :: U64 -> I12 u64_to_i12 x = if x < 0 || x > 2047 then error "u64_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_i14 :: U64 -> I14 u64_to_i14 x = if x < 0 || x > 8191 then error "u64_to_i14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_i16 :: U64 -> I16 u64_to_i16 x = if x < 0 || x > 32767 then error "u64_to_i16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_i24 :: U64 -> I24 u64_to_i24 x = if x < 0 || x > 8388607 then error "u64_to_i24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_i32 :: U64 -> I32 u64_to_i32 x = if x < 0 || x > 2147483647 then error "u64_to_i32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. u64_to_i64 :: U64 -> I64 u64_to_i64 x = if x < 0 || x > 9223372036854775807 then error "u64_to_i64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i4_to_u4 :: I4 -> U4 i4_to_u4 x = if x < 0 then error "i4_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i4_to_u7 :: I4 -> U7 i4_to_u7 x = if x < 0 then error "i4_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i4_to_u8 :: I4 -> U8 i4_to_u8 x = if x < 0 then error "i4_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i4_to_u12 :: I4 -> U12 i4_to_u12 x = if x < 0 then error "i4_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i4_to_u14 :: I4 -> U14 i4_to_u14 x = if x < 0 then error "i4_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i4_to_u16 :: I4 -> U16 i4_to_u16 x = if x < 0 then error "i4_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i4_to_u24 :: I4 -> U24 i4_to_u24 x = if x < 0 then error "i4_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i4_to_u32 :: I4 -> U32 i4_to_u32 x = if x < 0 then error "i4_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i4_to_u64 :: I4 -> U64 i4_to_u64 x = if x < 0 then error "i4_to_u64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' i4_to_i7 :: I4 -> I7 i4_to_i7 = fromIntegral -- | Type specialised 'fromIntegral' i4_to_i8 :: I4 -> I8 i4_to_i8 = fromIntegral -- | Type specialised 'fromIntegral' i4_to_i12 :: I4 -> I12 i4_to_i12 = fromIntegral -- | Type specialised 'fromIntegral' i4_to_i14 :: I4 -> I14 i4_to_i14 = fromIntegral -- | Type specialised 'fromIntegral' i4_to_i16 :: I4 -> I16 i4_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' i4_to_i24 :: I4 -> I24 i4_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' i4_to_i32 :: I4 -> I32 i4_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' i4_to_i64 :: I4 -> I64 i4_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_u4 :: I7 -> U4 i7_to_u4 x = if x < 0 || x > 15 then error "i7_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_u7 :: I7 -> U7 i7_to_u7 x = if x < 0 then error "i7_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_u8 :: I7 -> U8 i7_to_u8 x = if x < 0 then error "i7_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_u12 :: I7 -> U12 i7_to_u12 x = if x < 0 then error "i7_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_u14 :: I7 -> U14 i7_to_u14 x = if x < 0 then error "i7_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_u16 :: I7 -> U16 i7_to_u16 x = if x < 0 then error "i7_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_u24 :: I7 -> U24 i7_to_u24 x = if x < 0 then error "i7_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_u32 :: I7 -> U32 i7_to_u32 x = if x < 0 then error "i7_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_u64 :: I7 -> U64 i7_to_u64 x = if x < 0 then error "i7_to_u64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i7_to_i4 :: I7 -> I4 i7_to_i4 x = if x < -8 || x > 7 then error "i7_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' i7_to_i8 :: I7 -> I8 i7_to_i8 = fromIntegral -- | Type specialised 'fromIntegral' i7_to_i12 :: I7 -> I12 i7_to_i12 = fromIntegral -- | Type specialised 'fromIntegral' i7_to_i14 :: I7 -> I14 i7_to_i14 = fromIntegral -- | Type specialised 'fromIntegral' i7_to_i16 :: I7 -> I16 i7_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' i7_to_i24 :: I7 -> I24 i7_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' i7_to_i32 :: I7 -> I32 i7_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' i7_to_i64 :: I7 -> I64 i7_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_u4 :: I8 -> U4 i8_to_u4 x = if x < 0 || x > 15 then error "i8_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_u7 :: I8 -> U7 i8_to_u7 x = if x < 0 || x > 127 then error "i8_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_u8 :: I8 -> U8 i8_to_u8 x = if x < 0 then error "i8_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_u12 :: I8 -> U12 i8_to_u12 x = if x < 0 then error "i8_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_u14 :: I8 -> U14 i8_to_u14 x = if x < 0 then error "i8_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_u16 :: I8 -> U16 i8_to_u16 x = if x < 0 then error "i8_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_u24 :: I8 -> U24 i8_to_u24 x = if x < 0 then error "i8_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_u32 :: I8 -> U32 i8_to_u32 x = if x < 0 then error "i8_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_u64 :: I8 -> U64 i8_to_u64 x = if x < 0 then error "i8_to_u64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_i4 :: I8 -> I4 i8_to_i4 x = if x < -8 || x > 7 then error "i8_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i8_to_i7 :: I8 -> I7 i8_to_i7 x = if x < -64 || x > 63 then error "i8_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' i8_to_i12 :: I8 -> I12 i8_to_i12 = fromIntegral -- | Type specialised 'fromIntegral' i8_to_i14 :: I8 -> I14 i8_to_i14 = fromIntegral -- | Type specialised 'fromIntegral' i8_to_i16 :: I8 -> I16 i8_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' i8_to_i24 :: I8 -> I24 i8_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' i8_to_i32 :: I8 -> I32 i8_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' i8_to_i64 :: I8 -> I64 i8_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_u4 :: I12 -> U4 i12_to_u4 x = if x < 0 || x > 15 then error "i12_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_u7 :: I12 -> U7 i12_to_u7 x = if x < 0 || x > 127 then error "i12_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_u8 :: I12 -> U8 i12_to_u8 x = if x < 0 || x > 255 then error "i12_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_u12 :: I12 -> U12 i12_to_u12 x = if x < 0 then error "i12_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_u14 :: I12 -> U14 i12_to_u14 x = if x < 0 then error "i12_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_u16 :: I12 -> U16 i12_to_u16 x = if x < 0 then error "i12_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_u24 :: I12 -> U24 i12_to_u24 x = if x < 0 then error "i12_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_u32 :: I12 -> U32 i12_to_u32 x = if x < 0 then error "i12_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_u64 :: I12 -> U64 i12_to_u64 x = if x < 0 then error "i12_to_u64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_i4 :: I12 -> I4 i12_to_i4 x = if x < -8 || x > 7 then error "i12_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_i7 :: I12 -> I7 i12_to_i7 x = if x < -64 || x > 63 then error "i12_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i12_to_i8 :: I12 -> I8 i12_to_i8 x = if x < -128 || x > 127 then error "i12_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' i12_to_i14 :: I12 -> I14 i12_to_i14 = fromIntegral -- | Type specialised 'fromIntegral' i12_to_i16 :: I12 -> I16 i12_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' i12_to_i24 :: I12 -> I24 i12_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' i12_to_i32 :: I12 -> I32 i12_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' i12_to_i64 :: I12 -> I64 i12_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_u4 :: I14 -> U4 i14_to_u4 x = if x < 0 || x > 15 then error "i14_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_u7 :: I14 -> U7 i14_to_u7 x = if x < 0 || x > 127 then error "i14_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_u8 :: I14 -> U8 i14_to_u8 x = if x < 0 || x > 255 then error "i14_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_u12 :: I14 -> U12 i14_to_u12 x = if x < 0 || x > 4095 then error "i14_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_u14 :: I14 -> U14 i14_to_u14 x = if x < 0 then error "i14_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_u16 :: I14 -> U16 i14_to_u16 x = if x < 0 then error "i14_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_u24 :: I14 -> U24 i14_to_u24 x = if x < 0 then error "i14_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_u32 :: I14 -> U32 i14_to_u32 x = if x < 0 then error "i14_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_u64 :: I14 -> U64 i14_to_u64 x = if x < 0 then error "i14_to_u64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_i4 :: I14 -> I4 i14_to_i4 x = if x < -8 || x > 7 then error "i14_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_i7 :: I14 -> I7 i14_to_i7 x = if x < -64 || x > 63 then error "i14_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_i8 :: I14 -> I8 i14_to_i8 x = if x < -128 || x > 127 then error "i14_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i14_to_i12 :: I14 -> I12 i14_to_i12 x = if x < -2048 || x > 2047 then error "i14_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' i14_to_i16 :: I14 -> I16 i14_to_i16 = fromIntegral -- | Type specialised 'fromIntegral' i14_to_i24 :: I14 -> I24 i14_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' i14_to_i32 :: I14 -> I32 i14_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' i14_to_i64 :: I14 -> I64 i14_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_u4 :: I16 -> U4 i16_to_u4 x = if x < 0 || x > 15 then error "i16_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_u7 :: I16 -> U7 i16_to_u7 x = if x < 0 || x > 127 then error "i16_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_u8 :: I16 -> U8 i16_to_u8 x = if x < 0 || x > 255 then error "i16_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_u12 :: I16 -> U12 i16_to_u12 x = if x < 0 || x > 4095 then error "i16_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_u14 :: I16 -> U14 i16_to_u14 x = if x < 0 || x > 16383 then error "i16_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_u16 :: I16 -> U16 i16_to_u16 x = if x < 0 then error "i16_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_u24 :: I16 -> U24 i16_to_u24 x = if x < 0 then error "i16_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_u32 :: I16 -> U32 i16_to_u32 x = if x < 0 then error "i16_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_u64 :: I16 -> U64 i16_to_u64 x = if x < 0 then error "i16_to_u64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_i4 :: I16 -> I4 i16_to_i4 x = if x < -8 || x > 7 then error "i16_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_i7 :: I16 -> I7 i16_to_i7 x = if x < -64 || x > 63 then error "i16_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_i8 :: I16 -> I8 i16_to_i8 x = if x < -128 || x > 127 then error "i16_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_i12 :: I16 -> I12 i16_to_i12 x = if x < -2048 || x > 2047 then error "i16_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i16_to_i14 :: I16 -> I14 i16_to_i14 x = if x < -8192 || x > 8191 then error "i16_to_i14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' i16_to_i24 :: I16 -> I24 i16_to_i24 = fromIntegral -- | Type specialised 'fromIntegral' i16_to_i32 :: I16 -> I32 i16_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' i16_to_i64 :: I16 -> I64 i16_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_u4 :: I24 -> U4 i24_to_u4 x = if x < 0 || x > 15 then error "i24_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_u7 :: I24 -> U7 i24_to_u7 x = if x < 0 || x > 127 then error "i24_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_u8 :: I24 -> U8 i24_to_u8 x = if x < 0 || x > 255 then error "i24_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_u12 :: I24 -> U12 i24_to_u12 x = if x < 0 || x > 4095 then error "i24_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_u14 :: I24 -> U14 i24_to_u14 x = if x < 0 || x > 16383 then error "i24_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_u16 :: I24 -> U16 i24_to_u16 x = if x < 0 || x > 65535 then error "i24_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_u24 :: I24 -> U24 i24_to_u24 x = if x < 0 then error "i24_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_u32 :: I24 -> U32 i24_to_u32 x = if x < 0 then error "i24_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_u64 :: I24 -> U64 i24_to_u64 x = if x < 0 then error "i24_to_u64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_i4 :: I24 -> I4 i24_to_i4 x = if x < -8 || x > 7 then error "i24_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_i7 :: I24 -> I7 i24_to_i7 x = if x < -64 || x > 63 then error "i24_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_i8 :: I24 -> I8 i24_to_i8 x = if x < -128 || x > 127 then error "i24_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_i12 :: I24 -> I12 i24_to_i12 x = if x < -2048 || x > 2047 then error "i24_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_i14 :: I24 -> I14 i24_to_i14 x = if x < -8192 || x > 8191 then error "i24_to_i14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i24_to_i16 :: I24 -> I16 i24_to_i16 x = if x < -32768 || x > 32767 then error "i24_to_i16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' i24_to_i32 :: I24 -> I32 i24_to_i32 = fromIntegral -- | Type specialised 'fromIntegral' i24_to_i64 :: I24 -> I64 i24_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_u4 :: I32 -> U4 i32_to_u4 x = if x < 0 || x > 15 then error "i32_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_u7 :: I32 -> U7 i32_to_u7 x = if x < 0 || x > 127 then error "i32_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_u8 :: I32 -> U8 i32_to_u8 x = if x < 0 || x > 255 then error "i32_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_u12 :: I32 -> U12 i32_to_u12 x = if x < 0 || x > 4095 then error "i32_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_u14 :: I32 -> U14 i32_to_u14 x = if x < 0 || x > 16383 then error "i32_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_u16 :: I32 -> U16 i32_to_u16 x = if x < 0 || x > 65535 then error "i32_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_u24 :: I32 -> U24 i32_to_u24 x = if x < 0 || x > 16777215 then error "i32_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_u32 :: I32 -> U32 i32_to_u32 x = if x < 0 then error "i32_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_u64 :: I32 -> U64 i32_to_u64 x = if x < 0 then error "i32_to_u64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_i4 :: I32 -> I4 i32_to_i4 x = if x < -8 || x > 7 then error "i32_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_i7 :: I32 -> I7 i32_to_i7 x = if x < -64 || x > 63 then error "i32_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_i8 :: I32 -> I8 i32_to_i8 x = if x < -128 || x > 127 then error "i32_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_i12 :: I32 -> I12 i32_to_i12 x = if x < -2048 || x > 2047 then error "i32_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_i14 :: I32 -> I14 i32_to_i14 x = if x < -8192 || x > 8191 then error "i32_to_i14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_i16 :: I32 -> I16 i32_to_i16 x = if x < -32768 || x > 32767 then error "i32_to_i16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i32_to_i24 :: I32 -> I24 i32_to_i24 x = if x < -8388608 || x > 8388607 then error "i32_to_i24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' i32_to_i64 :: I32 -> I64 i32_to_i64 = fromIntegral -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_u4 :: I64 -> U4 i64_to_u4 x = if x < 0 || x > 15 then error "i64_to_u4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_u7 :: I64 -> U7 i64_to_u7 x = if x < 0 || x > 127 then error "i64_to_u7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_u8 :: I64 -> U8 i64_to_u8 x = if x < 0 || x > 255 then error "i64_to_u8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_u12 :: I64 -> U12 i64_to_u12 x = if x < 0 || x > 4095 then error "i64_to_u12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_u14 :: I64 -> U14 i64_to_u14 x = if x < 0 || x > 16383 then error "i64_to_u14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_u16 :: I64 -> U16 i64_to_u16 x = if x < 0 || x > 65535 then error "i64_to_u16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_u24 :: I64 -> U24 i64_to_u24 x = if x < 0 || x > 16777215 then error "i64_to_u24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_u32 :: I64 -> U32 i64_to_u32 x = if x < 0 || x > 4294967295 then error "i64_to_u32: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_u64 :: I64 -> U64 i64_to_u64 x = if x < 0 then error "i64_to_u64: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_i4 :: I64 -> I4 i64_to_i4 x = if x < -8 || x > 7 then error "i64_to_i4: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_i7 :: I64 -> I7 i64_to_i7 x = if x < -64 || x > 63 then error "i64_to_i7: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_i8 :: I64 -> I8 i64_to_i8 x = if x < -128 || x > 127 then error "i64_to_i8: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_i12 :: I64 -> I12 i64_to_i12 x = if x < -2048 || x > 2047 then error "i64_to_i12: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_i14 :: I64 -> I14 i64_to_i14 x = if x < -8192 || x > 8191 then error "i64_to_i14: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_i16 :: I64 -> I16 i64_to_i16 x = if x < -32768 || x > 32767 then error "i64_to_i16: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_i24 :: I64 -> I24 i64_to_i24 x = if x < -8388608 || x > 8388607 then error "i64_to_i24: OUT-OF-RANGE" else fromIntegral x -- | Type specialised 'fromIntegral' with out-of-range error. i64_to_i32 :: I64 -> I32 i64_to_i32 x = if x < -2147483648 || x > 2147483647 then error "i64_to_i32: OUT-OF-RANGE" else fromIntegral x