Created
September 25, 2017 12:42
-
-
Save Risto-Stevcev/57ac0902259e4f409702f3e82735ad4b to your computer and use it in GitHub Desktop.
Some initial experimentation with finally tagless sums for JS primitives in Purescript
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 Primitive (class Primitive) where | |
class OnlyPrimitive a | |
instance intOnlyPrimitive ∷ OnlyPrimitive Int | |
instance boolOnlyPrimitive ∷ OnlyPrimitive Boolean | |
instance stringOnlyPrimitive ∷ OnlyPrimitive String | |
class OnlyPrimitive a ⇐ Primitive a | |
instance intPrimitive ∷ Primitive Int | |
instance boolPrimitive ∷ Primitive Boolean | |
instance stringPrimitive ∷ Primitive String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment