fwgl-0.1.3.1: Game engine

Safe HaskellSafe-Inferred
LanguageHaskell2010

FWGL.Internal.TList

Documentation

type family Empty xs :: Bool Source

Equations

Empty [] = True 
Empty (x : xs) = False 

type Equal xs ys = And (IsSubset xs ys) (IsSubset ys xs) ~ True Source

type Member x xs = IsMember x xs ~ True Source

type family IsMember x xs :: Bool Source

Equations

IsMember x [] = False 
IsMember x (x : xs) = True 
IsMember y (x : xs) = IsMember y xs 

class Subset xs ys Source

Instances

(~) Bool (IsSubset xs ys) True => Subset xs ys 

type family IsSubset xs ys :: Bool Source

Equations

IsSubset xs xs = True 
IsSubset [] ys = True 
IsSubset (x : xs) ys = And (IsMember x ys) (IsSubset xs ys) 

type family Remove x xs Source

Equations

Remove x [] = [] 
Remove x (x : xs) = Remove x xs 
Remove x (y : xs) = y : Remove x xs 

type family Difference xs ys Source

Equations

Difference xs [] = xs 
Difference xs (y : ys) = Difference (Remove y xs) ys 

type family Append xs ys Source

Equations

Append [] ys = ys 
Append (x : xs) ys = x : Append xs ys 

type family Insert y xs Source

Equations

Insert y [] = `[y]` 
Insert y (y : xs) = y : xs 
Insert y (x : xs) = x : Insert y xs 

type Reverse xs = Reverse' xs [] Source

type family Union xs ys Source

Equations

Union [] ys = ys 
Union (x : xs) ys = Union xs (Insert x ys) 

type Set xs = Union xs xs ~ xs Source