@@ -524,7 +524,6 @@ instance Pretty NativeTy OutputAnnotation where
524 pretty IT64 = text "Bits64"
524 pretty IT64 = text "Bits64"
526data IntTy = ITFixed NativeTy | ITNative | ITBig | ITChar
526data IntTy = ITFixed NativeTy | ITNative | ITBig | ITChar
527− | ITVec NativeTy Int
528 deriving (Show, Eq, Ord, Data, Typeable)
527 deriving (Show, Eq, Ord, Data, Typeable)
530intTyName :: IntTy -> String
529intTyName :: IntTy -> String
@@ -532,7 +531,6 @@ intTyName ITNative = "Int"
532intTyName ITBig = "BigInt"
531intTyName ITBig = "BigInt"
533intTyName (ITFixed sized) = "B" ++ show (nativeTyWidth sized)
532intTyName (ITFixed sized) = "B" ++ show (nativeTyWidth sized)
534intTyName (ITChar) = "Char"
533intTyName (ITChar) = "Char"
535−intTyName (ITVec ity count) = "B" ++ show (nativeTyWidth ity) ++ "x" ++ show count
537data ArithTy = ATInt IntTy | ATFloat -- TODO: Float vectors https://github.com/idris-lang/Idris-dev/issues/1723
535data ArithTy = ATInt IntTy | ATFloat -- TODO: Float vectors https://github.com/idris-lang/Idris-dev/issues/1723
538 deriving (Show, Eq, Ord, Data, Typeable)
536 deriving (Show, Eq, Ord, Data, Typeable)
@@ -547,7 +545,6 @@ instance Pretty ArithTy OutputAnnotation where
547 pretty (ATInt ITBig) = text "BigInt"
545 pretty (ATInt ITBig) = text "BigInt"
548 pretty (ATInt ITChar) = text "Char"
546 pretty (ATInt ITChar) = text "Char"
549 pretty (ATInt (ITFixed n)) = pretty n
547 pretty (ATInt (ITFixed n)) = pretty n
550− pretty (ATInt (ITVec e c)) = pretty e <> text "x" <> (text . show $ c)
551 pretty ATFloat = text "Float"
548 pretty ATFloat = text "Float"
553nativeTyWidth :: NativeTy -> Int
550nativeTyWidth :: NativeTy -> Int
@@ -567,7 +564,7 @@ data Const = I Int | BI Integer | Fl Double | Ch Char | Str String
567 | B8 Word8 | B16 Word16 | B32 Word32 | B64 Word64
564 | B8 Word8 | B16 Word16 | B32 Word32 | B64 Word64
568 | AType ArithTy | StrType
565 | AType ArithTy | StrType
569 | WorldType | TheWorld
566 | WorldType | TheWorld
570− | PtrType | ManagedPtrType | VoidType | Forgot
567+ | VoidType | Forgot
571 deriving (Eq, Ord, Data, Typeable)
568 deriving (Eq, Ord, Data, Typeable)
573deriving instance Binary Const
570deriving instance Binary Const
@@ -577,9 +574,7 @@ deriving instance NFData Const
577isTypeConst :: Const -> Bool
574isTypeConst :: Const -> Bool
578isTypeConst (AType _) = True
575isTypeConst (AType _) = True
579isTypeConst StrType = True
576isTypeConst StrType = True
580−isTypeConst ManagedPtrType = True
581isTypeConst WorldType = True
577isTypeConst WorldType = True
582−isTypeConst PtrType = True
583isTypeConst VoidType = True
578isTypeConst VoidType = True
584isTypeConst _ = False
579isTypeConst _ = False
@@ -596,8 +591,6 @@ instance Pretty Const OutputAnnotation where
596 pretty StrType = text "String"
591 pretty StrType = text "String"
597 pretty TheWorld = text "%theWorld"
592 pretty TheWorld = text "%theWorld"
598 pretty WorldType = text "prim__World"
593 pretty WorldType = text "prim__World"
599− pretty PtrType = text "Ptr"
600− pretty ManagedPtrType = text "Ptr"
601 pretty VoidType = text "Void"
594 pretty VoidType = text "Void"
602 pretty Forgot = text "Forgot"
595 pretty Forgot = text "Forgot"
603 pretty (B8 w) = text . show $ w
596 pretty (B8 w) = text . show $ w
@@ -625,16 +618,10 @@ constDocs c@(AType (ATInt ITNative)) = "Fixed-precision integers of undefi
625constDocs c@(AType (ATInt ITChar)) = "Characters in some unspecified encoding"
618constDocs c@(AType (ATInt ITChar)) = "Characters in some unspecified encoding"
626constDocs c@(AType ATFloat) = "Double-precision floating-point numbers"
619constDocs c@(AType ATFloat) = "Double-precision floating-point numbers"
627constDocs StrType = "Strings in some unspecified encoding"
620constDocs StrType = "Strings in some unspecified encoding"
628−constDocs PtrType = "Foreign pointers"
629−constDocs ManagedPtrType = "Managed pointers"
630constDocs c@(AType (ATInt (ITFixed IT8))) = "Eight bits (unsigned)"
621constDocs c@(AType (ATInt (ITFixed IT8))) = "Eight bits (unsigned)"
631constDocs c@(AType (ATInt (ITFixed IT16))) = "Sixteen bits (unsigned)"
622constDocs c@(AType (ATInt (ITFixed IT16))) = "Sixteen bits (unsigned)"
632constDocs c@(AType (ATInt (ITFixed IT32))) = "Thirty-two bits (unsigned)"
623constDocs c@(AType (ATInt (ITFixed IT32))) = "Thirty-two bits (unsigned)"
633constDocs c@(AType (ATInt (ITFixed IT64))) = "Sixty-four bits (unsigned)"
624constDocs c@(AType (ATInt (ITFixed IT64))) = "Sixty-four bits (unsigned)"
634−constDocs c@(AType (ATInt (ITVec IT8 16))) = "Vectors of sixteen eight-bit values"
635−constDocs c@(AType (ATInt (ITVec IT16 8))) = "Vectors of eight sixteen-bit values"
636−constDocs c@(AType (ATInt (ITVec IT32 4))) = "Vectors of four thirty-two-bit values"
637−constDocs c@(AType (ATInt (ITVec IT64 2))) = "Vectors of two sixty-four-bit values"
638constDocs (Fl f) = "A float"
625constDocs (Fl f) = "A float"
639constDocs (I i) = "A fixed-precision integer"
626constDocs (I i) = "A fixed-precision integer"
640constDocs (BI i) = "An arbitrary-precision integer"
627constDocs (BI i) = "An arbitrary-precision integer"
@@ -1295,12 +1282,9 @@ instance Show Const where
1295 show (AType (ATInt ITNative)) = "Int"
1282 show (AType (ATInt ITNative)) = "Int"
1296 show (AType (ATInt ITChar)) = "Char"
1283 show (AType (ATInt ITChar)) = "Char"
1297 show (AType (ATInt (ITFixed it))) = itBitsName it
1284 show (AType (ATInt (ITFixed it))) = itBitsName it
1298− show (AType (ATInt (ITVec it c))) = itBitsName it ++ "x" ++ show c
1299 show TheWorld = "prim__TheWorld"
1285 show TheWorld = "prim__TheWorld"
1300 show WorldType = "prim__WorldType"
1286 show WorldType = "prim__WorldType"
1301 show StrType = "String"
1287 show StrType = "String"
1302− show PtrType = "Ptr"
1303− show ManagedPtrType = "ManagedPtr"
1304 show VoidType = "Void"
1288 show VoidType = "Void"
1306showEnv :: (Eq n, Show n) => EnvTT n -> TT n -> String
1290showEnv :: (Eq n, Show n) => EnvTT n -> TT n -> String