Skip to content

Instantly share code, notes, and snippets.

@Rastrian
Created August 15, 2021 00:41
Show Gist options
  • Save Rastrian/24ebabcbf26bb283ae161b1d6456e4a1 to your computer and use it in GitHub Desktop.
Save Rastrian/24ebabcbf26bb283ae161b1d6456e4a1 to your computer and use it in GitHub Desktop.
data (++) :: [a] -> [a] -> Exp [a]
type instance Eval ((++) '[] bs) = bs
type instance Eval ((++) (a ': as') bs) = a ': Eval ((++) as' bs)
data Mappend :: a -> a -> Exp a
type instance Eval (Mappend '() '()) = '()
type instance Eval (Mappend (a :: Constraint) (b :: Constraint)) = (a, b)
type instance Eval (Mappend (a :: [k]) (b :: [k])) = Eval (a ++ b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment