Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. type OtherType = { x :: Int, y :: Int, z :: String } deriving (Show)
  2.  
  3. data SelectionType = A | B
  4.  
  5. myMapper = map foo someMyTypes
  6.  
  7. foo :: SelectionType -> MyType -> OtherType
  8. foo sel t = [ x t, y t, z t <> something ]
  9. where
  10. case SelectionType of
  11. A -> something = "a selected"
  12. B -> something = "b selected"
  13.  
  14. foo sel t = [ x t, y t, z t <> something ]
  15. where
  16. something = case sel of
  17. A -> "a selected"
  18. B -> "b selected"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement