Skip to content
Browse files

work on 64bits platform

  • Loading branch information...
1 parent 428c28f commit b25a95fd3c4e92b33ba127c2777e27b8ea4100b0 @atzedijkstra atzedijkstra committed May 15, 2009
Showing with 50 additions and 94 deletions.
  1. +1 −1 Makefile
  2. +12 −12 src/rts/grinbc/gbprim.cc
  3. +11 −11 src/rts/grinbc/gbprimdecl.ch
  4. +1 −1 src/rts/grinbc/grinbc.ch
  5. +23 −22 src/rts/priminline.ch
  6. +2 −4 test/files.mk
  7. +0 −43 tst0.eh
View
2 Makefile
@@ -353,7 +353,7 @@ release-prepare:
FUN_PREFIX2DIR = $(patsubst %/,%,$(1))
tst:
- @echo $(EHC_ALL_SRC)
+ @echo $(SHELL)
@echo $(EHC_ALL_SRC_FIND)
tstv:
View
24 src/rts/grinbc/gbprim.cc
@@ -477,7 +477,7 @@ INTLIKE_ARITH_PRIMS_CODE(gb_,Int,Int,gb_False,gb_True,gb_LT,gb_EQ,gb_GT,GB_Word)
%%]
%%[99
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,(Word_SizeInBits-GB_Word_SizeOfWordTag),Int,Int,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,(Word_SizeInBits-GB_Word_SizeOfWordTag),Int,Int,SWord,GB_Word)
%%]
%%[8
@@ -526,7 +526,7 @@ INTLIKE_INT_CONVERSION_PRIMS_CODE(gb_,Int8,Int8,GB_Word)
%%]
%%[99
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,8,Int8,Int8,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,8,Int8,Int8,SWord,GB_Word)
%%]
%%[97
@@ -535,7 +535,7 @@ INTLIKE_INT_CONVERSION_PRIMS_CODE(gb_,Int16,Int16,GB_Word)
%%]
%%[99
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,16,Int16,Int16,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,16,Int16,Int16,SWord,GB_Word)
%%]
If possible (when 32 bits fit into Int), use Int stuff, otherwise boxed with additional primitives.
@@ -548,9 +548,9 @@ INTLIKE_INT_CONVERSION_PRIMS_CODE(gb_,Int32,Int32,GB_Word)
%%[99
#ifdef USE_32_BITS
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(gb_,32,Int32,Int32,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(gb_,32,Int32,Int32,SWord,GB_Word)
#else
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,32,Int32,Int32,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,32,Int32,Int32,SWord,GB_Word)
#endif
%%]
@@ -562,7 +562,7 @@ INTLIKE_ARITH_PRIMS_CODE(gb_,Int64,Int64,gb_False,gb_True,gb_LT,gb_EQ,gb_GT,GB_W
%%[99
INTLIKE_BITS_PRIMS_CODE(gb_,64,Int64,Int64,gb_False,gb_True,gb_LT,gb_EQ,gb_GT,GB_Word)
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(gb_,64,Int64,Int64,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(gb_,64,Int64,Int64,SWord64,GB_Word)
%%]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -576,7 +576,7 @@ INTLIKE_INT_CONVERSION_PRIMS_CODE(gb_,Word,Word,GB_Word)
%%[99
INTLIKE_BITS_PRIMS_CODE(gb_,(Word_SizeInBits-GB_Word_SizeOfWordTag),Word,Word,gb_False,gb_True,gb_LT,gb_EQ,gb_GT,GB_Word)
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,(Word_SizeInBits-GB_Word_SizeOfWordTag),Word,Word,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,(Word_SizeInBits-GB_Word_SizeOfWordTag),Word,Word,Word,GB_Word)
%%]
%%[97
@@ -605,7 +605,7 @@ INTLIKE_INT_CONVERSION_PRIMS_CODE(gb_,Word8,Word8,GB_Word)
%%]
%%[99
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,8,Word8,Word8,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,8,Word8,Word8,Word,GB_Word)
%%]
%%[97
@@ -614,7 +614,7 @@ INTLIKE_INT_CONVERSION_PRIMS_CODE(gb_,Word16,Word16,GB_Word)
%%]
%%[99
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,16,Word16,Word16,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,16,Word16,Word16,Word,GB_Word)
%%]
If possible (when 32 bits fit into Int), use Int stuff, otherwise boxed with additional primitives.
@@ -627,9 +627,9 @@ INTLIKE_INT_CONVERSION_PRIMS_CODE(gb_,Word32,Word32,GB_Word)
%%[99
#ifdef USE_32_BITS
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(gb_,32,Word32,Word32,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(gb_,32,Word32,Word32,Word,GB_Word)
#else
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,32,Word32,Word32,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(gb_,32,Word32,Word32,Word,GB_Word)
#endif
%%]
@@ -641,7 +641,7 @@ INTLIKE_ARITH_PRIMS_CODE(gb_,Word64,Word64,gb_False,gb_True,gb_LT,gb_EQ,gb_GT,GB
%%[99
INTLIKE_BITS_PRIMS_CODE(gb_,64,Word64,Word64,gb_False,gb_True,gb_LT,gb_EQ,gb_GT,GB_Word)
-INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(gb_,64,Word64,Word64,GB_Word)
+INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(gb_,64,Word64,Word64,Word64,GB_Word)
%%]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
View
22 src/rts/grinbc/gbprimdecl.ch
@@ -11,7 +11,7 @@ INTLIKE_ARITH_PRIMS_INTERFACE(gb_,Int,Int,GB_Word,GB_NodePtr)
%%]
%%[99
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int,Int,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int,Int,SWord,GB_Word,GB_NodePtr)
%%]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -26,7 +26,7 @@ INTLIKE_INT_CONVERSION_PRIMS_INTERFACE(gb_,Word,Word,GB_Word)
%%[99
INTLIKE_BITS_PRIMS_INTERFACE(gb_,Word,Word,GB_Word,GB_NodePtr)
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word,Word,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word,Word,Word,GB_Word,GB_NodePtr)
%%]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -40,7 +40,7 @@ INTLIKE_INT_CONVERSION_PRIMS_INTERFACE(gb_,Word8,Word8,GB_Word)
%%]
%%[99
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word8,Word8,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word8,Word8,Word,GB_Word,GB_NodePtr)
%%]
%%[97
@@ -50,12 +50,12 @@ INTLIKE_INT_CONVERSION_PRIMS_INTERFACE(gb_,Word16,Word16,GB_Word)
%%]
%%[99
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word16,Word16,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word16,Word16,Word,GB_Word,GB_NodePtr)
%%]
%%[99
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word16,Word16,GB_Word,GB_NodePtr)
%%]
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word16,Word16,Word,GB_Word,GB_NodePtr)
If possible (when 32 bits fit into Int), use Int stuff, otherwise boxed with additional primitives.
@@ -69,7 +69,7 @@ INTLIKE_ARITH_PRIMS_INTERFACE(gb_,Word32,Word32,GB_Word,GB_NodePtr)
%%]
%%[99
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word32,Word32,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word32,Word32,Word,GB_Word,GB_NodePtr)
%%]
%%[97
@@ -81,7 +81,7 @@ INTLIKE_ARITH_PRIMS_INTERFACE(gb_,Word64,Word64,GB_Word,GB_NodePtr)
%%[99
INTLIKE_BITS_PRIMS_INTERFACE(gb_,Word64,Word64,GB_Word,GB_NodePtr)
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word64,Word64,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Word64,Word64,Word64,GB_Word,GB_NodePtr)
%%]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -95,7 +95,7 @@ INTLIKE_INT_CONVERSION_PRIMS_INTERFACE(gb_,Int8,Int8,GB_Word)
%%]
%%[99
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int8,Int8,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int8,Int8,SWord,GB_Word,GB_NodePtr)
%%]
%%[97
@@ -105,7 +105,7 @@ INTLIKE_INT_CONVERSION_PRIMS_INTERFACE(gb_,Int16,Int16,GB_Word)
%%]
%%[99
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int16,Int16,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int16,Int16,SWord,GB_Word,GB_NodePtr)
%%]
If possible (when 32 bits fit into Int), use Int stuff, otherwise boxed with additional primitives.
@@ -120,7 +120,7 @@ INTLIKE_ARITH_PRIMS_INTERFACE(gb_,Int32,Int32,GB_Word,GB_NodePtr)
%%]
%%[99
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int32,Int32,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int32,Int32,SWord,GB_Word,GB_NodePtr)
%%]
%%[97
@@ -132,7 +132,7 @@ INTLIKE_ARITH_PRIMS_INTERFACE(gb_,Int64,Int64,GB_Word,GB_NodePtr)
%%[99
INTLIKE_BITS_PRIMS_INTERFACE(gb_,Int64,Int64,GB_Word,GB_NodePtr)
-INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int64,Int64,GB_Word,GB_NodePtr)
+INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(gb_,Int64,Int64,SWord64,GB_Word,GB_NodePtr)
%%]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
View
2 src/rts/grinbc/grinbc.ch
@@ -1072,7 +1072,7 @@ This breaks when compiled without bgc.
%%[8
#define GB_GBInt2CastedInt(ty,x) (Cast(ty,(x)&GB_Word_IntMask) / GB_Int_ShiftPow2)
-#define GB_GBInt2Int(x) GB_GBInt2CastedInt(int,x)
+#define GB_GBInt2Int(x) GB_GBInt2CastedInt(SWord,x)
#define GB_TagWord2Word(x) (((x)<<GB_Word_SizeOfWordTag) | GB_Word_TagInt)
#define GB_UntagWord2Word(x) ((x)>>GB_Word_SizeOfWordTag)
#define GB_Int2GBInt(x) ((Cast(GB_Int,x)) << GB_Word_SizeOfWordTag | GB_Word_TagInt)
View
45 src/rts/priminline.ch
@@ -42,13 +42,13 @@ extern PrimTypeC PrimPrefix ## primAnd ## PrimTypeName( PrimTypeC x, PrimTy
extern PrimTypeC PrimPrefix ## primOr ## PrimTypeName( PrimTypeC x, PrimTypeC y ) ; \
extern PrimTypeC PrimPrefix ## primXor ## PrimTypeName( PrimTypeC x, PrimTypeC y ) ; \
-#define INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(PrimPrefix,PrimTypeName,PrimTypeC,PrimTypeWord,PrimNodePtr) \
+#define INTLIKE_BITS_BITSIZE_DPD_PRIMS_INTERFACE(PrimPrefix,PrimTypeName,PrimTypeC,PrimTypeCWord,PrimTypeWord,PrimNodePtr) \
\
-extern PrimTypeC PrimPrefix ## primShiftLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) ; \
-extern PrimTypeC PrimPrefix ## primShiftRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) ; \
-extern PrimTypeC PrimPrefix ## primComplement ## PrimTypeName( PrimTypeC x ) ; \
-extern PrimTypeC PrimPrefix ## primRotateLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) ; \
-extern PrimTypeC PrimPrefix ## primRotateRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) ; \
+extern PrimTypeCWord PrimPrefix ## primShiftLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) ; \
+extern PrimTypeCWord PrimPrefix ## primShiftRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) ; \
+extern PrimTypeCWord PrimPrefix ## primComplement ## PrimTypeName( PrimTypeC x ) ; \
+extern PrimTypeCWord PrimPrefix ## primRotateLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) ; \
+extern PrimTypeCWord PrimPrefix ## primRotateRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) ; \
%%]
@@ -210,25 +210,25 @@ Bitsize dependent operations where PrimTypeName needs exactly the same nr of bit
Hence no additional masking is needed.
%%[99
-#define INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(PrimPrefix,PrimBitSize,PrimTypeName,PrimTypeC,PrimTypeWord) \
+#define INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE1(PrimPrefix,PrimBitSize,PrimTypeName,PrimTypeC,PrimTypeCWord,PrimTypeWord) \
\
-PRIM PrimTypeC PrimPrefix ## primShiftLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
+PRIM PrimTypeCWord PrimPrefix ## primShiftLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
return x << y ; \
} \
\
-PRIM PrimTypeC PrimPrefix ## primShiftRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
+PRIM PrimTypeCWord PrimPrefix ## primShiftRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
return x >> y ; \
} \
\
-PRIM PrimTypeC PrimPrefix ## primComplement ## PrimTypeName( PrimTypeC x ) { \
+PRIM PrimTypeCWord PrimPrefix ## primComplement ## PrimTypeName( PrimTypeC x ) { \
return ~x ; \
} \
\
-PRIM PrimTypeC PrimPrefix ## primRotateLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
+PRIM PrimTypeCWord PrimPrefix ## primRotateLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
return (x << y) | (x >> (PrimBitSize - y)) ; \
} \
\
-PRIM PrimTypeC PrimPrefix ## primRotateRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
+PRIM PrimTypeCWord PrimPrefix ## primRotateRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
return (x >> y) | (x << (PrimBitSize - y)) ; \
} \
\
@@ -239,28 +239,29 @@ Bitsize dependent operations where PrimTypeName needs strictly less bits of Prim
For masking take the largest used int variant, Word64.
%%[99
-#define INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(PrimPrefix,PrimBitSize,PrimTypeName,PrimTypeC,PrimTypeWord) \
+#define INTLIKE_BITS_PRIMS_BITSIZE_DPD_CODE2(PrimPrefix,PrimBitSize,PrimTypeName,PrimTypeC,PrimTypeCWord,PrimTypeWord) \
\
-PRIM PrimTypeC PrimPrefix ## primShiftLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
- return (x << y) & Bits_Size2LoMask(Word64,PrimBitSize) ; \
+PRIM PrimTypeCWord PrimPrefix ## primShiftLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
+ PrimTypeC xx = x & Bits_Size2LoMask(Word64,PrimBitSize) ; \
+ return (PrimTypeC) (xx << y) ; \
} \
\
-PRIM PrimTypeC PrimPrefix ## primShiftRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
+PRIM PrimTypeCWord PrimPrefix ## primShiftRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
return x >> y ; \
} \
\
-PRIM PrimTypeC PrimPrefix ## primComplement ## PrimTypeName( PrimTypeC x ) { \
- return (~x) & Bits_Size2LoMask(Word64,PrimBitSize) ; \
+PRIM PrimTypeCWord PrimPrefix ## primComplement ## PrimTypeName( PrimTypeC x ) { \
+ return (PrimTypeC) ((~x) & Bits_Size2LoMask(Word64,PrimBitSize)) ; \
} \
\
-PRIM PrimTypeC PrimPrefix ## primRotateLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
+PRIM PrimTypeCWord PrimPrefix ## primRotateLeft ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
PrimTypeC xx = x & Bits_Size2LoMask(Word64,PrimBitSize) ; \
- return ((xx << y) | (xx >> (PrimBitSize - y))) & Bits_Size2LoMask(Word64,PrimBitSize) ; \
+ return (PrimTypeC) (((xx << y) | (xx >> (PrimBitSize - y))) & Bits_Size2LoMask(Word64,PrimBitSize)) ; \
} \
\
-PRIM PrimTypeC PrimPrefix ## primRotateRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
+PRIM PrimTypeCWord PrimPrefix ## primRotateRight ## PrimTypeName( PrimTypeC x, PrimTypeWord y ) { \
PrimTypeC xx = x & Bits_Size2LoMask(Word64,PrimBitSize) ; \
- return (xx >> y) | (xx << (PrimBitSize - y)) ; \
+ return (PrimTypeC) (((xx >> y) | (xx << (PrimBitSize - y))) & Bits_Size2LoMask(Word64,PrimBitSize)) ; \
} \
\
View
6 test/files.mk
@@ -53,10 +53,8 @@ test-lists: $(TEST_MKF)
i=$${startvariant} ; \
while test $${i} -le $${vv} ; \
do \
- for f in $${i}/*.eh $${i}/*.hs ; \
- do \
- ehs="$${ehs} $${f}" ; \
- done ; \
+ for f in $${i}/*.eh ; do if test -r "$${f}" ; then ehs="$${ehs} $${f}" ; fi ; done ; \
+ for f in $${i}/*.hs ; do if test -r "$${f}" ; then ehs="$${ehs} $${f}" ; fi ; done ; \
i=`expr $${i} + 1` ; \
done ; \
echo "$${ehs}" > $${v}.lst ; \
View
43 tst0.eh
@@ -1,43 +0,0 @@
-let data Bool = False | True
- data List a = Nil | Cons a (List a)
-in
-let class Eq a where
- eq :: a -> a -> Bool
- ne :: a -> a -> Bool
- class Eq a => Ord a where
- lt :: a -> a -> Bool
- gt :: a -> a -> Bool
- instance dEqInt <: Eq Int where
- eq = \_ _ -> True
- ne = \_ _ -> True
-{-
--}
- instance dEqList <: Eq a => Eq (List a) where
- eq = \_ _ -> True
- ne = \_ _ -> True
- instance dOrdInt <: Ord Int where
- lt = \_ _ -> True
- gt = \_ _ -> True
-{-
--}
- instance dOrdList <: Ord a => Ord (List a) where
- lt = \_ _ -> True
- gt = \_ _ -> True
-in
-let
- f1 = eq (Cons 3 Nil) (Cons 4 Nil)
-{-
--}
-{-
- f2 = eq 3 4
--}
-{-
- f3 = Cons (eq 3 4) (Cons (lt 5 6) Nil)
--}
-{-
- f4 = \x -> Cons (eq x x) (Cons (lt x x) Nil)
--}
-{-
- f5 = \x -> eq x x
--}
-in 3

0 comments on commit b25a95f

Please sign in to comment.
Something went wrong with that request. Please try again.