User Tools

Site Tools


codesnippets:flexibleinstances

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
codesnippets:flexibleinstances [2021/04/12 19:36] f2b216codesnippets:flexibleinstances [2025/10/08 00:48] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== {-# LANGUAGE FlexibleInstances #-} ====== ====== {-# LANGUAGE FlexibleInstances #-} ======
 +~~DISCUSSION~~
  
   * allows to implement instances that are of form (T a1 ... an) where a1 ... an are particlar types (not type variables)   * allows to implement instances that are of form (T a1 ... an) where a1 ... an are particlar types (not type variables)
     * [Double] instead of [a]     * [Double] instead of [a]
-  * implies extension ''[[codesnippets:typesynonyminstances|TypeSynonymInstances]]'' +  * implies the application of extension ''[[codesnippets:typesynonyminstances|TypeSynonymInstances]]'' 
   * example:   * example:
     * code:<code Haskell>     * code:<code Haskell>
Line 143: Line 144:
 x2 = fMy (C 1.3) (C 2.5) x2 = fMy (C 1.3) (C 2.5)
 </code> </code>
-    * compiles, error and warning free+    * compiles, error and warning free, with compiler: GHC 8.10.4, using compiler option -Wall
     * executes, with output:<code>     * executes, with output:<code>
 [1.3,2.5,3.7] [1.3,2.5,3.7]
Line 149: Line 150:
 </code> </code>
  
 +
 +===== ✎ =====
 +~~DISCUSSION~~
codesnippets/flexibleinstances.1618249011.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