diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-05-04 05:30:52 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-05-04 05:35:12 +0200 |
commit | 3bf9f9d19378e5e7243c0c951979e734d4c7780a (patch) | |
tree | 13d94b77ad65bfc4446cadfe31ebc4768356930d /testdata | |
parent | d853a6c0f5e027c5e98d96ddd29c21901dd67039 (diff) |
refactoring
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/typeclass.lc | 4 | ||||
-rw-r--r-- | testdata/typeclass.out | 30 |
2 files changed, 31 insertions, 3 deletions
diff --git a/testdata/typeclass.lc b/testdata/typeclass.lc index 71210ce1..11048330 100644 --- a/testdata/typeclass.lc +++ b/testdata/typeclass.lc | |||
@@ -26,12 +26,12 @@ instance Eq Bool where | |||
26 | [] ==. [] = True | 26 | [] ==. [] = True |
27 | (a:as) ==. (b:bs) = {-a == b && -} as ==. bs | 27 | (a:as) ==. (b:bs) = {-a == b && -} as ==. bs |
28 | _ ==. _ = False | 28 | _ ==. _ = False |
29 | 29 | {- | |
30 | instance Eq t => Eq [t] where | 30 | instance Eq t => Eq [t] where |
31 | [] == [] = True | 31 | [] == [] = True |
32 | a:as == b:bs = a == b && as == bs | 32 | a:as == b:bs = a == b && as == bs |
33 | _ == _ = False | 33 | _ == _ = False |
34 | 34 | -} | |
35 | {- | 35 | {- |
36 | Ord = \a -> Eq a & Ord' a -- so this is an alias, always subst. | 36 | Ord = \a -> Eq a & Ord' a -- so this is an alias, always subst. |
37 | 37 | ||
diff --git a/testdata/typeclass.out b/testdata/typeclass.out index 7d92928d..8a79e832 100644 --- a/testdata/typeclass.out +++ b/testdata/typeclass.out | |||
@@ -35,6 +35,17 @@ not = \(a :: _) -> case'Bool (\_ -> _) (_rhs True) (_rhs False) a | |||
35 | (_rhs undefined) | 35 | (_rhs undefined) |
36 | 36 | ||
37 | (/=) = \(a :: _) (b :: _) -> _rhs (not (a == b)) | 37 | (/=) = \(a :: _) (b :: _) -> _rhs (not (a == b)) |
38 | |||
39 | (==.) | ||
40 | = \(a :: _) (b :: _) -> case'List | ||
41 | (\_ -> _) | ||
42 | (case'List (\_ -> _) (_rhs True) (\_ _ -> _rhs False) b) | ||
43 | (\_ (c :: _) -> case'List | ||
44 | (\_ -> _) | ||
45 | (_rhs False) | ||
46 | (\_ (d :: _) -> _rhs (c ==. d)) | ||
47 | b) | ||
48 | a | ||
38 | ------------ trace | 49 | ------------ trace |
39 | not :: Bool -> Bool | 50 | not :: Bool -> Bool |
40 | (&&) :: Bool -> Bool -> Bool | 51 | (&&) :: Bool -> Bool -> Bool |
@@ -42,6 +53,7 @@ not :: Bool -> Bool | |||
42 | 'Eq :: Type -> Type | 53 | 'Eq :: Type -> Type |
43 | (==) :: forall a . Eq a => a -> a -> Bool | 54 | (==) :: forall a . Eq a => a -> a -> Bool |
44 | (/=) :: forall a . Eq a => a -> a -> Bool | 55 | (/=) :: forall a . Eq a => a -> a -> Bool |
56 | (==.) :: forall a b . [a] -> [b] -> Bool | ||
45 | ------------ tooltips | 57 | ------------ tooltips |
46 | testdata/typeclass.lc 8:1-8:4 | 58 | testdata/typeclass.lc 8:1-8:4 |
47 | Bool -> Bool | 59 | Bool -> Bool |
@@ -108,4 +120,20 @@ testdata/typeclass.lc 24:18-24:21 | |||
108 | testdata/typeclass.lc 24:18-24:23 | 120 | testdata/typeclass.lc 24:18-24:23 |
109 | Bool | 121 | Bool |
110 | testdata/typeclass.lc 24:22-24:23 | 122 | testdata/typeclass.lc 24:22-24:23 |
111 | _b \ No newline at end of file | 123 | _b |
124 | testdata/typeclass.lc 26:6-26:9 | ||
125 | forall a b . [a] -> [b] -> Bool | ||
126 | testdata/typeclass.lc 26:17-26:21 | ||
127 | Bool | ||
128 | testdata/typeclass.lc 26:17-28:22 | ||
129 | [_a] -> Bool | Bool | ||
130 | testdata/typeclass.lc 27:36-27:38 | ||
131 | [_j] | ||
132 | testdata/typeclass.lc 27:36-28:22 | ||
133 | [_a] -> Bool | Bool | ||
134 | testdata/typeclass.lc 27:39-27:42 | ||
135 | _l | ||
136 | testdata/typeclass.lc 27:43-27:45 | ||
137 | [_g] | ||
138 | testdata/typeclass.lc 28:17-28:22 | ||
139 | Bool | Bool \ No newline at end of file | ||