Idris2/tests/idris2/perf003/Auto.idr
Edwin Brady a972778eab Add test script
They don't all pass yet, for minor reasons. Coming shortly...
Unfortunately the startup overhead for chez is really noticeable here!
2020-05-19 18:25:18 +01:00

19 lines
516 B
Idris

public export
data Phase = Gas | Liquid | Solid
public export
data ChangePhase : Phase -> Phase -> Type where
Sequence : ChangePhase a b -> ChangePhase b c -> ChangePhase a c
Condense : ChangePhase Gas Liquid
Freeze : ChangePhase Liquid Solid
Melt : ChangePhase Solid Liquid
Vaporize : ChangePhase Liquid Gas
Sublimate : ChangePhase Solid Gas
public export
inferred : { auto transition : ChangePhase l r } -> ChangePhase l r
inferred { transition } = transition
test : ChangePhase Gas Solid
test = inferred