Skip to content

Instantly share code, notes, and snippets.

@igrep
Created December 19, 2018 06:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igrep/b3391a2287a0fcf093472cb6c57048db to your computer and use it in GitHub Desktop.
Save igrep/b3391a2287a0fcf093472cb6c57048db to your computer and use it in GitHub Desktop.
(HAS TYPE ERROR) Test associative law for type-level append (++)
#!/bin/env stack
{-
stack --resolver=lts-12.24 script --package extensible
-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
import Data.Extensible
main :: IO ()
main = print $ happend3 (#x @== True <: nil) (#y @== True <: nil) (#z @== True <: nil)
happend3 :: Record xs -> Record ys -> Record zs -> Record (xs ++ ys ++ zs)
happend3 xs ys zs = xs `happend` ys `happend` zs
@igrep
Copy link
Author

igrep commented Jan 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment