mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 12:14:26 +03:00
a972778eab
They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
19 lines
516 B
Idris
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
|