diff -rN old-timber/include/arrays.c new-timber/include/arrays.c
39,40c39,40
<         Int len = 0;
<         Int i = 0;
---
>         WORD len = 0;
>         WORD i = 0;
42c42
<         while ((Int)ys) {len++; ys = ((CONS)ys)->b;}; // not nice to compute the length here ...
---
>         while ((WORD)ys) {len++; ys = ((CONS)ys)->b;}; // not nice to compute the length here ...
47c47
<         while((Int)ys) {res->elems[i] = ((CONS)ys)->a; ys = ((CONS)ys)->b; i++;}
---
>         while((WORD)ys) {res->elems[i] = ((CONS)ys)->a; ys = ((CONS)ys)->b; i++;}
51,52c51,52
< Array primUniArray(BITS32 polytag, Int len, POLY a) {
<         Int i;
---
> Array primUniArray(BITS32 polytag, WORD len, POLY a) {
>         WORD i;
60c60
< Array EmptyArray(BITS32 polytag, Int len) {
---
> Array EmptyArray(BITS32 polytag, WORD len) {
67c67
< Array CloneArray(BITS32 polytag, Array a, Int lev) {
---
> Array CloneArray(BITS32 polytag, Array a, WORD lev) {
70c70
<         Int i; 
---
>         WORD i; 
86c86
< Array primUpdateArray(BITS32 polytag, Array a, Int i, POLY v) {
---
> Array primUpdateArray(BITS32 polytag, Array a, WORD i, POLY v) {
diff -rN old-timber/include/timber.c new-timber/include/timber.c
102c102
<   Int (*Code)(Msg);
---
>   WORD (*Code)(Msg);
115c115
<   Int size;
---
>   WORD size;
136c136
<         n->a = (POLY)(Int)*p++;
---
>         n->a = (POLY)(WORD)*p++;
141c141
<                 n->a = (POLY)(Int)*p++;
---
>                 n->a = (POLY)(WORD)*p++;
147c147
< Int strEq (LIST s1, LIST s2) {
---
> WORD strEq (LIST s1, LIST s2) {
150c150
<     switch ((Int)s1) {
---
>     switch ((WORD)s1) {
152c152
<       return ((Int)s2==0);
---
>       return ((WORD)s2==0);
154c154
<       switch ((Int)s2) {
---
>       switch ((WORD)s2) {
158,159c158,159
< 	c1 = (Int)((CONS)s1)->a;
< 	c2 = (Int)((CONS)s2)->a;
---
> 	c1 = (WORD)((CONS)s1)->a;
> 	c2 = (WORD)((CONS)s2)->a;
diff -rN old-timber/include/timber.h new-timber/include/timber.h
121c121
<   Int Tag;
---
>   WORD Tag;
127c127
<   Int Tag;
---
>   WORD Tag;
134c134
<   Int Tag;
---
>   WORD Tag;
141c141
<   Int (*Code)(Msg);
---
>   WORD (*Code)(Msg);
150c150
<   Int size;
---
>   WORD size;
165,166c165,166
<   UNITTYPE (*reset) (TIMERTYPE, Int);
<   Time (*sample) (TIMERTYPE, Int);
---
>   UNITTYPE (*reset) (TIMERTYPE, WORD);
>   Time (*sample) (TIMERTYPE, WORD);
177c177
< POLY     Raise(BITS32, Int);
---
> POLY     Raise(BITS32, WORD);
180,183c180,183
< Array primUniArray(BITS32,Int,POLY);
< Array EmptyArray(BITS32,Int);
< Array CloneArray(BITS32,Array,Int);
< Array primUpdateArray(BITS32,Array,Int,POLY);
---
> Array primUniArray(BITS32,WORD,POLY);
> Array EmptyArray(BITS32,WORD);
> Array CloneArray(BITS32,Array,WORD);
> Array primUpdateArray(BITS32,Array,WORD,POLY);
185,186c185,186
< Array CYCLIC_BEGIN(Int, Int);
< void  CYCLIC_UPDATE(Array, Int, ADDR stop);
---
> Array CYCLIC_BEGIN(WORD, WORD);
> void  CYCLIC_UPDATE(Array, WORD, ADDR stop);
191c191
< TIMERTYPE primTIMERTERM(Int x);
---
> TIMERTYPE primTIMERTERM(WORD x);
196c196
< Int strEq (LIST s1, LIST s2) ;
---
> WORD strEq (LIST s1, LIST s2) ;
diff -rN old-timber/lib/BitOps.t new-timber/lib/BitOps.t
35a36,37
> instance intBITS64 :: IntLiteral BITS64 where
>     fromInt = primIntToBITS64
49a52
> default intInt < intBITS64
53a57,59
> instance fromBITS64 :: ToInt BITS64 where
>     toInt = primBITS64ToInt
> 
84a91,102
> instance bitsOpBits64 :: BitsOp BITS64 where
>     band   a b = primAND64 a b
>     bor    a b = primOR64  a b
>     bxor   a b = primEXOR64 a b
>     binv   a   = primNOT64 a
>     bsll   a i = primSHIFTL64 a i
>     bsrl   a i = primSHIFTR64 a i
>     bsra   a i = primSHIFTRA64 a i
>     bset   a i = primSET64 a i  
>     bclr   a i = primCLR64 a i
>     btst   a i = primTST64 a i
> 
120a139,141
> instance eqBits64 :: Eq BITS64 where
>     a == b = primBITS64ToInt a == primBITS64ToInt b
>     a /= b = primBITS64ToInt a /= primBITS64ToInt b
140a162,164
> 
> instance showBits64 :: Show BITS64 where 
>     show a = "0b" ++ showbits a 64
156d179
< 
158c181
< showh :: BITS32 -> Int -> String    
---
> showh :: a -> Int -> String    
166a190,192
> instance showHBits64 :: ShowHex BITS64 where 
>     showhex a = "0x" ++ showh a 16
> 
171c197
<     showhex a = "0x" ++ showh (fromInt(toInt a)) 4
---
>     showhex a = "0x" ++ showh a 4
174c200
<     showhex a = "0x" ++ showh (fromInt(toInt a)) 2
---
>     showhex a = "0x" ++ showh a 2
diff -rN old-timber/rtsPOSIX/configure new-timber/rtsPOSIX/configure
2874c2874,2875
< CFLAGS="$CFLAGS -m32"
---
> CFLAGS="$CFLAGS -m64"
> #CFLAGS="$CFLAGS -m32"
diff -rN old-timber/rtsPOSIX/cyclic.c new-timber/rtsPOSIX/cyclic.c
39,40c39,40
< #define ISPLACEHOLDER(obj)      (BIT0(obj) && ((int)(obj) < 0))
< #define INDEXOF(obj)            (((-(int)(obj)) >> 1) - current_thread->placeholders)
---
> #define ISPLACEHOLDER(obj)      (BIT0(obj) && ((WORD)(obj) < 0))
> #define INDEXOF(obj)            (((-(WORD)(obj)) >> 1) - current_thread->placeholders)
47c47
<                                                 int index = INDEXOF(obj1); \
---
>                                                 WORD index = INDEXOF(obj1); \
54,109c54,118
<         ADDR info = IND0(obj);
<         if (!info)                                      // if gcinfo is null we have reached the end of a heap segment
<                 return (ADDR)obj[1];                    // pointer to first object of next segment is found in subsequent slot
<         switch (GC_TYPE(info)) {
<                 case GC_STD: {
<                         WORD size = STATIC_SIZE(info), i = 2, offset = info[i];
<                         while (offset) {
<                                 SUBST(obj,offset,roots,limit);
<                                 offset = info[++i];
<                         }
<                         return obj + size;
<                 }
<                 case GC_ARRAY: {
<                         WORD size = STATIC_SIZE(info) + obj[1], offset = 2;     // find size of dynamic part in second slot of obj, add static size
<                         if (info[2])
<                                 return obj + size;                              // return immediately if array contains only scalars
<                         while (offset<size) {
<                                 SUBST(obj,offset,roots,limit);
<                                 offset++;
<                         }
<                         return obj + size;
<                 }
<                 case GC_TUPLE: {
<                         WORD width = obj[1], offset = 1 + POLYTAGS(width), i = 1, j, tags;
<                         while (width > 32) {
<                                 for (j = 0, tags = obj[i++]; j < 32; j++, offset++, tags = tags >> 1)
<                                         if (!(tags & 1))
<                                                 SUBST(obj,offset,roots,limit);
<                                 width -= 32;
<                         }
<                         for (tags = obj[i]; width > 0; width--, offset++, tags = tags >> 1) 
<                                 if (!(tags & 1))
<                                         SUBST(obj,offset,roots,limit);
<                         return obj + STATIC_SIZE(info) + width + POLYTAGS(width);
<                 }
<                 case GC_BIG: {
<                         WORD size = STATIC_SIZE(info), i = 2, offset = info[i];
<                         while (offset) {                                        // subst all statically known pointer fields
<                                 SUBST(obj,offset,roots,limit);
<                                 offset = info[++i];
<                         }
<                         offset = info[++i];
<                         while (offset) {                                        // subst dynamically identified pointers
<                                 WORD tagword = info[++i];
<                                 WORD bitno = info[++i];
<                                 if ((tagword & (1 << bitno)) == 0)
<                                         SUBST(obj,offset,roots,limit);
<                                 offset = info[++i];
<                         }
<                         return obj + size;
<                 }
<                 case GC_MUT: {
<                         return substObj(obj + STATIC_SIZE(info), roots, limit, current_thread);
<                 }
<         }
<         return (ADDR)0;                 // Not reached
---
> 	ADDR info = IND0(obj);
> 	if (!info)                                      // if gcinfo is null we have reached the end of a heap segment
> 		return (ADDR)obj[1];                    // pointer to first object of next segment is found in subsequent slot
> 	switch (GC_TYPE(info)) {
> 		case GC_STD: {
> 				     WORD size = STATIC_SIZE(info), i = 2, offset = info[i];
> 				     while (offset) 
> 				     {
> 					     /*SUBST(obj,offset,roots,limit);*/
> 					     { ADDR obj1 = (ADDR)obj[offset];
> 						     if (ISPLACEHOLDER(obj1)) 
>                                                      {
> 							int index = INDEXOF(obj1);
> 							if (index >= 0 && index < (limit))
> 							obj[offset] = (WORD)roots->elems[index];
> 						     }
> 					     }
> 					     offset = info[++i];
> 				     }
> 				     return obj + size;
> 			     }
> 		case GC_ARRAY: {
> 				       WORD size = STATIC_SIZE(info) + obj[1], offset = 2;     // find size of dynamic part in second slot of obj, add static size
> 				       if (info[2])
> 					       return obj + size;                              // return immediately if array contains only scalars
> 				       while (offset<size) {
> 					       SUBST(obj,offset,roots,limit);
> 					       offset++;
> 				       }
> 				       return obj + size;
> 			       }
> 		case GC_TUPLE: {
> 				       WORD width = obj[1], offset = 1 + POLYTAGS(width), i = 1, j, tags;
> 				       while (width > 32) {
> 					       for (j = 0, tags = obj[i++]; j < 32; j++, offset++, tags = tags >> 1)
> 						       if (!(tags & 1))
> 							       SUBST(obj,offset,roots,limit);
> 					       width -= 32;
> 				       }
> 				       for (tags = obj[i]; width > 0; width--, offset++, tags = tags >> 1) 
> 					       if (!(tags & 1))
> 						       SUBST(obj,offset,roots,limit);
> 				       return obj + STATIC_SIZE(info) + width + POLYTAGS(width);
> 			       }
> 		case GC_BIG: {
> 				     WORD size = STATIC_SIZE(info), i = 2, offset = info[i];
> 				     while (offset) {                                        // subst all statically known pointer fields
> 					     SUBST(obj,offset,roots,limit);
> 					     offset = info[++i];
> 				     }
> 				     offset = info[++i];
> 				     while (offset) {                                        // subst dynamically identified pointers
> 					     WORD tagword = info[++i];
> 					     WORD bitno = info[++i];
> 					     if ((tagword & (1 << bitno)) == 0)
> 						     SUBST(obj,offset,roots,limit);
> 					     offset = info[++i];
> 				     }
> 				     return obj + size;
> 			     }
> 		case GC_MUT: {
> 				     return substObj(obj + STATIC_SIZE(info), roots, limit, current_thread);
> 			     }
> 	}
> 	return (ADDR)0;                 // Not reached
122c131
< Array CYCLIC_BEGIN(Int n, Int updates) {
---
> Array CYCLIC_BEGIN(WORD n, WORD updates) {
125c134
<         int i;
---
>         WORD i;
132c141
< void CYCLIC_UPDATE(Array roots, Int limit, ADDR stop) {
---
> void CYCLIC_UPDATE(Array roots, WORD limit, ADDR stop) {
diff -rN old-timber/rtsPOSIX/env.c new-timber/rtsPOSIX/env.c
106c106
< int envRootsDirty;
---
> WORD envRootsDirty;
114c114
< int maxDesc = 2;
---
> WORD maxDesc = 2;
135c135
< void netError(Int sock,char *message);
---
> void netError(WORD sock,char *message);
141c141
<   UNITTYPE (*close_POSIX) (Closable_POSIX, Int);
---
>   UNITTYPE (*close_POSIX) (Closable_POSIX, WORD);
143c143
<   int descriptor;
---
>   WORD descriptor;
160c160
<   int descriptor;
---
>   WORD descriptor;
167c167
< UNITTYPE close_fun (Closable_POSIX this, Int dummy) {
---
> UNITTYPE close_fun (Closable_POSIX this, WORD dummy) {
169c169
<   int desc = ((DescClosable)this)->descriptor;
---
>   WORD desc = ((DescClosable)this)->descriptor;
179c179
< Closable_POSIX new_Closable (int desc) {
---
> Closable_POSIX new_Closable (WORD desc) {
192c192
<   Int res, mode;
---
>   WORD res, mode;
204c204
< File_POSIX new_File (int desc) {
---
> File_POSIX new_File (WORD desc) {
214c214
< LIST read_descr (int descr) {
---
> LIST read_descr (WORD descr) {
220c220
<   int r;
---
>   WORD r;
233c233
<       n->a = (POLY)(Int)buf[--r];
---
>       n->a = (POLY)(WORD)buf[--r];
252c252
<   Int desc = ((DescClosable)this->RFILE2FILE->FILE2CLOSABLE)->descriptor;
---
>   WORD desc = ((DescClosable)this->RFILE2FILE->FILE2CLOSABLE)->descriptor;
260c260
< RFile_POSIX new_RFile(int desc) {
---
> RFile_POSIX new_RFile(WORD desc) {
271c271
< int write_fun (WFile_POSIX this, LIST xs, Int dummy) {
---
> Int write_fun (WFile_POSIX this, LIST xs, Int dummy) {
273c273
<   int res = 0;
---
>   WORD res = 0;
275c275
<     int len = 0;
---
>     WORD len = 0;
277c277
<       buf[len++] = (Char)(Int)((CONS)xs)->a;
---
>       buf[len++] = (Char)(WORD)((CONS)xs)->a;
281c281
<     int r = write(((DescClosable)this->WFILE2FILE->FILE2CLOSABLE)->descriptor, buf, len);
---
>     WORD r = write(((DescClosable)this->WFILE2FILE->FILE2CLOSABLE)->descriptor, buf, len);
290c290
<   Int desc = ((DescClosable)this->WFILE2FILE->FILE2CLOSABLE)->descriptor;
---
>   WORD desc = ((DescClosable)this->WFILE2FILE->FILE2CLOSABLE)->descriptor;
299c299
< WFile_POSIX new_WFile(int desc) {
---
> WFile_POSIX new_WFile(WORD desc) {
316c316
< Maybe_Prelude open_fun (LIST path, int oflag) {
---
> Maybe_Prelude open_fun (LIST path, WORD oflag) {
318c318
<   int len = 0;
---
>   WORD len = 0;
320c320
<     buf[len++] = (Char)(Int)((CONS)path)->a;
---
>     buf[len++] = (Char)(WORD)((CONS)path)->a;
324c324
<   int descr = open(buf,oflag,S_IWUSR|S_IRUSR|S_IRGRP|S_IROTH);
---
>   WORD descr = open(buf,oflag,S_IWUSR|S_IRUSR|S_IRGRP|S_IROTH);
327c327
<   res->GCINFO = __GC___Just_Prelude+0;           // POLY instance is a pointer
---
>   res->GCINFO = __GC___Just_Prelude+0;           // POLY instance is a poWORDer
365c365
< Socket_POSIX new_Socket (Int sock) {
---
> Socket_POSIX new_Socket (WORD sock) {
379c379
< Int new_socket (SOCKHANDLER handler) {
---
> WORD new_socket (SOCKHANDLER handler) {
381c381
<   int sock = socket(PF_INET,SOCK_STREAM,0);
---
>   WORD sock = socket(PF_INET,SOCK_STREAM,0);
392c392
< void netError (Int sock, char *message) {
---
> void netError (WORD sock, char *message) {
400c400
< void setupConnection (Int sock) {
---
> void setupConnection (WORD sock) {
408c408
< int mkAddr (Int sock, Host_POSIX host, struct in_addr *addr) {
---
> WORD mkAddr (WORD sock, Host_POSIX host, struct in_addr *addr) {
411,412c411,412
<   int len = 0;
<   Int hostid;
---
>   WORD len = 0;
>   WORD hostid;
415c415
<     buf[len++] = (Char)(Int)((CONS)h)->a;
---
>     buf[len++] = (Char)(WORD)((CONS)h)->a;
436c436
<   int sock = new_socket(handler);
---
>   WORD sock = new_socket(handler);
461c461
<   int sock = new_socket(handler);
---
>   WORD sock = new_socket(handler);
503c503
<         int i;
---
>         WORD i;
532c532
<     int i;
---
>     WORD i;
537c537
<         int r = select(maxDesc+1, &readFds, &writeFds, NULL, NULL);
---
>         WORD r = select(maxDesc+1, &readFds, &writeFds, NULL, NULL);
560c560
< 	                    Int sock = accept(i,(struct sockaddr *)&addr,&len);
---
> 	                    WORD sock = accept(i,(struct sockaddr *)&addr,&len);
573,574c573,574
< 	                    int opt;
< 	                    socklen_t len = sizeof(int);
---
> 	                    WORD opt;
> 	                    socklen_t len = sizeof(WORD);
590c590
< void envStart(CLOS2 (*root)(Env_POSIX, Int)) {
---
> void envStart(CLOS2 (*root)(Env_POSIX, WORD)) {
601c601
< void envInit (int argc, char **argv) {
---
> void envInit (WORD argc, char **argv) {
619c619
<     int i;
---
>     WORD i;
diff -rN old-timber/rtsPOSIX/gc.c new-timber/rtsPOSIX/gc.c
93,94c93,94
< extern int envRootsDirty;
< extern int timerQdirty;
---
> extern WORD envRootsDirty;
> extern WORD timerQdirty;
diff -rN old-timber/rtsPOSIX/rts.c new-timber/rtsPOSIX/rts.c
84,85c84,85
< Int NCORES              = 0;
< Int NTHREADS            = 0;
---
> WORD NCORES              = 0;
> WORD NTHREADS            = 0;
93c93
<         int prio;
---
>         WORD prio;
95c95
<         int index;
---
>         WORD index;
97c97
<         int placeholders;       // for use during cyclic data construction
---
>         WORD placeholders;       // for use during cyclic data construction
106,107c106,107
< int nactive             = 0;
< int nthreads            = 0;
---
> WORD nactive             = 0;
> WORD nthreads            = 0;
120c120
< int prio_min, prio_max;
---
> WORD prio_min, prio_max;
125c125
< Thread newThread(Msg m, int prio, void *(*fun)(void *), int stacksize) {
---
> Thread newThread(Msg m, WORD prio, void *(*fun)(void *), WORD stacksize) {
241,243c241,243
< int midPrio(Thread prev, Thread next) {
<     int left  = (prev ? prev->prio : prio_max-1);
<     int right = (next ? next->prio : prio_min+1);
---
> WORD midPrio(Thread prev, Thread next) {
>     WORD left  = (prev ? prev->prio : prio_max-1);
>     WORD right = (next ? next->prio : prio_min+1);
250c250
< Thread getThread(Msg m, int prio) {
---
> Thread getThread(Msg m, WORD prio) {
264,265c264,265
< int activate(Msg m, int force) {
<     int count = 0;
---
> WORD activate(Msg m, WORD force) {
>     WORD count = 0;
275c275
<         // fprintf(stderr, "** Out of cores\n");
---
>         // fprWORDf(stderr, "** Out of cores\n");
280c280
<         // fprintf(stderr, "** Out of threads\n");
---
>         // fprWORDf(stderr, "** Out of threads\n");
289c289
<     // fprintf(stderr, "++ %d | runQ: ", new->index);
---
>     // fprWORDf(stderr, "++ %d | runQ: ", new->index);
292c292
<     //         fprintf(stderr, "%d ", th->index);
---
>     //         fprWORDf(stderr, "%d ", th->index);
295c295
<     // fprintf(stderr, "\n");
---
>     // fprWORDf(stderr, "\n");
300c300
<     // fprintf(stderr, "-- %d | runQ: ", t->index);
---
>     // fprWORDf(stderr, "-- %d | runQ: ", t->index);
316c316
<     //        fprintf(stderr, "%d ", th->index);
---
>     //        fprWORDf(stderr, "%d ", th->index);
319c319
<     // fprintf(stderr, "\n");
---
>     // fprWORDf(stderr, "\n");
328c328
<     // fprintf(stderr, "Worker thread %d started\n", current_thread->index);
---
>     // fprWORDf(stderr, "Worker thread %d started\n", current_thread->index);
334c334
<         Int (*code)(Msg) = this->Code;
---
>         WORD (*code)(Msg) = this->Code;
364c364
<     // fprintf(stderr, "Working thread %d in ASYNC\n", (int)current_thread);
---
>     // fprWORDf(stderr, "Working thread %d in ASYNC\n", (WORD)current_thread);
366c366
<     switch ((Int)bl) {
---
>     switch ((WORD)bl) {
377c377
<     switch((Int)dl) {
---
>     switch((WORD)dl) {
436c436
< POLY Raise(BITS32 polyTag, Int err) {
---
> POLY Raise(BITS32 polyTag, WORD err) {
462c462
< int timerQdirty;
---
> WORD timerQdirty;
515c515
< Int getNumberOfProcessors() {
---
> WORD getNumberOfProcessors() {
517c517
<     Int n = sysconf(_SC_NPROCESSORS_ONLN);
---
>     WORD n = sysconf(_SC_NPROCESSORS_ONLN);
diff -rN old-timber/rtsPOSIX/rts.h new-timber/rtsPOSIX/rts.h
37a38
> #include <stdint.h>
40d40
< 
43c43,50
< typedef int WORD;
---
> #ifdef __LP64__
> typedef int64_t WORD;
> typedef int64_t Int;
> #else
> typedef int32_t WORD;
> typedef int32_t Int;
> #endif
> 
46c53
< #define Int int
---
> #define Int WORD
59c66
< 
---
> #define BITS64 uint64_t
75a83,86
> #define primSHIFTRA64(a,b) ((int64_t)(a) >> (b))
> #define primSET64(a,b)     ((a) | (1 << (b)))
> #define primCLR64(a,b)     ((a) & ~(1 << (b)))
> #define primTST64(a,b)     (((a) & (1 << (b))) != 0)
115,116c126,127
<   Int sec;
<   Int usec;
---
>   WORD sec;
>   WORD usec;
154,158c165,169
< Time sec(Int c);
< Time millisec(Int x);
< Time microsec(Int x);
< Int secOf(Time t);
< Int microsecOf (Time t);
---
> Time sec(WORD c);
> Time millisec(WORD x);
> Time microsec(WORD x);
> WORD secOf(Time t);
> WORD microsecOf (Time t);
diff -rN old-timber/rtsPOSIX/timer.c new-timber/rtsPOSIX/timer.c
49,50c49,50
<     UNITTYPE (*reset) (T_Timer, Int);
<     Time (*sample) (T_Timer, Int);
---
>     UNITTYPE (*reset) (T_Timer, WORD);
>     Time (*sample) (T_Timer, WORD);
62c62
< Time sec(Int c) {
---
> Time sec(WORD c) {
71c71
< Time millisec(Int c) {
---
> Time millisec(WORD c) {
80c80
< Time microsec(Int c) {
---
> Time microsec(WORD c) {
89,90c89,90
< Int secOf(Time t) {
<     switch ((Int)t) {
---
> WORD secOf(Time t) {
>     switch ((WORD)t) {
97,98c97,98
< Int microsecOf(Time t) {
<     switch ((Int)t) {
---
> WORD microsecOf(Time t) {
>     switch ((WORD)t) {
109c109
<     switch ((Int)t1) {
---
>     switch ((WORD)t1) {
113c113
<             switch ((Int)t2) {
---
>             switch ((WORD)t2) {
131c131
<     switch ((Int)t1) {
---
>     switch ((WORD)t1) {
135c135
<             switch ((Int)t2) {
---
>             switch ((WORD)t2) {
150c150
<     switch ((Int)t1) {
---
>     switch ((WORD)t1) {
153c153
<             switch((Int) t2) {
---
>             switch((WORD) t2) {
159c159
<             switch ((Int)t2) {
---
>             switch ((WORD)t2) {
184c184
<     switch ((Int)t1) {
---
>     switch ((WORD)t1) {
187c187
<             switch((Int)t2) {
---
>             switch((WORD)t2) {
193c193
<             switch ((Int)t2) {
---
>             switch ((WORD)t2) {
203c203
<     switch ((Int)t1) {
---
>     switch ((WORD)t1) {
206c206
<             switch((Int)t2) {
---
>             switch((WORD)t2) {
212c212
<             switch ((Int)t2) {
---
>             switch ((WORD)t2) {
222c222
<     switch ((Int)t1) {
---
>     switch ((WORD)t1) {
225c225
<             switch((Int)t2) {
---
>             switch((WORD)t2) {
230c230
<             switch ((Int)t2) {
---
>             switch ((WORD)t2) {
240c240
<     switch ((Int)t1) {
---
>     switch ((WORD)t1) {
243c243
<             switch((Int)t2) {
---
>             switch((WORD)t2) {
248c248
<             switch ((Int)t2) {
---
>             switch ((WORD)t2) {
265c265
< static UNITTYPE reset_fun(Ref self, Int x) {
---
> static UNITTYPE reset_fun(Ref self, WORD x) {
272c272
< static Time sample_fun(Ref self, Int x) {
---
> static Time sample_fun(Ref self, WORD x) {
286c286
< static UNITTYPE reset_sel(T_Timer this,Int x) {
---
> static UNITTYPE reset_sel(T_Timer this,WORD x) {
290c290
< static Time sample_sel(T_Timer this, Int x) {
---
> static Time sample_sel(T_Timer this, WORD x) {
294c294
< TIMERTYPE primTIMERTERM(Int x) {
---
> TIMERTYPE primTIMERTERM(WORD x) {
diff -rN old-timber/src/Env.hs new-timber/src/Env.hs
710a711
>                             (prim BITS64ToInt,  scheme0 [tBITS64] tInt),
714a716
>                             (prim IntToBITS64,  scheme0 [tInt] tBITS64),
798a801,811
> 			    (prim NOT64,        scheme0 [tBITS64] tBITS64),
>                             (prim AND64,        scheme0 [tBITS64,tBITS64] tBITS64),
>                             (prim OR64,         scheme0 [tBITS64,tBITS64] tBITS64),
>                             (prim EXOR64,       scheme0 [tBITS64,tBITS64] tBITS64),
>                             (prim SHIFTL64,     scheme0 [tBITS64,tInt] tBITS64),
>                             (prim SHIFTR64,     scheme0 [tBITS64,tInt] tBITS64),
>                             (prim SHIFTRA64,    scheme0 [tBITS64,tInt] tBITS64),
>                             (prim SET64,        scheme0 [tBITS64,tInt] tBITS64),
>                             (prim CLR64,        scheme0 [tBITS64,tInt] tBITS64),
>                             (prim TST64,        scheme0 [tBITS64,tInt] tBool),
>                             
841a855
> tBITS64                 = TId (prim BITS64)
diff -rN old-timber/src/Kindle2C.hs new-timber/src/Kindle2C.hs
473a474,480
> k2cPrim AND64                   = text "&"
> k2cPrim OR64                    = text "|"
> k2cPrim EXOR64                  = text "^"
> k2cPrim SHIFTL64                = text "<<"
> k2cPrim SHIFTR64                = text ">>"
> k2cPrim NOT64                   = text "~"
> 
diff -rN old-timber/src/Name.hs new-timber/src/Name.hs
86a87,91
> 				| Int8
>                                 | Int16
>                                 | Int32
>                                 | Int64
> 
89a95
>                                 | BITS64
178a185,190
>                                 
> 				| AND64
>                                 | OR64
>                                 | EXOR64
>                                 | SHIFTL64
>                                 | SHIFTR64
195a208,212
>                                 
> 				| SHIFTRA64
>                                 | SET64
>                                 | CLR64
>                                 | TST64
205a223
>                                 | NOT64
266a285
>                                 | BITS64ToInt
270a290
>                                 | IntToBITS64
