replaceVar =
AST.VarDec resId
(AST.SubtypeIn vectorTM
- (Just $ AST.IndexConstraint
+ (Just $ AST.ConstraintIndex $ AST.IndexConstraint
[AST.ToRange (AST.PrimLit "0")
(AST.PrimName (AST.NAttribute $
AST.AttribName (AST.NSimple vecPar) lengthId Nothing) AST.:-:
initVar =
AST.VarDec resId
(AST.SubtypeIn vectorTM
- (Just $ AST.IndexConstraint
+ (Just $ AST.ConstraintIndex $ AST.IndexConstraint
[AST.ToRange (AST.PrimLit "0")
(AST.PrimName (AST.NAttribute $
AST.AttribName (AST.NSimple vecPar) lengthId Nothing) AST.:-:
tailVar =
AST.VarDec resId
(AST.SubtypeIn vectorTM
- (Just $ AST.IndexConstraint
+ (Just $ AST.ConstraintIndex $ AST.IndexConstraint
[AST.ToRange (AST.PrimLit "0")
(AST.PrimName (AST.NAttribute $
AST.AttribName (AST.NSimple vecPar) lengthId Nothing) AST.:-:
takeVar =
AST.VarDec resId
(AST.SubtypeIn vectorTM
- (Just $ AST.IndexConstraint
+ (Just $ AST.ConstraintIndex $ AST.IndexConstraint
[AST.ToRange (AST.PrimLit "0")
((AST.PrimName (AST.NSimple nPar)) AST.:-:
(AST.PrimLit "1")) ]))
dropVar =
AST.VarDec resId
(AST.SubtypeIn vectorTM
- (Just $ AST.IndexConstraint
+ (Just $ AST.ConstraintIndex $ AST.IndexConstraint
[AST.ToRange (AST.PrimLit "0")
(AST.PrimName (AST.NAttribute $
AST.AttribName (AST.NSimple vecPar) lengthId Nothing) AST.:-:
elem_types_map <- getA vsElemTypes
el_ty_tm <- vhdl_ty el_ty
let ty_id = mkVHDLExtId $ "vector-"++ (AST.fromVHDLId el_ty_tm) ++ "-0_to_" ++ (show len)
- let range = AST.IndexConstraint [AST.ToRange (AST.PrimLit "0") (AST.PrimLit $ show (len - 1))]
+ let range = AST.ConstraintIndex $ AST.IndexConstraint [AST.ToRange (AST.PrimLit "0") (AST.PrimLit $ show (len - 1))]
let existing_elem_ty = (fmap fst) $ Map.lookup (OrdType el_ty) elem_types_map
case existing_elem_ty of
Just t -> do
-> VHDLState (AST.TypeMark, AST.SubtypeIn) -- The typemark created.
mk_natural_ty min_bound max_bound ty = do
let ty_id = mkVHDLExtId $ "nat_" ++ (show min_bound) ++ "_to_" ++ (show max_bound)
- let ty_def = AST.SubtypeIn naturalTM (Nothing)
+ let range = AST.ConstraintRange $ AST.SubTypeRange (AST.PrimLit $ (show min_bound)) (AST.PrimLit $ (show max_bound))
+ let ty_def = AST.SubtypeIn naturalTM (Just range)
return (ty_id, ty_def)
stability: alpha
maintainer: christiaan.baaij@gmail.com & matthijs@stdin.nl
build-depends: base > 4, syb, ghc, ghc-paths, transformers, haskell98,
- ForSyDe, regex-posix ,data-accessor-template, pretty,
+ ForSyDe > 3.0, regex-posix ,data-accessor-template, pretty,
data-accessor, containers, prettyclass, tfp > 0.3,
tfvec, QuickCheck, template-haskell