Sha256: 7d22c5eb863686a8f323c2d69112a4fc073c2131efe87aa884f66abf3a0f7943

Contents?: true

Size: 1.18 KB

Versions: 277

Compression:

Stored size: 1.18 KB

Contents

module Person
  ( Address (..)
  , Born    (..)
  , Name    (..)
  , Person  (..)
  , bornStreet
  , renameStreets
  , setBirthMonth
  , setCurrentStreet
  ) where

import Data.Time.Calendar (Day)

data Person = Person { _name    :: Name
                     , _born    :: Born
                     , _address :: Address
                     }

data Name = Name { _foreNames :: String
                 , _surName   :: String
                 }

data Born = Born { _bornAt :: Address
                 , _bornOn :: Day
                 }

data Address = Address { _street      :: String
                       , _houseNumber :: Int
                       , _place       :: String
                       , _country     :: String
                       }

bornStreet :: Born -> String
bornStreet born = error "You need to implement this function."

setCurrentStreet :: String -> Person -> Person
setCurrentStreet street person = error "You need to implement this function."

setBirthMonth :: Int -> Person -> Person
setBirthMonth month person = error "You need to implement this function."

renameStreets :: (String -> String) -> Person -> Person
renameStreets f person = error "You need to implement this function."

Version data entries

277 entries across 277 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.118 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.117 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.116 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.115 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.114 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.113 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.111 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.110 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.109 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.108 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.107 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.106 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.105 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.104 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.103 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.102 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.101 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.100 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.99 tracks/haskell/exercises/lens-person/src/Person.hs