1{-# LANGUAGE DataKinds, TypeOperators, TypeFamilies, GADTs, StandaloneDeriving #-}
2{-# LANGUAGE FlexibleContexts #-}
7type instance Cmp (Natural n) (Natural m) = CmpNat n m
9data Natural (a :: Nat) where
11 S :: Natural n -> Natural (n + 1)
13deriving instance Show (Natural n)
15-- foo :: Set '[Natural 0, Natural 1, Natural 3]
16foo = asSet $ Ext (S Z) (Ext (S (S (S Z))) (Ext Z Empty))
18-- bar :: Set '[Natural 1, Natural 2]
19bar = asSet $ Ext (S (S Z)) (Ext (S Z) (Ext (S Z) Empty))
21-- foobar :: Set '[Natural 0, Natural 1, Natural 2, Natural 3]
22foobar = foo `union` bar
24nonMemberTest :: NonMember (Natural 0) as => Set as -> ()
27-- nonMemberTest meep is well typed
28meep = asSet $ Ext (S Z) (Ext (S (S Z)) Empty)
29-- nonMemberTest morp is ill typed
30morp = asSet $ Ext (S Z) (Ext (S (S Z)) (Ext Z Empty))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list