Visitar URL original
GitHub - paf31/partial: A nullary type class for partial functions · GitHub
Skip to content
paf31Public

About

A nullary type class for partial functions

Resources

Stars

15 stars

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

partial

A nullary type class for partial functions

Introduction

Use the Partial type class to track your partial functions. For example:

import Data.List.Partial

cadr :: (Partial) => [a] -> a
cadr = head . tail

As an application developer, either opt into partial functions globally by declaring an instance of the Partial type class:

instance Partial

or run partial functions selectively using the partial function:

ghci> partial $ cadr [1, 2, 3]
2

About

A nullary type class for partial functions

Resources

Stars

15 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages