forked from github/purescript-typeable
f3dd0c0fb1
Part of this work was done by @the-dr-lazy in https://github.com/ajnsit/purescript-typeable/pull/3. GOOD: Now there is no more dependence on dictionaries being passed as function arguments at runtime. BAD: 1. However, we still depend on the dictionaries being stable at runtime. 2. We now also assume that the output of the new function `makeTag` will never be cached.
17 lines
361 B
Haskell
17 lines
361 B
Haskell
module Test.Person where
|
|
|
|
import Data.Typeable (class Tagged, TypeRep, makeTag, typeRep)
|
|
import Data.Unit (unit)
|
|
|
|
newtype Person = Person { name :: String, location :: String }
|
|
|
|
instance taggedPerson :: Tagged Person where
|
|
tag = makeTag unit
|
|
|
|
typePerson :: TypeRep Person
|
|
typePerson = typeRep
|
|
|
|
typeArrPerson :: TypeRep (Array Person)
|
|
typeArrPerson = typeRep
|
|
|