Created
February 25, 2011 00:42
-
-
Save polypus74/843208 to your computer and use it in GitHub Desktop.
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
module A where | |
import Data.HList.CommonMain | |
data A = A deriving (Show) | |
ls = hCons "hi" $ hCons A $ hNil | |
upls = hUpdateAtType "bye" ls | |
-- shouldn't upls = HCons "bye" (HCons A HNil) ? | |
-- problem is i get this error: | |
-- /Users/polypus/Documents/creations/software/haskell/genesis/A.hs:10:7: | |
-- No instances for (TypeEq [Char] [Char] b, | |
-- HType2HNatCase b [Char] (HCons A HNil) n, | |
-- HUpdateAtHNat n [Char] (HCons [Char] (HCons A HNil)) l') | |
-- arising from a use of `hUpdateAtType' | |
-- at /Users/polypus/Documents/creations/software/haskell/genesis/A.hs:10:7-28 | |
-- Possible fix: | |
-- add an instance declaration for | |
-- (TypeEq [Char] [Char] b, | |
-- HType2HNatCase b [Char] (HCons A HNil) n, | |
-- HUpdateAtHNat n [Char] (HCons [Char] (HCons A HNil)) l') | |
-- In the expression: hUpdateAtType "bye" ls | |
-- In the definition of `upls': upls = hUpdateAtType "bye" ls | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you also have to import some instances for TypeEq, try with Data.HList.TypeEqGeneric1