syntax changes to type and type family declarations

All the type and type family declarations should end with "end;"

Note: Record and Cart_Prod both end with "end;", so in cases where there isn't anything following that, it should be "end; end;" to note end of Record/Cart_Prod and end of type declaration.