packages feed

haskell-src-exts-1.16.0: tests/examples/SpecializeInstance.hs.prettyprinter.golden

module Main (main) where
 
instance Sized a => Sized (Digit a) where
         
        {-# SPECIALISE instance Sized (Digit (Elem a)) #-}
         
        {-# SPECIALISE instance Sized (Digit (Node a)) #-}
        size xs = foldl (\ i x -> i + size x) 0 xs