Re: [Haskell-beginners] basic Functor, Applicative and Monad instances

Right, you'll want to say eg
fmap :: (a -> b) -> Val a -> Val b
Tom
El Jul 17, 2015, a las 12:23, Imants Cekusins
InstanceSigs
Thank you Tom.
this sig does not work though: fmap ::(a -> b) -> f a -> f b

Hello, I'm trying to figure out how cabal understands dependencies. It seems all "build-depends:" sections have to build satisfied for any one target to be built. Is that correct or is there a problem with my setup? I assumed those "build-depends:" sections were "per target", but apparently that not exactly the case. I have a small .cabal file that builds the second target "myPersonalMain" if and only if I comment out the build-dependencies for the first target (i.e. myAgent) here's my test file agent.cabal: ------------------------------------------------ name: agent version: 0.1.0.0 synopsis: Just testing author: Dimitri DeFigueiredo maintainer: defigueireo@ucdavis.edu build-type: Simple cabal-version: >=1.20 ---------------------------------------------- executable myAgent main-is: Main.hs hs-source-dirs: ./src build-depends: base >=4.6 && <4.7 , unordered-containers >= 0.2.3.0 , unix >= 2.6.0.1 , process >= 1.1.0.2 , stm >= 2.4.2 default-language: Haskell2010 ---------------------------------------------- executable myPersonalMain main-is: Mpm.hs hs-source-dirs: ./src build-depends: base >=4.6 default-language: Haskell2010 ---------------------------------------------- if I try to build the second target I get: cabal build MyPersonalMain ./agent.cabal has been changed. Re-configuring with most recently used options. If this fails, please run configure manually. Resolving dependencies... Configuring agent-0.1.0.0... cabal: At least the following dependencies are missing: process >=1.1.0.2, stm >=2.4.2, unix >=2.6.0.1, unordered-containers >=0.2.3.0 could someone shed some light into this behavior? Thanks, Dimitri
participants (2)
-
amindfv@gmail.com
-
Dimitri DeFigueiredo