@@ -732,7 +732,7 @@ cgConst c@(TT.B16V v) = box (FArith (ATInt (ITVec IT16 (V.length v)))) (Constant
732cgConst c@(TT.B32V v) = box (FArith (ATInt (ITVec IT32 (V.length v)))) (ConstantOperand $ cgConst' c)
732cgConst c@(TT.B32V v) = box (FArith (ATInt (ITVec IT32 (V.length v)))) (ConstantOperand $ cgConst' c)
733cgConst c@(TT.B64V v) = box (FArith (ATInt (ITVec IT64 (V.length v)))) (ConstantOperand $ cgConst' c)
733cgConst c@(TT.B64V v) = box (FArith (ATInt (ITVec IT64 (V.length v)))) (ConstantOperand $ cgConst' c)
734cgConst c@(TT.Fl _) = box (FArith ATFloat) (ConstantOperand $ cgConst' c)
734cgConst 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)
736cgConst c@(TT.Str s) = do
736cgConst c@(TT.Str s) = do
737 str <- addGlobal' (ArrayType (1 + fromIntegral (length s)) (IntegerType 8)) (cgConst' c)
737 str <- addGlobal' (ArrayType (1 + fromIntegral (length s)) (IntegerType 8)) (cgConst' c)
738 box FString (ConstantOperand $ C.GetElementPtr True str [C.Int 32 0, C.Int 32 0])
738 box FString (ConstantOperand $ C.GetElementPtr True str [C.Int 32 0, C.Int 32 0])
@@ -947,7 +947,7 @@ cgOp (LStrInt ity) [s] = do
947cgOp LStrConcat [x,y] = cgStrCat x y
947cgOp LStrConcat [x,y] = cgStrCat x y
949cgOp LStrCons [c,s] = do
949cgOp LStrCons [c,s] = do
950− nc <- unbox FChar c
950+ nc <- unbox (FArith (ATInt ITChar)) c
951 ns <- unbox FString s
951 ns <- unbox FString s
952 nc' <- inst $ Trunc nc (IntegerType 8) []
952 nc' <- inst $ Trunc nc (IntegerType 8) []
953 r <- inst $ simpleCall "__idris_strCons" [nc', ns]
953 r <- inst $ simpleCall "__idris_strCons" [nc', ns]
@@ -957,7 +957,7 @@ cgOp LStrHead [c] = do
957 s <- unbox FString c
957 s <- unbox FString c
958 c <- inst $ Load False s Nothing 0 []
958 c <- inst $ Load False s Nothing 0 []
959 c' <- inst $ ZExt c (IntegerType 32) []
959 c' <- inst $ ZExt c (IntegerType 32) []
960− box FChar c'
960+ box (FArith (ATInt ITChar)) c'
962cgOp LStrIndex [s, i] = do
962cgOp LStrIndex [s, i] = do
963 ns <- unbox FString s
963 ns <- unbox FString s
@@ -965,7 +965,7 @@ cgOp LStrIndex [s, i] = do
965 p <- inst $ GetElementPtr True ns [ni] []
965 p <- inst $ GetElementPtr True ns [ni] []
966 c <- inst $ Load False p Nothing 0 []
966 c <- inst $ Load False p Nothing 0 []
967 c' <- inst $ ZExt c (IntegerType 32) []
967 c' <- inst $ ZExt c (IntegerType 32) []
968− box FChar c'
968+ box (FArith (ATInt ITChar)) c'
970cgOp LStrTail [c] = do
970cgOp LStrTail [c] = do
971 s <- unbox FString c
971 s <- unbox FString c