summaryrefslogtreecommitdiff
path: root/testdata/it.lc
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-02-12 02:15:24 +0100
committerPéter Diviánszky <divipp@gmail.com>2016-02-12 02:23:54 +0100
commitfcd31ebec59279a22555f47a3b768b787966fa88 (patch)
treeb771e67177007a49dffe14c0e25756a3e0323d2b /testdata/it.lc
parent4b0c42cd29c88d40014cc901c545d6184a78d521 (diff)
switch to megaparsec
Diffstat (limited to 'testdata/it.lc')
-rw-r--r--testdata/it.lc39
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
4typeAnn x = x
5
6undefined :: forall (a :: Type) . a
7
8primFix :: forall (a :: Type) . (a -> a) -> a
9
10data Unit = TT
11data String
12data Empty (a :: String)
13
14unsafeCoerce :: forall a b . a -> b
15
16-- equality constraints
17type family EqCT (t :: Type) (a :: t) (b :: t)
18
19data Bool = False | True
20
21data Ordering = LT | EQ | GT
22
23data Int
24
25primCompareInt :: Int -> Int -> Ordering
26primAddInt :: Int -> Int -> Int
27
28data List a = Nil | Cons a (List a)
29
30infixr 5 :
31
32fromInt x = x
33
34from = \x -> x: from (primAddInt 1 x)
35
36main = case from 0 of
37 (_:_:_:i:_) -> case primCompareInt i 3 of EQ -> True
38
39