diff options
author | Tom Smeding <t.j.smeding@uu.nl> | 2024-09-02 17:49:54 +0200 |
---|---|---|
committer | Tom Smeding <t.j.smeding@uu.nl> | 2024-09-02 17:50:12 +0200 |
commit | 7d44dcc2ca2c5c16e1ab4737ef6b2877214767ed (patch) | |
tree | 42e8b9292403f9ce3a6f04a15ebd62a766880339 /src/Data.hs | |
parent | 1f7ed2ee02222108684cfde8078e7a182f734a61 (diff) |
WIP autoWeak
Diffstat (limited to 'src/Data.hs')
-rw-r--r-- | src/Data.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Data.hs b/src/Data.hs index c3381d5..a3f4c3c 100644 --- a/src/Data.hs +++ b/src/Data.hs @@ -8,6 +8,8 @@ {-# LANGUAGE TypeOperators #-} module Data where +import Lemmas (Append) + data SList f l where SNil :: SList f '[] @@ -19,6 +21,10 @@ slistMap :: (forall t. f t -> g t) -> SList f list -> SList g list slistMap _ SNil = SNil slistMap f (SCons x list) = SCons (f x) (slistMap f list) +sappend :: SList f l1 -> SList f l2 -> SList f (Append l1 l2) +sappend SNil l = l +sappend (SCons x xs) l = SCons x (sappend xs l) + data Nat = Z | S Nat deriving (Show, Eq, Ord) |