on master help sign in
Move Accessible to Prelude

This is going to be useful for defining recursion views on various data structures (coming soon!)

commit87fb53ad230ad1874132cff606221ba141b31147 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateFri 8 Apr 2016, 15:12 (11 years ago) parent7d0fd03
5 files changed+5−6
libs/contrib/Data/Nat/DivMod/IteratedSubtraction.idr−2 libs/contrib/contrib.ipkg−1 libs/prelude/Prelude.idr+1 libs/contrib/Control/WellFounded.idr → libs/prelude/Prelude/WellFounded.idr+3−3 libs/prelude/prelude.ipkg+1
libs/contrib/Data/Nat/DivMod/IteratedSubtraction.idr−2
@@ -5,8 +5,6 @@ module Data.Nat.DivMod.IteratedSubtraction
55import Data.Fin
66import Data.So
77
8−import Control.WellFounded
9−
108%default total
119%access public export
1210
libs/contrib/contrib.ipkg−1
@@ -8,7 +8,6 @@ modules = CFFI, CFFI.Types, CFFI.Memory,
88 Control.Algebra.NumericInstances,
99 Control.Isomorphism.Primitives,
1010 Control.Partial,
11− Control.WellFounded,
1211
1312 Classes.Verified,
1413
libs/prelude/Prelude.idr+1
@@ -28,6 +28,7 @@ import public Prelude.Show
2828import public Prelude.Interactive
2929import public Prelude.File
3030import public Prelude.Doubles
31+import public Prelude.WellFounded
3132import public Decidable.Equality
3233import public Language.Reflection
3334import public Language.Reflection.Elab
libs/contrib/Control/WellFounded.idr → libs/prelude/Prelude/WellFounded.idrrenamed+3−3
@@ -3,7 +3,7 @@
33||| This is to let us implement some functions that don't have trivial
44||| recursion patterns over datatypes, but instead are using some
55||| other metric of size.
6−module Control.WellFounded
6+module Prelude.WellFounded
77
88%default total
99%access public export
@@ -56,8 +56,8 @@ accRec step z (Access f) =
5656accInd : {rel : a -> a -> Type} -> {P : a -> Type} ->
5757 (step : (x : a) -> ((y : a) -> rel y x -> P y) -> P x) ->
5858 (z : a) -> Accessible rel z -> P z
59−accInd step z (Access f) =
60− step z $ \y, lt => accInd step y (f y lt)
59+accInd {P} step z (Access f) =
60+ step z $ \y, lt => accInd {P} step y (f y lt)
6161
6262
6363||| Use well-foundedness of a relation to write terminating operations.
libs/prelude/prelude.ipkg+1
@@ -10,6 +10,7 @@ modules = Builtins, Prelude, IO,
1010 Prelude.Foldable, Prelude.Traversable, Prelude.Bits, Prelude.Stream,
1111 Prelude.Uninhabited, Prelude.Pairs, Prelude.Providers,
1212 Prelude.Interactive, Prelude.File, Prelude.Doubles,
13+ Prelude.WellFounded,
1314
1415 Language.Reflection, Language.Reflection.Errors, Language.Reflection.Elab,
1516