[Haskell-cafe] Pointed, but not Applicative

Sebastian Fischer fischer at nii.ac.jp
Wed Aug 31 03:21:47 CEST 2011

>    toFList [] = id
>    toFList (xs++ys) = toFList xs . toFList ys
>    toList id = []
>    toList (f . g) = toList f ++ toList g

These laws do not *define* the isomorphisms because their behavior on
singletons is not fixed. Combining them with laws using a 'point'
function for functional lists

    point = (:)

the isomorphisms are characterized uniquely:

    toFList [x] = point x
    toList (point x) = [x]

This might be an argument in favor of a Pointed class without Functor
constraint as it shows that other pointed structures have reasonable
laws involving 'point' as well.


More information about the Haskell-Cafe mailing list