homepage: http://github.com/mikeizbicki/ifcxt
changelog-type: ''
hash: 8794b38d14673f842467edd348043338ff2f9f2eb2da896c0fdd3a69d8a64971
test-bench-deps: {}
maintainer: mike@izbicki.me
synopsis: put if statements within type constraints
changelog: ''
basic-deps:
  base: ! '>=4.8 && <4.9'
  template-haskell: ! '>=2.10 && <2.11'
all-versions:
- '0.1.0.0'
author: Mike Izbicki
latest: '0.1.0.0'
description-type: haddock
description: ! 'This package introduces the @ifCxt@ function,

  which lets your write if statements that depend on a polymorphic variable''s class
  instances.

  For example, we can make a version of ''show'' that can be called on any type:


  > cxtShow :: forall a. IfCxt (Show a) => a -> String

  > cxtShow a = ifCxt (Proxy::Proxy (Show a))

  >     (show a)

  >     "<<unshowable>>"

  Running this function in ghci, we get:


  >>> cxtShow (1 :: Int)

  "1"


  >>> cxtShow (id :: a -> a)

  "<<unshowable>>"


  See the project webpage http://github.com/mikeizbicki/ifcxt for more details.'
license-name: BSD3

Update from Hackage at 2015-09-02T23:18:11+0000
Update from Hackage at 2015-09-02T23:18:11+0000
