Safe Haskell | None |
---|---|
Language | Haskell2010 |
Another way to desugar overloaded numeric literals. See FromNatural
.
An explicit list expression, e.g. [1, True]
is desugared to
cons 1 (cons True nil)
Enabled with:
{-# OPTIONS -fplugin=Overloaded -fplugin-opt=Overloaded:Lists #-}
Documentation
Class for nil, []
See test-suite for ways to define instances for Map
.
There are at-least two-ways.
Instances
Nil IntSet Source # | Since: 0.1.2 |
Defined in Overloaded.Lists | |
Nil [a] Source # | |
Defined in Overloaded.Lists | |
Nil (Set a) Source # | Since: 0.1.2 |
Defined in Overloaded.Lists | |
n ~ Z => Nil (Vec n a) Source # | |
Defined in Overloaded.Lists | |
xs ~ ([] :: [k]) => Nil (NP f xs) Source # | |
Defined in Overloaded.Lists | |
xs ~ ([] :: [[k]]) => Nil (POP f xs) Source # | |
Defined in Overloaded.Lists |
class Cons x ys zs | zs -> x ys where Source #
Class for Cons :
.
Instances
Cons Int IntSet IntSet Source # | Since: 0.1.2 |
Ord a => Cons a (Set a) (Set a) Source # | Since: 0.1.2 |
Cons a [a] (NonEmpty a) Source # | |
Defined in Overloaded.Lists | |
Cons a [a] [a] Source # | |
Defined in Overloaded.Lists | |
Cons a (Vec n a) (Vec (S n) a) Source # | |
Cons (f x) (NP f xs) (NP f (x ': xs)) Source # | |
Cons (NP f xs) (POP f xss) (POP f (xs ': xss)) Source # | |