Skip to content

Instantly share code, notes, and snippets.

@roman
roman / Example.hs
Created June 11, 2015 20:35
Example on how to create constrained functions for particular ADT constructors in Haskell using GADTs, DataKinds and KindSignatures extension
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE GADTs #-}
module Main where
data UserType
= VirtualUser
| RealUser
data User (userType :: UserType) where