data-kinds Questions
2
Solved
I have created a very simple example of a problem I'm having using GADTs and DataKinds. My real application is obviously more complicated but this captures the essence of my situation clearly. I'm ...
Sonnie asked 17/2, 2013 at 7:21
2
For example, trying to compile the following code
{-# LANGUAGE StandaloneDeriving, KindSignatures, DataKinds, GADTs#-}
data ExprTag = Tag1 | Tag2
data Expr (tag :: ExprTag) where
Con1 :: Int -&...
Noway asked 16/11, 2012 at 20:29
1
Solved
I've been teaching myself about type-level programming and wanted to write a simple natural number addition type function. My first version which works is as follows:
data Z
data S n
type One = S...
Candicecandid asked 15/10, 2012 at 12:14
1
Solved
GHC 7.6.1 comes with new features for programming at the type level, including datatype promotion. Taking the example about type-level naturals and vectors from there, I'd like to be able to write ...
Kv asked 15/9, 2012 at 22:3
1
Solved
I have found that I really like combining GADTs with Data Kinds, as it gives me further type safety than before (for most uses, almost as good as Coq, Agda et al.). Sadly, pattern matching fails on...
Bibbie asked 22/8, 2012 at 6:35
© 2022 - 2024 — McMap. All rights reserved.