[Haskell-cafe] Trying to write 'safeFromInteger'

Jason Dagit dagit at codersbase.com
Wed Apr 8 12:38:25 EDT 2009

On Wed, Apr 8, 2009 at 9:26 AM, david48 <dav.vire+haskell at gmail.com> wrote:
> On Wed, Apr 8, 2009 at 2:55 PM, Neil Mitchell <ndmitchell at gmail.com> wrote:
>> That seems a really weird way to write it! Who decided all auxiliary
>> functions should be called go? (I think I'm blaming dons) - why not:
>> sffi :: (Integral a,Num a) => Integer -> Maybe a
>> sffi n | toInteger n2 == n = Just n2
>>        | otherwise = Nothing
>>     where n2 = fromInteger n
> I know I was too lazy to clean it up :-P
> ( I also blame Dons for 'go' )

I think the Common Lisp community tends to use 'foo-aux' instead of
'go' for these sort of axillary functions.  But, then in Haskell we
can't use hyphen as an identify character and underscore is not
popular.  For this reason I started using fooAux in Haskell, but after
learning that a single quote is valid identifier character I started
using foo'.

Other than using go and foo', what do people use in Haskell?


More information about the Haskell-Cafe mailing list