@@ -732,7 +732,7 @@ cgConst c@(TT.B16V v) = box (FArith (ATInt (ITVec IT16 (V.length v)))) (Constant
732732cgConst c@(TT.B32V v) = box (FArith (ATInt (ITVec IT32 (V.length v)))) (ConstantOperand $ cgConst' c)
733733cgConst c@(TT.B64V v) = box (FArith (ATInt (ITVec IT64 (V.length v)))) (ConstantOperand $ cgConst' c)
734734cgConst c@(TT.Fl _) = box (FArith ATFloat) (ConstantOperand $ cgConst' c)
735−cgConst c@(TT.Ch _) = box FChar (ConstantOperand $ cgConst' c)
735+cgConst c@(TT.Ch _) = box (FArith (ATInt ITChar)) (ConstantOperand $ cgConst' c)
736736cgConst c@(TT.Str s) = do
737737 str <- addGlobal' (ArrayType (1 + fromIntegral (length s)) (IntegerType 8)) (cgConst' c)
738738 box FString (ConstantOperand $ C.GetElementPtr True str [C.Int 32 0, C.Int 32 0])
@@ -947,7 +947,7 @@ cgOp (LStrInt ity) [s] = do
947947cgOp LStrConcat [x,y] = cgStrCat x y
948948
949949cgOp LStrCons [c,s] = do
950− nc <- unbox FChar c
950+ nc <- unbox (FArith (ATInt ITChar)) c
951951 ns <- unbox FString s
952952 nc' <- inst $ Trunc nc (IntegerType 8) []
953953 r <- inst $ simpleCall "__idris_strCons" [nc', ns]
@@ -957,7 +957,7 @@ cgOp LStrHead [c] = do
957957 s <- unbox FString c
958958 c <- inst $ Load False s Nothing 0 []
959959 c' <- inst $ ZExt c (IntegerType 32) []
960− box FChar c'
960+ box (FArith (ATInt ITChar)) c'
961961
962962cgOp LStrIndex [s, i] = do
963963 ns <- unbox FString s
@@ -965,7 +965,7 @@ cgOp LStrIndex [s, i] = do
965965 p <- inst $ GetElementPtr True ns [ni] []
966966 c <- inst $ Load False p Nothing 0 []
967967 c' <- inst $ ZExt c (IntegerType 32) []
968− box FChar c'
968+ box (FArith (ATInt ITChar)) c'
969969
970970cgOp LStrTail [c] = do
971971 s <- unbox FString c