blob: 339cecba1d44f6f97614af4093321ab34659065b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{-# LANGUAGE NoImplicitPrelude #-}
--import Internals
typeAnn x = x
undefined :: forall (a :: Type) . a
primFix :: forall (a :: Type) . (a -> a) -> a
data Unit = TT
data String
data Empty (a :: String)
unsafeCoerce :: forall a b . a -> b
-- equality constraints
type family EqCT (t :: Type) (a :: t) (b :: t)
data Bool = False | True
data Ordering = LT | EQ | GT
data Int
primCompareInt :: Int -> Int -> Ordering
primAddInt :: Int -> Int -> Int
data List a = Nil | Cons a (List a)
infixr 5 :
fromInt x = x
from = \x -> x: from (primAddInt 1 x)
main = case from 0 of
(_:_:_:i:_) -> case primCompareInt i 3 of EQ -> True
|