lambda cube

This commit is contained in:
Jade Lovelace 2022-10-25 21:15:40 -07:00
parent 971a2f151b
commit 014712c6c2
9 changed files with 678 additions and 0 deletions

View file

@ -0,0 +1,19 @@
{-# LANGUAGE DataKinds #-}
module WhatIThoughtDataKindsDid where
data Ty
= A {field1 :: Int}
| B {field2 :: Int}
someFunctionTakingB :: 'B -> Int
someFunctionTakingB = field2
{-
WhatIThoughtDataKindsDid.hs:8:24: error:
Expecting one more argument to 'B
Expected a type, but 'B has kind Int -> Ty
In the type signature: someFunctionTakingB :: 'B -> Int
|
8 | someFunctionTakingB :: 'B -> Int
| ^^
-}