~ubuntu-branches/ubuntu/trusty/haskell-data-default-class/trusty

« back to all changes in this revision

Viewing changes to Data/Default/Class.hs

  • Committer: Package Import Robot
  • Author(s): Joachim Breitner
  • Date: 2013-11-24 14:39:42 UTC
  • Revision ID: package-import@ubuntu.com-20131124143942-ilm0cjxdd5rffb8j
Tags: upstream-0.0.1
ImportĀ upstreamĀ versionĀ 0.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{-
 
2
 
 
3
Copyright (c) 2013 Lukas Mai
 
4
 
 
5
All rights reserved.
 
6
 
 
7
Redistribution and use in source and binary forms, with or without modification,
 
8
are permitted provided that the following conditions are met:
 
9
 
 
10
* Redistributions of source code must retain the above copyright notice, this
 
11
  list of conditions and the following disclaimer.
 
12
* Redistributions in binary form must reproduce the above copyright notice,
 
13
  this list of conditions and the following disclaimer in the documentation
 
14
  and/or other materials provided with the distribution.
 
15
* Neither the name of the author nor the names of his contributors
 
16
  may be used to endorse or promote products derived from this software
 
17
  without specific prior written permission.
 
18
 
 
19
THIS SOFTWARE IS PROVIDED BY LUKAS MAI AND CONTRIBUTORS "AS IS" AND ANY
 
20
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
21
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
22
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
 
23
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
24
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 
25
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 
26
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
27
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 
28
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
29
 
 
30
-}
 
31
 
 
32
module Data.Default.Class (
 
33
-- | This module defines a class for types with a default value.
 
34
    Default(..)
 
35
) where
 
36
 
 
37
-- | A class for types with a default value.
 
38
class Default a where
 
39
    -- | The default value for this type.
 
40
    def :: a