Skip to content
forked from paf31/partial

A nullary type class for partial functions

License

Notifications You must be signed in to change notification settings

channable/partial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

partial

A nullary type class for partial functions

Introduction

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

{-# LANGUAGE NullaryTypeClasses #-}

import Data.List.Partial

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

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 100.0%