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.180 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.179 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.178 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.177 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.176 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.175 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.174 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.173 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.172 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.171 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.170 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.169 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.167 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.166 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.165 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.164 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.163 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.162 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.161 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.2.1.160 tracks/haskell/exercises/lens-person/src/Person.hs