diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-02-12 02:15:24 +0100 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-02-12 02:23:54 +0100 |
commit | fcd31ebec59279a22555f47a3b768b787966fa88 (patch) | |
tree | b771e67177007a49dffe14c0e25756a3e0323d2b /testdata/it.lc | |
parent | 4b0c42cd29c88d40014cc901c545d6184a78d521 (diff) |
switch to megaparsec
Diffstat (limited to 'testdata/it.lc')
-rw-r--r-- | testdata/it.lc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testdata/it.lc b/testdata/it.lc new file mode 100644 index 00000000..339cecba --- /dev/null +++ b/testdata/it.lc | |||
@@ -0,0 +1,39 @@ | |||
1 | {-# LANGUAGE NoImplicitPrelude #-} | ||
2 | --import Internals | ||
3 | |||
4 | typeAnn x = x | ||
5 | |||
6 | undefined :: forall (a :: Type) . a | ||
7 | |||
8 | primFix :: forall (a :: Type) . (a -> a) -> a | ||
9 | |||
10 | data Unit = TT | ||
11 | data String | ||
12 | data Empty (a :: String) | ||
13 | |||
14 | unsafeCoerce :: forall a b . a -> b | ||
15 | |||
16 | -- equality constraints | ||
17 | type family EqCT (t :: Type) (a :: t) (b :: t) | ||
18 | |||
19 | data Bool = False | True | ||
20 | |||
21 | data Ordering = LT | EQ | GT | ||
22 | |||
23 | data Int | ||
24 | |||
25 | primCompareInt :: Int -> Int -> Ordering | ||
26 | primAddInt :: Int -> Int -> Int | ||
27 | |||
28 | data List a = Nil | Cons a (List a) | ||
29 | |||
30 | infixr 5 : | ||
31 | |||
32 | fromInt x = x | ||
33 | |||
34 | from = \x -> x: from (primAddInt 1 x) | ||
35 | |||
36 | main = case from 0 of | ||
37 | (_:_:_:i:_) -> case primCompareInt i 3 of EQ -> True | ||
38 | |||
39 | |||