You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would allow to use partial functions in an encapsulated manner and without depending on the Debug module. Currently, e.g., the head function depends on Debug.fail.
We could rename Debug.fail to Debug.abort.
Add a trait:
trait
type Partial := mkPartial {
fail : {A : Type} -> A
};
runPartial {A} (f : {{Partial}} -> A) : A := f {{mkPartial __builtin_fail}};
The text was updated successfully, but these errors were encountered:
Once we have traits, we could create a
Partial
typeclass like in PureScript:https://book.purescript.org/chapter6.html#nullary-type-classes
This would allow to use partial functions in an encapsulated manner and without depending on the
Debug
module. Currently, e.g., thehead
function depends onDebug.fail
.We could rename
Debug.fail
toDebug.abort
.Add a trait:
The text was updated successfully, but these errors were encountered: