User Tools

Site Tools


codesnippets:codingconventions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

codesnippets:codingconventions [2024/06/04 08:34] – [Module description] f2b216codesnippets:codingconventions [2025/10/08 00:48] (current) – external edit 127.0.0.1
Line 446: Line 446:
  
   * example: <code Haskell>   * example: <code Haskell>
-class Show => Format d where +-- HUnit 
-    {- |  +-- | ...capability to compare the expected value with the actual one,  
-    * formated in a human readable pretty waywhen printed to a text file or stream like _stdout_.+-- |    and to display the difference if there is one. 
 +{-|  
 +-} 
 +class Show cmp ) => HUnit cmp where 
 +    -- equals 
 +    {- | ...compares the expected value with the actual one. 
 +    * result 'True' if both values are equalotherwise 'False'
     -}     -}
-    display  +    equals  
-        -- | data to be formated in a pretty way +        :: cmp      -- ^ actual value 
-        :: d +        -> cmp      -- ^ expected value 
-        -- | formatted string representing the data +        -> Bool     -- ^ 'True' when actual value and expected value is considered equal, otherwise 'False' 
-        -> String+
 </code> </code>
  
codesnippets/codingconventions.1717482897.txt.gz · Last modified: (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki