Sha256: d9b263b7a826a3b4caa7d817a423465e74f3da039c9508ae2db0b44c688bee06

Contents?: true

Size: 1.14 KB

Versions: 52

Compression:

Stored size: 1.14 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 = error "You need to implement this function."

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

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

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

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
trackler-2.0.8.18 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.17 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.16 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.15 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.14 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.13 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.12 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.11 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.10 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.9 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.8 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.7 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.6 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.5 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.4 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.3 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.2 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.8.1 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.7.0 tracks/haskell/exercises/lens-person/src/Person.hs
trackler-2.0.6.44 tracks/haskell/exercises/lens-person/src/Person.hs