Created
December 19, 2018 06:28
-
-
Save igrep/b3391a2287a0fcf093472cb6c57048db to your computer and use it in GitHub Desktop.
(HAS TYPE ERROR) Test associative law for type-level append (++)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed by https://gist.github.com/notogawa/13422a72683d05cee989d60cd64479a2
Thanks notogawa!